diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2020-08-18 15:33:45 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-08-27 08:29:13 -0400 |
commit | 4e5163bd844429711b4d60d51030ab83048d80cd (patch) | |
tree | 29820fc1a17a409f04402367a8cbcef2b78d595f /include/hw/virtio/virtio-scsi.h | |
parent | 1436f32a84c3fda61d0d80302e24d641d3f3f839 (diff) | |
download | qemu-4e5163bd844429711b4d60d51030ab83048d80cd.zip qemu-4e5163bd844429711b4d60d51030ab83048d80cd.tar.gz qemu-4e5163bd844429711b4d60d51030ab83048d80cd.tar.bz2 |
virtio-scsi: introduce a constant for fixed virtqueues
The event and control virtqueues are always present, regardless of the
multi-queue configuration. Define a constant so that virtqueue number
calculations are easier to read.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20200818143348.310613-5-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/hw/virtio/virtio-scsi.h')
-rw-r--r-- | include/hw/virtio/virtio-scsi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index 24e7689..9f293bc 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -36,6 +36,9 @@ #define VIRTIO_SCSI_MAX_TARGET 255 #define VIRTIO_SCSI_MAX_LUN 16383 +/* Number of virtqueues that are always present */ +#define VIRTIO_SCSI_VQ_NUM_FIXED 2 + typedef struct virtio_scsi_cmd_req VirtIOSCSICmdReq; typedef struct virtio_scsi_cmd_resp VirtIOSCSICmdResp; typedef struct virtio_scsi_ctrl_tmf_req VirtIOSCSICtrlTMFReq; |