mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
89a1c435ae
commit
af22bbe1f4
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user