Linux-HyperV List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yu Zhang" <zhangyu1@linux.microsoft.com>
Cc: linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v4 2/5] Drivers: hv: Add logical device ID registry for vPCI devices
Date: Fri, 21 Aug 2026 13:33:18 +0000	[thread overview]
Message-ID: <20260821133318.E047A1F00A3F@smtp.kernel.org> (raw)
In-Reply-To: <20260821132654.211730-3-zhangyu1@linux.microsoft.com>

> Hyper-V identifies each PCI pass-thru device by a logical device ID in
> its hypercall interface. This ID consists of a per-bus prefix, derived
> from the VMBus device instance GUID, combined with the PCI function
> number of the endpoint device.
> 
> Add a registry in hv_common.c that maps a PCI domain number to its
> logical device ID prefix. The vPCI bus driver (pci-hyperv) registers the
> prefix when a bus is probed and unregisters it when the bus is removed.
> Consumers such as the para-virtualized IOMMU driver look up the prefix
> by PCI domain number and combine it with the function number to form the
> complete logical device ID for hypercalls.
> 
> Use rhashtable for the sparse exact-match mapping. Lookups copy the
> prefix while holding the RCU read lock, and removal defers freeing the
> entry until existing readers have completed.
> 
> The prefix construction is shared via hv_build_logical_dev_id_prefix() so
> that pci-hyperv's interrupt retargeting path and the registry use exactly
> the same byte layout. It is derived on demand from the constant hv_device
> instance GUID rather than cached in struct hv_pcibus_device, which is
> private to the pci-hyperv module; this keeps the interface narrow and
> avoids depending on pci-hyperv internals.
> 
> Co-developed-by: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>
> Signed-off-by: Easwar Hariharan <easwar.hariharan@linux.microsoft.com>
> Signed-off-by: Yu Zhang <zhangyu1@linux.microsoft.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260821132654.211730-1-zhangyu1@linux.microsoft.com?part=2


  reply	other threads:[~2026-08-21 13:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 13:26 [PATCH v4 0/5] Hyper-V: Add para-virtualized IOMMU support for Linux guests Yu Zhang
2026-08-21 13:26 ` [PATCH v4 1/5] hyperv: Introduce new hypercall interfaces used by Hyper-V guest IOMMU Yu Zhang
2026-08-21 13:41   ` sashiko-bot
2026-08-28 17:21   ` Michael Kelley
2026-08-21 13:26 ` [PATCH v4 2/5] Drivers: hv: Add logical device ID registry for vPCI devices Yu Zhang
2026-08-21 13:33   ` sashiko-bot [this message]
2026-08-28 17:21   ` Michael Kelley
2026-08-21 13:26 ` [PATCH v4 3/5] iommu/x86: Add architectural MSI reserved region helper Yu Zhang
2026-08-21 13:33   ` sashiko-bot
2026-08-28 17:21   ` Michael Kelley
2026-08-21 13:26 ` [PATCH v4 4/5] iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest Yu Zhang
2026-08-21 13:45   ` sashiko-bot
2026-08-28 17:22   ` Michael Kelley
2026-09-03  8:01     ` Yu Zhang
2026-08-21 13:26 ` [PATCH v4 5/5] iommu/hyperv: Add page-selective IOTLB flush support Yu Zhang
2026-08-21 13:41   ` sashiko-bot
2026-08-28 17:22   ` Michael Kelley
2026-09-03  8:09     ` Yu Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260821133318.E047A1F00A3F@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=zhangyu1@linux.microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox