Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp578043rdb; Tue, 23 Jan 2024 08:15:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjx4VJnVg4Xw/aJBSgAM+eRBvYnLxishWNQTNTGzZzuep5/ibQ1gN6GxVtcFqNNjti2HV4 X-Received: by 2002:a05:6358:7e8a:b0:176:2ed9:997e with SMTP id o10-20020a0563587e8a00b001762ed9997emr2269519rwn.56.1706026520277; Tue, 23 Jan 2024 08:15:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706026520; cv=pass; d=google.com; s=arc-20160816; b=kEepHsrRUCDGMZCl4NcpDORrWeB9nce131CqYvmGBAPiVvw41dL/D8JY4tCXBgMyk+ OnhD/c+KpW3jw1WtLwQgjfOc4yFlzYkByd9vOzCkvEL1spG4saaONQwSld3QgMeazmNM DdG/f++Vkdy43uJ0NqE033BmarJyNC41LIjY9Pbr6eythuY7lBh6+QDXWnCtIh+u3Zu8 +J7b9Zxj3qqgEiZgN+CiwoI6UWvNU4KIApCBc3KmNv8WU3bH5zdcH2O58lEHNmKZ14H6 iAyJRFRhBBnWBGorYJDMj2FuXOksSXz1JKsrsk5HAJ2yC16jQ+TkGx3Q/kJ57pEX2Fjv asJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=dUwJEnq7oOxcGqhcyzNwvv3kJuMw5itJlrn0MHuGglU=; fh=PR1P2pqe0jpj62ogOt8NVf55JS9hNxL47Nw1cxvkO+g=; b=yLigFm2G/FYfpIsTHtfN0l1hVFMYMBsM/iGNk2BxwUQvl3W0DXd0c83YVyQyiGvitb 1WQoNhlW+HYFPc70FyCn+yrv4AZllKPeIU5aaiBz6f5snmQkPviC3qt8YhqKekaWn4oJ 8heBJmJZlJfxEs9ra9Da0o249ZRdjo3NZzlWHvUhu2rZ4gXf5WclnjxCQ7sv5bXsfxun Qook8s8VOqDH4qF1P1bFWqGReGkkoYn1LsUKu+s7vFjeZu3hqA3TIqN3+dDp1LNZjQaq QnYZuOxd27AWSJuPXOCxVbfqSPrps5tv4S+fTzneMId9MlYueE6pItEfj8HsehrrhXyZ wC/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W6h4Q+yW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id z13-20020a65610d000000b005cfa56aa07csi9475292pgu.95.2024.01.23.08.15.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 08:15:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W6h4Q+yW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-35615-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35615-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0EC4628E127 for ; Tue, 23 Jan 2024 16:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4F4D612F1; Tue, 23 Jan 2024 16:02:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W6h4Q+yW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D931A5FDC6; Tue, 23 Jan 2024 16:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706025775; cv=none; b=qsJeM6sUnoqygT2/8r5PVckNwI13G4n5EBlSrZQkj1IDI6ZN1t4I7kse1MTQj0bbGlYHitNIQafZWagERPIuK6mEj705Dj6DoaLroHa7fiILlL4TvsjXR1l4MYUVJfrjGPeZ/UQKS6yKrucN5+t6NfkbG4aVybtMfuXIzyxQc4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706025775; c=relaxed/simple; bh=fBQWnLEBcYKTR5Qq7Ag6Kr3ZXGVUxHSMlcYjRnrDpCw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=TIMCpJBWl2QlqQ72NYW4Vlgc7Z8SWBTow8o2qI4b2shCpI6tNMbkRjrGvpNqNJQaYLfk6vX4YYhk1CPSaWS0pYq7NlOgHkDG1LevyRee8IkgSUFiBPQbuWEV7q4FBPucrL1E2U8n1utGn1AGz2VeiqfURYWC0BJ+9/gTLgaLedU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W6h4Q+yW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CE89C433F1; Tue, 23 Jan 2024 16:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706025774; bh=fBQWnLEBcYKTR5Qq7Ag6Kr3ZXGVUxHSMlcYjRnrDpCw=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=W6h4Q+yW/ndZBGBIYtAlkUk50X2t2NYM6vTxdjLeHdF0LS7L/E7xxpzJYiLpK3ZVf cxLMQ6NCDTLGEQb3Ee69CTnTiPCnP5O7OAKltCTwxTbk6Tng/0W8zHUfqUrZzaJlOr JEGR09vZVL32iC1gSTucjmxerZB1C+BrO7Nge/bay5nEfiRf7JvahldiZKXN6yeNNl wjxbZxVI8GjvV+ieI3y1Z6Nb1l72e93Ql8ayabmkdTLQgWY07nx5uo+dBgiRV/GV5s RBAt7o76WucKEx7ES6icgfU/zS67hfRDPH3KzAm1KlHvrrY4zNRdXCxGkV33OcfaUX ARNNR+BTs1psA== Date: Tue, 23 Jan 2024 10:02:52 -0600 From: Bjorn Helgaas To: "Chen, Jiqian" Cc: "Rafael J . Wysocki" , Len Brown , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Boris Ostrovsky , Bjorn Helgaas , Roger Pau =?utf-8?B?TW9ubsOp?= , "xen-devel@lists.xenproject.org" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" , "Hildebrand, Stewart" , "Huang, Ray" , "Ragiadakou, Xenia" Subject: Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev Message-ID: <20240123160252.GA316914@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 23, 2024 at 10:13:52AM +0000, Chen, Jiqian wrote: > On 2024/1/23 07:37, Bjorn Helgaas wrote: > > On Fri, Jan 05, 2024 at 02:22:17PM +0800, Jiqian Chen wrote: > >> There is a need for some scenarios to use gsi sysfs. > >> For example, when xen passthrough a device to dumU, it will > >> use gsi to map pirq, but currently userspace can't get gsi > >> number. > >> So, add gsi sysfs for that and for other potential scenarios. > ... > > I don't know enough about Xen to know why it needs the GSI in > > userspace. Is this passthrough brand new functionality that can't be > > done today because we don't expose the GSI yet? > > In Xen architecture, there is a privileged domain named Dom0 that > has ACPI support and is responsible for detecting and controlling > the hardware, also it performs privileged operations such as the > creation of normal (unprivileged) domains DomUs. When we give to a > DomU direct access to a device, we need also to route the physical > interrupts to the DomU. In order to do so Xen needs to setup and map > the interrupts appropriately. What kernel interfaces are used for this setup and mapping?