On 3/9/2025 8:44 PM, Michael S. Tsirkin wrote:
On Tue, Mar 04, 2025 at 06:37:47PM +0000, Suravee Suthikulpanit wrote:
The QEMU-emulated AMD IOMMU PCI device is implemented based on the AMD I/O
Virtualization Technology (IOMMU) Specification [1]. The PCI id for this
device is platform-specific.
Currently, the QEMU-emulated AMD IOMMU device is using AMD vendor id and
undefined device id.
Therefore, change the vendor id to Red Hat and request a new QEMU-specific
device id.
[1]
https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/specifications/48882_IOMMU.pdf
Cc: Gerd Hoffmann <kra...@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpa...@amd.com>
Will the existing drivers bind with the device then?
Existing Windows would not recognize the device ID.
Actually, Linux and Windows does not depend on the PCI vendor / device
ids to probe devices and initialize AMD IOMMU. Instead, it depends on
the ACPI IVRS table.
Checking on a real system w/ AMD IOMMU enabled booting Windows Server
2022, there is no AMD IOMMU device showing in the Device Manger.
In this case, I believe Windows is not fully initializing the
QEMU-emulated AMD IOMMU. So Windows would not remove the IOMMU PCIe from
the list of OS visible devices and therefore expose the PNPID to the
device manager. And since the device ID is zero, it appears as an "Other
devices->PCI Device (with warning sign).
Therefore, it we have two options:
1. Fake the device ID to 0x1419, which is current appear in the
machine.inf as an entry in section [AMD_SYS.NTamd64]:
%IommuDevice_Desc% = NO_DRV,PCI\VEN_1022&DEV_1419
2. Figure out why Windows does not recognize the device.
Anyhow, we should still assign some PCI ID value (instead of zero).
Thanks,
Suravee