On Tue, Sep 27, 2022 at 04:35:25PM +0200, Eric Auger wrote: > >> diff --git a/hw/arm/virt.c b/hw/arm/virt.c > >> index 2de16f6324..5e16d54bbb 100644 > >> --- a/hw/arm/virt.c > >> +++ b/hw/arm/virt.c > >> @@ -1372,14 +1372,15 @@ static void create_smmu(const VirtMachineState > >> *vms, > >> > >> static void create_virtio_iommu_dt_bindings(VirtMachineState *vms) > >> { > >> - const char compat[] = "virtio,pci-iommu"; > >> + const char compat[] = "virtio,pci-iommu\0pci1af4,1057"; > >> uint16_t bdf = vms->virtio_iommu_bdf; > > > > PCI_DEVICE_ID_VIRTIO_IOMMU is listed in include/hw/pci/pci.h > > as 0x1014, so where does 1057 come from? (This is a hex value, > > right?) > the virtio spec states: > The PCI Device ID is calculated by adding 0x1040 to the Virtio Device ID > (this IOMMU device ID is 0d23 = 0x17 for the virtio-iommu device, also > found in include/uapi/linux/virtio_ids.h) so 0x1057 above looks correct > > note that in docs/specs/pci-ids.txt there are a bunch of other device > ids not documented (virtio-mem, pmem) > > What I don't get anymore is the device id in qemu include/hw/pci/pci.h
Yes 0x1057 is the right device ID, and it matches what the virtio-iommu-pci device gets in hw/virtio/virtio-pci.c:1691. The wrong 0x1014 value set by hw/virtio/virtio-iommu-pci.c:78 gets overwritten since virtio-iommu is modern only. I can send a patch to remove it. Peter, do you mind taking this patch as well, or should I resend it? I can't decide what to do about the other issues in this series, we may have to live with some warnings, but this one should be OK. Thanks, Jean [1] https://lore.kernel.org/qemu-devel/aec4e9d1-b70e-2e8d-6503-b3e550c6d...@redhat.com/