From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
<qemu-devel@nongnu.org>, <pbonzini@redhat.com>,
<mtosatti@redhat.com>, <mst@redhat.com>,
<marcel.apfelbaum@gmail.com>, <jon.grimm@amd.com>,
<santosh.shukla@amd.com>, <vasant.hegde@amd.com>,
<Wei.Huang2@amd.com>, <bsd@redhat.com>, <berrange@redhat.com>,
<ddutile@redhat.com>, <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device
Date: Wed, 12 Mar 2025 18:18:26 +0000 [thread overview]
Message-ID: <20250312181826.0000473d@huawei.com> (raw)
In-Reply-To: <o4swru5qsoemfs3acxcsifrzy45n4mptxh2vg3ulvnfwgirbv7@6iqvfqb76nh7>
On Tue, 11 Mar 2025 09:08:06 +0100
Gerd Hoffmann <kraxel@redhat.com> wrote:
> Hi,
>
> > As a heads up, I believe we have a similar problem with a few of the CXL IDs.
> > The root port and type 3 device both use Intel IDs that were not reserved
> > for this purpose. VID=0x8086, DID=0x7075 and DID=0x0d93
>
> Essentially we have two kinds of PCI devices in qemu.
>
> * The ones which try to mimic existing hardware, they usually have the
> PCI ID of the device they are emulating (and use the qemu subsystem ID).
> The classic example is the cirrus vga. There are also many intel
> chipset devices for piix4 ('pc' machine type) and ich9 ('q35' machine
> type) with intel IDs.
>
> * The ones which are PCI class implementations and do not need a
> specific ID for drivers to accept them. Most of them have a
> PCI device ID from the 1b36 vendor ID range.
>
> The former tend to be older devices (before hardware standardization was
> a thing, also before we got a range from 1b36 for qemu), and the latter
> tend to be newer devices. There are also a bunch of exceptions for
> historical reasons. The ahci emulation has a ich9 id. xhci even has
> two variants (one mimicking a NEC host adapter, one with qemu device id).
>
> So, in short, using the intel IDs is not necessarily a problem. Depends
> a bit on what kind of device we are talking about. For PCI class
> devices it usually is more useful to have a qemu ID though.
They are not valid IDs, so they may get used in future for real
hardware of an entirely different type. We don't want these to
correspond to real hardware either because the aim is to test
out corners of the spec, so we may well implement completely different
sets of features to any real implementation.
>
> > Switch ports and switch-cci are using valid Hisilicon IDs that are for
> > emulation of these device only and are registered in our tracker
> > for these IDs so won't get 'reused'.
>
> That is perfectly fine. There is no need to change IDs, although it
> makes sense to document that fact in docs/specs/pci-ids.rst
Ah. I wasn't aware of the ID space reserved for QEMU or that doc.
We can leave the HiSilicon ones alone. I'll sort a docs patch for
the 3 of those soon.
For the Intel ones can I have a pair for the root port and the CXL
type 3 device (so 2 IDs)? We will probably need one shortly for
the type2 emulation test device as well.
Thanks,
Jonathan
>
> Moving them to qemu pci id range is an option too if you prefer that.
> Your choice.
>
> take care,
> Gerd
>
>
prev parent reply other threads:[~2025-03-12 18:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250304183747.639382-1-suravee.suthikulpanit@amd.com>
2025-03-10 13:57 ` [PATCH] pci-ids.rst: Add Red Hat pci-id for AMD IOMMU device Jonathan Cameron
2025-03-11 8:08 ` Gerd Hoffmann
2025-03-12 18:18 ` Jonathan Cameron [this message]
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=20250312181826.0000473d@huawei.com \
--to=jonathan.cameron@huawei.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=linux-cxl@vger.kernel.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.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 \
/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