On Sun, May 11, 2025 at 4:27 PM Michael S. Tsirkin <m...@redhat.com> wrote:
>
> On Wed, Mar 12, 2025 at 02:43:52PM +0200, Yan Vugenfirer wrote:
> >
> >
> > On Tue, Mar 11, 2025 at 4:02 AM Suthikulpanit, Suravee <
> > suravee.suthikulpa...@amd.com> wrote:
> >
> >
> >
> >     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
> >
> > Considering that this is a "null driver" (no actual driver is loaded for the
> > PCIe endpoint according to machine.inf), I recommend using this PNP ID.
> >
>
> So this is the status quo really or did I miss anything?

There was a patch fixing it:
https://patchwork.kernel.org/project/qemu-devel/patch/20250325021140.5676-1-suravee.suthikulpa...@amd.com/

>
> >
> >     2. Figure out why Windows does not recognize the device.
> >
> > The answer is simple: the PCIe endpoint's PNP ID is unknown to Windows. So
> > technically device is recognized (it is shown in Device Manager after all), 
> > but
> > there are no compatible drivers for it. And in anycase, machine.inf 
> > specifies
> > "null driver" for AMD PCIe endpoint IOMMU device. The device will get a
> > friendly name in Device Manager and considered to be "installed" by 
> > Windows, by
> > there is no actual driver associated with the device.
> >
> > Best regards,
> > Yan.
> >
> >
> >
> >     Anyhow, we should still assign some PCI ID value (instead of zero).
> >
> >     Thanks,
> >     Suravee
> >
> >
> >
> >
>


Reply via email to