[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <827c75e4-8e6c-4e98-9a1a-80ddba0de61a@infradead.org>
Date: Mon, 8 Dec 2025 21:21:55 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Yu Zhang <zhangyu1@...ux.microsoft.com>, linux-kernel@...r.kernel.org,
linux-hyperv@...r.kernel.org, iommu@...ts.linux.dev,
linux-pci@...r.kernel.org
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, lpieralisi@...nel.org, kwilczynski@...nel.org,
mani@...nel.org, robh@...nel.org, bhelgaas@...gle.com, arnd@...db.de,
joro@...tes.org, will@...nel.org, robin.murphy@....com,
easwar.hariharan@...ux.microsoft.com, jacob.pan@...ux.microsoft.com,
nunodasneves@...ux.microsoft.com, mrathor@...ux.microsoft.com,
mhklinux@...look.com, peterz@...radead.org, linux-arch@...r.kernel.org
Subject: Re: [RFC v1 1/5] PCI: hv: Create and export hv_build_logical_dev_id()
Hi--
On 12/8/25 9:11 PM, Yu Zhang wrote:
> From: Easwar Hariharan <easwar.hariharan@...ux.microsoft.com>
>
> Hyper-V uses a logical device ID to identify a PCI endpoint device for
> child partitions. This ID will also be required for future hypercalls
> used by the Hyper-V IOMMU driver.
>
> Refactor the logic for building this logical device ID into a standalone
> helper function and export the interface for wider use.
>
> Signed-off-by: Easwar Hariharan <easwar.hariharan@...ux.microsoft.com>
> Signed-off-by: Yu Zhang <zhangyu1@...ux.microsoft.com>
> ---
> drivers/pci/controller/pci-hyperv.c | 28 ++++++++++++++++++++--------
> include/asm-generic/mshyperv.h | 2 ++
> 2 files changed, 22 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 146b43981b27..4b82e06b5d93 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -598,15 +598,31 @@ static unsigned int hv_msi_get_int_vector(struct irq_data *data)
>
> #define hv_msi_prepare pci_msi_prepare
>
> +/**
> + * Build a "Device Logical ID" out of this PCI bus's instance GUID and the
> + * function number of the device.
> + */
Don't use kernel-doc notation "/**" unless you are using kernel-doc comments.
You could just convert it to a kernel-doc style comment...
> +u64 hv_build_logical_dev_id(struct pci_dev *pdev)
> +{
thanks.
--
~Randy
Powered by blists - more mailing lists