Hi Mukesh,

On Mon, 6 Jul 2026 17:08:50 -0700
Mukesh R <[email protected]> wrote:

> From: Mukesh R <[email protected]>
> To: Yu Zhang <[email protected]>,
> [email protected],  [email protected],
> [email protected],  [email protected],
> [email protected] Cc: [email protected], [email protected],
> [email protected],  [email protected], [email protected],
> [email protected], [email protected],  [email protected],
> [email protected], [email protected],  [email protected],
> [email protected], [email protected], [email protected],  [email protected],
> [email protected], [email protected],
> [email protected], [email protected]
> Subject: Re: [PATCH v2 3/4] iommu/hyperv: Add para-virtualized IOMMU
> support  for Hyper-V guest Date: Mon, 6 Jul 2026 17:08:50 -0700
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
> Thunderbird/91.13.1
> 
> On 7/2/26 09:05, Yu Zhang wrote:
> > Add a para-virtualized IOMMU driver for Linux guests running on
> > Hyper-V. This driver implements stage-1 IO translation within the
> > guest OS. It integrates with the Linux IOMMU core, utilizing
> > Hyper-V hypercalls for:
> >   - Capability discovery
> >   - Domain allocation, configuration, and deallocation
> >   - Device attachment and detachment
> >   - IOTLB invalidation
> > 
> > The driver constructs x86-compatible stage-1 IO page tables in the
> > guest memory using consolidated IO page table helpers. This allows
> > the guest to manage stage-1 translations independently of vendor-
> > specific drivers (like Intel VT-d or AMD IOMMU).
> > 
> > Hyper-V consumes this stage-1 IO page table when a device domain is
> > created and configured, and nests it with the host's stage-2 IO page
> > tables, therefore eliminating the VM exits for guest IOMMU mapping
> > operations. For unmapping operations, VM exits to perform the IOTLB
> > flush are still unavoidable.
> > 
> > To identify a device in its hypercall interface, the driver looks
> > up the logical device ID prefix registered for the device's PCI
> > domain (see the logical device ID registry in hv_common.c) and
> > combines it with the PCI function number of the endpoint device.
> > 
> > Co-developed-by: Wei Liu <[email protected]>
> > Signed-off-by: Wei Liu <[email protected]>
> > Co-developed-by: Easwar Hariharan
> > <[email protected]> Signed-off-by: Easwar
> > Hariharan <[email protected]> Signed-off-by: Yu
> > Zhang <[email protected]> ---
> >   arch/x86/hyperv/hv_init.c       |   4 +
> >   arch/x86/include/asm/mshyperv.h |   4 +
> >   drivers/iommu/Kconfig           |   1 +
> >   drivers/iommu/hyperv/Kconfig    |  16 +
> >   drivers/iommu/hyperv/Makefile   |   1 +
> >   drivers/iommu/hyperv/iommu.c    | 620
> > ++++++++++++++++++++++++++++++++ drivers/iommu/hyperv/iommu.h    |
> > 51 +++ 7 files changed, 697 insertions(+)
> >   create mode 100644 drivers/iommu/hyperv/Kconfig
> >   create mode 100644 drivers/iommu/hyperv/iommu.c  
> 
> Hey Jacob,
> 
> You had suggested I rename iommu.c to iommu-root.c (I called it
> hv-iommu-root.c eventually), so this needs to be renamed also,
> right?

yes, I agree. I feel it is clearer to name it hv-iommu-guest.c since
this is a guest only driver.

Reply via email to