On Fri, Sep 30, 2022 at 05:22:33AM -0400, Michael S. Tsirkin wrote: > On Fri, Sep 30, 2022 at 09:35:53AM +0200, Gerd Hoffmann wrote: > > docs/specs/pci-ids.txt and include/hw/pci/pci.h are out of sync, > > fix that. Try improve the comment which points to pci-ids.txt. > > > > Also drop the list of modern virtio devices and explain how they > > are calculated instead. > > > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > > --- > > docs/specs/pci-ids.txt | 19 ++++++++++--------- > > include/hw/pci/pci.h | 7 ++++++- > > 2 files changed, 16 insertions(+), 10 deletions(-) > > > > diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt > > index dd6859d039d0..6be7bc108d66 100644 > > --- a/docs/specs/pci-ids.txt > > +++ b/docs/specs/pci-ids.txt > > @@ -22,16 +22,17 @@ maintained as part of the virtio specification. > > 1af4:1004 SCSI host bus adapter device (legacy) > > 1af4:1005 entropy generator device (legacy) > > 1af4:1009 9p filesystem device (legacy) > > +1af4:1012 vsock device (legacy) > > +1af4:1013 pmem device (legacy) > > +1af4:1014 iommu device (legacy) > > +1af4:1015 mem device (legacy) > > Wait, how come we have legacy vsock/pmem/iommu/mem? > They were only introduced after 1.0.
I've just synced with the header file, and the #defines there seem to be actually used: kraxel@sirius ~/projects/qemu (pci-ids)# git grep PCI_DEVICE_ID_VIRTIO_IOMMU hw/virtio/virtio-iommu-pci.c: pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_IOMMU; include/hw/pci/pci.h:#define PCI_DEVICE_ID_VIRTIO_IOMMU 0x1014 But, yes, the question is valid. 1.0-only devices should not need a legacy id. Dunno how that happened ... take care, Gerd