summaryrefslogtreecommitdiff
path: root/include/uapi/linux/virtio_pci.h
diff options
context:
space:
mode:
authorFeng Liu <feliu@nvidia.com>2023-12-19 12:32:40 +0300
committerAlex Williamson <alex.williamson@redhat.com>2023-12-19 21:51:31 +0300
commitfd27ef6b44bec26915c5b2b22c13856d9f0ba17a (patch)
treee9823713c0bf880a4dbf580f4eaaca0d839fe300 /include/uapi/linux/virtio_pci.h
parent838bebb4c926a573839ff1bfe1b654a6ed0f9779 (diff)
downloadlinux-fd27ef6b44bec26915c5b2b22c13856d9f0ba17a.tar.xz
virtio-pci: Introduce admin virtqueue
Introduce support for the admin virtqueue. By negotiating VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one administration virtqueue. Administration virtqueue implementation in virtio pci generic layer, enables multiple types of upper layer drivers such as vfio, net, blk to utilize it. Signed-off-by: Feng Liu <feliu@nvidia.com> Reviewed-by: Parav Pandit <parav@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Link: https://lore.kernel.org/r/20231219093247.170936-3-yishaih@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/uapi/linux/virtio_pci.h')
-rw-r--r--include/uapi/linux/virtio_pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_pci.h b/include/uapi/linux/virtio_pci.h
index 44f4dd2add18..240ddeef7eae 100644
--- a/include/uapi/linux/virtio_pci.h
+++ b/include/uapi/linux/virtio_pci.h
@@ -175,6 +175,9 @@ struct virtio_pci_modern_common_cfg {
__le16 queue_notify_data; /* read-write */
__le16 queue_reset; /* read-write */
+
+ __le16 admin_queue_index; /* read-only */
+ __le16 admin_queue_num; /* read-only */
};
/* Fields in VIRTIO_PCI_CAP_PCI_CFG: */
@@ -215,6 +218,8 @@ struct virtio_pci_cfg_cap {
#define VIRTIO_PCI_COMMON_Q_USEDHI 52
#define VIRTIO_PCI_COMMON_Q_NDATA 56
#define VIRTIO_PCI_COMMON_Q_RESET 58
+#define VIRTIO_PCI_COMMON_ADM_Q_IDX 60
+#define VIRTIO_PCI_COMMON_ADM_Q_NUM 62
#endif /* VIRTIO_PCI_NO_MODERN */