diff options
| author | Jiri Pirko <jiri@nvidia.com> | 2024-07-16 13:35:48 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2024-07-17 05:43:21 -0400 |
| commit | af22bbe1f4a514c80b89a27252beef033168f4e9 (patch) | |
| tree | 96b789faa0b480fb29fbccc0340a5a489475c9e1 /drivers/virtio/virtio_pci_common.h | |
| parent | 89a1c435aec269d109ed46ca7bbb10fa8edf7ace (diff) | |
| download | linux-af22bbe1f4a514c80b89a27252beef033168f4e9.tar.gz linux-af22bbe1f4a514c80b89a27252beef033168f4e9.tar.bz2 linux-af22bbe1f4a514c80b89a27252beef033168f4e9.zip | |
virtio: create admin queues alongside other virtqueues
Admin virtqueue is just another virtqueue nothing that special about it.
The current implementation treats it somehow separate though in terms
of creation and deletion. Unify the admin virtqueue creation and
deletion flows to be aligned with the rest of virtqueues, creating
it from vp_find_vqs_*() helpers. Let the admin virtqueue to be deleted
by vp_del_vqs() as the rest.
Call vp_find_one_vq_msix() with slow_path argument being "true" to make
sure that in case of limited interrupt vectors the config vector is used
for admin queue.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Message-Id: <20240716113552.80599-10-jiri@resnulli.us>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/virtio/virtio_pci_common.h')
| -rw-r--r-- | drivers/virtio/virtio_pci_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci_common.h b/drivers/virtio/virtio_pci_common.h index aa43875b6353..de59bb06ec3c 100644 --- a/drivers/virtio/virtio_pci_common.h +++ b/drivers/virtio/virtio_pci_common.h @@ -44,7 +44,7 @@ struct virtio_pci_vq_info { struct virtio_pci_admin_vq { /* Virtqueue info associated with this admin queue. */ - struct virtio_pci_vq_info info; + struct virtio_pci_vq_info *info; /* serializing admin commands execution. */ struct mutex cmd_lock; u64 supported_cmds; @@ -105,7 +105,7 @@ struct virtio_pci_device { void (*del_vq)(struct virtio_pci_vq_info *info); u16 (*config_vector)(struct virtio_pci_device *vp_dev, u16 vector); - bool (*is_avq)(struct virtio_device *vdev, unsigned int index); + int (*avq_index)(struct virtio_device *vdev, u16 *index, u16 *num); }; /* Constants for MSI-X */ |
