linux/drivers/virtio
Shannon Nelson a37c0191ac virtio: allow caller to override device id in vp_modern
To add a bit of vendor flexibility with various virtio based devices,
allow the caller to check for a different device id.  This adds a function
pointer field to struct virtio_pci_modern_device to specify an override
device id check.  If defined by the driver, this function will be called
to check that the PCI device is the vendor's expected device, and will
return the found device id to be stored in mdev->id.device.  This allows
vendors with alternative vendor device ids to use this library on their
own device BAR.

Note: A lot of the diff in this is simply indenting the existing code
into an else block.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230519215632.12343-2-shannon.nelson@amd.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-06-27 10:47:08 -04:00
..
Kconfig virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
Makefile virtio: replace restricted mem access flag with callback 2022-08-01 07:42:49 +02:00
virtio_anchor.c virtio: replace restricted mem access flag with callback 2022-08-01 07:42:49 +02:00
virtio_balloon.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
virtio_dma_buf.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
virtio_input.c virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
virtio_mem.c mm, treewide: redefine MAX_ORDER sanely 2023-04-05 19:42:46 -07:00
virtio_mmio.c virtio,vhost,vdpa: features, fixes, cleanups 2023-04-27 17:05:34 -07:00
virtio_pci_common.c virtio_pci: use irq to detect interrupt support 2022-10-13 09:33:03 -04:00
virtio_pci_common.h virtio_pci: Optimize virtio_pci_device structure size 2023-06-27 10:47:08 -04:00
virtio_pci_legacy_dev.c virtio/virtio_pci_legacy_dev: ensure the correct return value 2022-01-14 18:50:53 -05:00
virtio_pci_legacy.c virtio_pci: Revert "virtio_pci: support the arg sizes of find_vqs()" 2022-08-16 01:38:29 -04:00
virtio_pci_modern_dev.c virtio: allow caller to override device id in vp_modern 2023-06-27 10:47:08 -04:00
virtio_pci_modern.c virtio: add VIRTIO_F_NOTIFICATION_DATA feature support 2023-04-21 03:02:35 -04:00
virtio_ring.c virtio: add VIRTIO_F_NOTIFICATION_DATA feature support 2023-04-21 03:02:35 -04:00
virtio_vdpa.c virtio-vdpa: Fix unchecked call to NULL set_vq_affinity 2023-06-27 10:47:08 -04:00
virtio.c driver core: make struct bus_type.uevent() take a const * 2023-01-27 13:45:52 +01:00