From 6bff3e6be5041c8379238e605fa78ccab4f4267b Mon Sep 17 00:00:00 2001 From: jiesong Date: Tue, 19 Aug 2025 21:54:11 +0800 Subject: [PATCH] hw/i386/amd_iommu: Assign pci-id 0x1419 for the AMD IOMMU device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the QEMU-emulated AMD IOMMU device use PCI vendor id 0x1022 (AMD) with device id zero (undefined). Eventhough this does not cause any functional issue for AMD IOMMU driver since it normally uses information in the ACPI IVRS table to probe and initialize the device per recommendation in the AMD IOMMU specification, the device id zero causes the Windows Device Manager utility to show the device as an unknown device. Since Windows only recognizes AMD IOMMU device with device id 0x1419 as listed in the machine.inf file, modify the QEMU AMD IOMMU model to use the id 0x1419 to avoid the issue. This advertise the IOMMU as the AMD IOMMU device for Family 15h (Models 10h-1fh). Signed-off-by: default avatarSuravee Suthikulpanit Message-Id: <20250325021140.5676-1-suravee.suthikulpanit@amd.com> Reviewed-by: default avatarDaniel P. Berrangé Reviewed-by: default avatarYan Vugenfirer Reviewed-by: MST's avatarMichael S. Tsirkin Signed-off-by: MST's avatarMichael S. Tsirkin (cherry picked from commit 71925548) Signed-off-by: default avatarMichael Tokarev --- hw/i386/amd_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 12742b1433..d64d06ec63 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1631,6 +1631,7 @@ static void amdvi_pci_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->vendor_id = PCI_VENDOR_ID_AMD; + k->device_id = 0x1419; k->class_id = 0x0806; k->realize = amdvi_pci_realize; -- Gitee