From: "Michael S. Tsirkin" <mst@redhat.com>
To: Yan Vugenfirer <yvugenfi@redhat.com>
Cc: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>,
qemu-devel@nongnu.org, pbonzini@redhat.com, mtosatti@redhat.com,
marcel.apfelbaum@gmail.com, jon.grimm@amd.com,
santosh.shukla@amd.com, vasant.hegde@amd.com, Wei.Huang2@amd.com,
kraxel@redhat.com, bsd@redhat.com, berrange@redhat.com,
ddutile@redhat.com
Subject: Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device
Date: Sun, 11 May 2025 09:27:19 -0400 [thread overview]
Message-ID: <20250511092651-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAGoVJZwg0KvZX7_OCFYp+RBk_fO4kBV3MmY3FxUC=RbnNKLtZA@mail.gmail.com>
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.suthikulpanit@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 <kraxel@redhat.com>
> >> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@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?
>
> 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
>
>
>
>
next prev parent reply other threads:[~2025-05-11 13:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 18:37 [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device Suravee Suthikulpanit
2025-03-04 18:46 ` Daniel P. Berrangé
2025-03-04 23:02 ` Donald Dutile
2025-03-05 2:56 ` Suthikulpanit, Suravee
2025-03-05 20:28 ` Donald Dutile
2025-03-05 6:52 ` Michael S. Tsirkin
2025-03-06 7:11 ` Yan Vugenfirer
2025-03-06 8:58 ` Daniel P. Berrangé
2025-03-07 2:44 ` Suthikulpanit, Suravee
2025-03-07 2:53 ` Suthikulpanit, Suravee
2025-03-09 6:47 ` Yan Vugenfirer
2025-03-09 13:44 ` Michael S. Tsirkin
2025-03-11 1:55 ` Suthikulpanit, Suravee
2025-03-12 12:43 ` Yan Vugenfirer
2025-05-11 13:27 ` Michael S. Tsirkin [this message]
2025-05-11 15:20 ` Yan Vugenfirer
2025-05-11 15:35 ` Michael S. Tsirkin
2025-03-10 13:57 ` Jonathan Cameron via
2025-03-11 8:08 ` Gerd Hoffmann
2025-03-12 18:18 ` Jonathan Cameron via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250511092651-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Wei.Huang2@amd.com \
--cc=berrange@redhat.com \
--cc=bsd@redhat.com \
--cc=ddutile@redhat.com \
--cc=jon.grimm@amd.com \
--cc=kraxel@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=santosh.shukla@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
--cc=yvugenfi@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).