Re: [PATCH v3 07/22] iommu/amd: Add support for AMD vIOMMU VF MMIO region

From: Suthikulpanit, Suravee

Date: Wed Jul 15 2026 - 07:01:17 EST




On 7/7/2026 9:33 PM, Jason Gunthorpe wrote:
On Mon, Jun 29, 2026 at 03:35:20PM +0000, Suravee Suthikulpanit wrote:
+/*
+ * Returns VF MMIO BAR offset for the give guest ID which will be
+ * mapped to guest vIOMMU 3rd 4K MMIO address
+ */
+u64 amd_viommu_get_vfmmio_addr(struct amd_iommu *iommu, u16 gid)
+{
+ /* TODO: Add check for sVIOMMU and set gid[bit 15] */
+ return iommu->vf_base_phys + gid * VIOMMU_VF_MMIO_ENTRY_SIZE;
+}
+EXPORT_SYMBOL(amd_viommu_get_vfmmio_addr);

Why is this exported?

Jason

I'll remove it in v4.

Thanks
Suravee