[PATCH v2 0/5] pci-ids: virtio cleanup

Gerd Hoffmann posted 5 patches 1 year, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220930135810.1892149-1-kraxel@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eric Auger <eric.auger@redhat.com>, David Hildenbrand <david@redhat.com>
There is a newer version of this series
docs/specs/pci-ids.txt           | 15 ++++++---------
include/hw/pci/pci.h             |  4 ----
hw/virtio/vhost-user-vsock-pci.c |  2 --
hw/virtio/vhost-vsock-pci.c      |  2 --
hw/virtio/virtio-iommu-pci.c     |  4 +---
hw/virtio/virtio-mem-pci.c       |  2 --
hw/virtio/virtio-pmem-pci.c      |  2 --
7 files changed, 7 insertions(+), 24 deletions(-)
[PATCH v2 0/5] pci-ids: virtio cleanup
Posted by Gerd Hoffmann 1 year, 7 months ago
Drop legacy ids for virtio 1.0 devices, they are not needed
and will be overridden anyway by generic virtio pci code.

Improve modern virtio id documentation.

Gerd Hoffmann (5):
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_PMEM
  pci-ids: drop PCI_DEVICE_ID_VIRTIO_VSOCK
  pci-ids: drop list of modern virtio devices

 docs/specs/pci-ids.txt           | 15 ++++++---------
 include/hw/pci/pci.h             |  4 ----
 hw/virtio/vhost-user-vsock-pci.c |  2 --
 hw/virtio/vhost-vsock-pci.c      |  2 --
 hw/virtio/virtio-iommu-pci.c     |  4 +---
 hw/virtio/virtio-mem-pci.c       |  2 --
 hw/virtio/virtio-pmem-pci.c      |  2 --
 7 files changed, 7 insertions(+), 24 deletions(-)

-- 
2.37.3
Re: [PATCH v2 0/5] pci-ids: virtio cleanup
Posted by David Hildenbrand 1 year, 7 months ago
On 30.09.22 15:58, Gerd Hoffmann wrote:
> Drop legacy ids for virtio 1.0 devices, they are not needed
> and will be overridden anyway by generic virtio pci code.
> 
> Improve modern virtio id documentation.
> 
> Gerd Hoffmann (5):
>    pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
>    pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM

I remember that for some weird reason, this was required for Linux to 
actually make use of the device. I never figured out why -- maybe that 
changed.

-- 
Thanks,

David / dhildenb
Re: [PATCH v2 0/5] pci-ids: virtio cleanup
Posted by Gerd Hoffmann 1 year, 6 months ago
On Fri, Sep 30, 2022 at 04:22:21PM +0200, David Hildenbrand wrote:
> On 30.09.22 15:58, Gerd Hoffmann wrote:
> > Drop legacy ids for virtio 1.0 devices, they are not needed
> > and will be overridden anyway by generic virtio pci code.
> > 
> > Improve modern virtio id documentation.
> > 
> > Gerd Hoffmann (5):
> >    pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
> >    pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM
> 
> I remember that for some weird reason, this was required for Linux to
> actually make use of the device. I never figured out why -- maybe that
> changed.

Looking at 'info pci' the mem + pmem devices look identical with and
without this series ...

  Bus  0, device   3, function 0:
    Class 0255: PCI device 1af4:1058
      PCI subsystem 1af4:1100
      IRQ 11, pin A
      BAR4: 64 bit prefetchable memory at 0xfe000000 [0xfe003fff].
      id ""
  Bus  0, device   4, function 0:
    Class 0255: PCI device 1af4:105b
      PCI subsystem 1af4:1100
      IRQ 10, pin A
      BAR4: 64 bit prefetchable memory at 0xfe004000 [0xfe007fff].
      id ""

... and the PCI ID conforms virtio 1.0 (aka 0x1040 + virtio id).

take care,
  Gerd
Re: [PATCH v2 0/5] pci-ids: virtio cleanup
Posted by David Hildenbrand 1 year, 6 months ago
On 04.10.22 09:44, Gerd Hoffmann wrote:
> On Fri, Sep 30, 2022 at 04:22:21PM +0200, David Hildenbrand wrote:
>> On 30.09.22 15:58, Gerd Hoffmann wrote:
>>> Drop legacy ids for virtio 1.0 devices, they are not needed
>>> and will be overridden anyway by generic virtio pci code.
>>>
>>> Improve modern virtio id documentation.
>>>
>>> Gerd Hoffmann (5):
>>>     pci-ids: drop PCI_DEVICE_ID_VIRTIO_IOMMU
>>>     pci-ids: drop PCI_DEVICE_ID_VIRTIO_MEM
>>
>> I remember that for some weird reason, this was required for Linux to
>> actually make use of the device. I never figured out why -- maybe that
>> changed.
> 
> Looking at 'info pci' the mem + pmem devices look identical with and
> without this series ...
> 
>    Bus  0, device   3, function 0:
>      Class 0255: PCI device 1af4:1058
>        PCI subsystem 1af4:1100
>        IRQ 11, pin A
>        BAR4: 64 bit prefetchable memory at 0xfe000000 [0xfe003fff].
>        id ""
>    Bus  0, device   4, function 0:
>      Class 0255: PCI device 1af4:105b
>        PCI subsystem 1af4:1100
>        IRQ 10, pin A
>        BAR4: 64 bit prefetchable memory at 0xfe004000 [0xfe007fff].
>        id ""
> 
> ... and the PCI ID conforms virtio 1.0 (aka 0x1040 + virtio id).

I just did a quick test and it indeed seems to work as expected. Thanks!

-- 
Thanks,

David / dhildenb