diff options
author | Jason Wang <jasowang@redhat.com> | 2019-10-25 10:35:24 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2019-10-25 07:46:22 -0400 |
commit | 86044b24e865fb9596ed77a4d0f3af8b90a088a1 (patch) | |
tree | d9a7c2cb6d84eb507cb0450e74b0d820bc0845e8 /hw/scsi | |
parent | 522bbb191cec2ac799f4bd662b0fcf6f00dfc2ea (diff) | |
download | qemu-86044b24e865fb9596ed77a4d0f3af8b90a088a1.zip qemu-86044b24e865fb9596ed77a4d0f3af8b90a088a1.tar.gz qemu-86044b24e865fb9596ed77a4d0f3af8b90a088a1.tar.bz2 |
virtio: basic packed virtqueue support
This patch implements basic support for the packed virtqueue. Compare
the split virtqueue which has three rings, packed virtqueue only have
one which is supposed to have better cache utilization and more
hardware friendly.
Please refer virtio specification for more information.
Signed-off-by: Wei Xu <wexu@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eugenio PĂ©rez <eperezma@redhat.com>
Message-Id: <20191025083527.30803-6-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/scsi')
-rw-r--r-- | hw/scsi/virtio-scsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index ee52aa7..e8b2b64 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -190,11 +190,12 @@ static void virtio_scsi_save_request(QEMUFile *f, SCSIRequest *sreq) { VirtIOSCSIReq *req = sreq->hba_private; VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(req->dev); + VirtIODevice *vdev = VIRTIO_DEVICE(req->dev); uint32_t n = virtio_get_queue_index(req->vq) - 2; assert(n < vs->conf.num_queues); qemu_put_be32s(f, &n); - qemu_put_virtqueue_element(f, &req->elem); + qemu_put_virtqueue_element(vdev, f, &req->elem); } static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq) |