Received: by 2002:a05:7412:85a1:b0:e2:908c:2ebd with SMTP id n33csp146184rdh; Mon, 30 Oct 2023 17:19:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGmXRDZFYfBWkpz85X7BrFDIpHU3Wim181ivuwPVx9ve32BS6nsDWziBcEDlVWPvnSsKnPH X-Received: by 2002:a17:902:c7c2:b0:1c0:bcbc:d64 with SMTP id r2-20020a170902c7c200b001c0bcbc0d64mr7275452pla.51.1698711590588; Mon, 30 Oct 2023 17:19:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698711590; cv=none; d=google.com; s=arc-20160816; b=PmrIFFPh0AvzPu2SDWLZEuAe57+kOKZpz6eenLO2P1/LUmU00ZPdTM912G9KT5oFpe DoS4buBfcQ/d3lvFu479Z4ODQn1Rs9kYsF18eBsCmn+a8Sw7BqxmPMyVGn0vG4myJjXj f4K563C+f+420nH6guqiG+P7kxn7K2sxEkrvSEY3n5gAvu3UgcUgIr0YhRP1xuV8Ymge byfTcM1tMZqiNiOjA3ROf1GhvujOTdcrkXg3BK1RaWUwSJ4CkHskSW0JExjRkS2GlgUB apgk2KGO2JSO5g8U1Bi6DG7Q2vTerfRmqbNVoReD/MpzW7isW9CwT+Ywe9zo15pxnL+u /ZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=ffC1s6Z1X/Csox1RZZ/ZU27rutehs0vrfN31nQgSnZ0=; fh=C4U6Dq1HSIeZjV6BL4cZ+OFelI3oiGW1DR1z6Pa4Fzc=; b=GwCFloUGxxyzSqvmhOLOAz85yT+3/oJuTLh99zlhfhmlS2pRpYX2cFeFJAKKXeUomo qux/7QmRndpyZ+TE6Wvajy2SKwozSrvxFX/1/6y891avZXxSz/KD5uRouxo3PUQ9sG4x Y+WLodvBbjcHvtLtxD+vj/GmJunYD35ooKa8ib1tDZldXY7uvKBHzQlBBD5CLNKt/Ba8 Nt+WfqvHJLVzHLhXqX9/zir0beiqZY7B2BAG64e29g+56Kq2uXyfxiXEPLwpdTHxvLSL 3u5J0nlYePvHnSHX1IXfEdQMX6KD4L26Q0CdApd/ciiZMz77qQ/6S1yDwdtyIzdAJ95S 0Ylg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mObPa0r3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id i16-20020a170902c95000b001c3b4cb8c88si164493pla.338.2023.10.30.17.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 17:19:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mObPa0r3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0DCFD80B8154; Mon, 30 Oct 2023 17:19:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236486AbjJaATm (ORCPT + 99 others); Mon, 30 Oct 2023 20:19:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236468AbjJaATk (ORCPT ); Mon, 30 Oct 2023 20:19:40 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF4C8A6 for ; Mon, 30 Oct 2023 17:19:38 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9325EC433C8; Tue, 31 Oct 2023 00:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698711578; bh=KqntrI6yWULYOqoFYjP2QovNdDJFLeRx3oez/l6mcTI=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=mObPa0r3sINbGo40LsSc7nvHUNR3hXs+ZjXhViF1YCKoPuxBTiEZSVviCUHutX4d5 CJsTyR2gHbHVBhH+cFfWuKteME8CgZY37/s1sqDWtSns9uPJEX6iKd++/QHzuCS44K vGOesldheWZUdadPb8Ti2z8WfupkrRH2dCWfZdVijuklRAXvrFPmVuljx6eHkEL1NU uViFD8uqf+VZPbfWxtkod6niVIJ8d5m7FyTRp8zdBC6YQPXiLWCNWNc3DR7JsvbW5P hhVL579HWUOoP+I2a60Mm1vhfuP3WVAZ9gbzoNIerRCxBHqDk4j/TL4W8zTt3cJD2t lrN8t12dY0fcg== Date: Mon, 30 Oct 2023 17:19:36 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@ubuntu-linux-20-04-desktop To: Juergen Gross cc: linux-kernel@vger.kernel.org, Stefano Stabellini , Oleksandr Tyshchenko , xen-devel@lists.xenproject.org, David Woodhouse Subject: Re: [PATCH] xen/events: avoid using info_for_irq() in xen_send_IPI_one() In-Reply-To: <20231030142732.1702-1-jgross@suse.com> Message-ID: References: <20231030142732.1702-1-jgross@suse.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 30 Oct 2023 17:19:48 -0700 (PDT) On Mon, 30 Oct 2023, Juergen Gross wrote: > xen_send_IPI_one() is being used by cpuhp_report_idle_dead() after > it calls rcu_report_dead(), meaning that any RCU usage by > xen_send_IPI_one() is a bad idea. > > Unfortunately xen_send_IPI_one() is using notify_remote_via_irq() > today, which is using irq_get_chip_data() via info_for_irq(). And > irq_get_chip_data() in turn is using a maple-tree lookup requiring > RCU. > > Avoid this problem by caching the ipi event channels in another > percpu variable, allowing the use notify_remote_via_evtchn() in > xen_send_IPI_one(). > > Fixes: 721255b9826b ("genirq: Use a maple tree for interrupt descriptor management") > Reported-by: David Woodhouse > Signed-off-by: Juergen Gross > Tested-by: David Woodhouse Acked-by: Stefano Stabellini