diff options
| author | Stefan Hajnoczi | 2016-06-21 14:13:13 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2016-06-28 14:08:32 +0200 |
| commit | edaffd9f0baa32c9524ac8bc80370a7257aa322e (patch) | |
| tree | ed557dbe105c2383b52b92fe46ea8a1f015cd4ce /include | |
| parent | virtio-blk: tell dataplane which vq to notify (diff) | |
| download | qemu-edaffd9f0baa32c9524ac8bc80370a7257aa322e.tar.gz qemu-edaffd9f0baa32c9524ac8bc80370a7257aa322e.tar.xz qemu-edaffd9f0baa32c9524ac8bc80370a7257aa322e.zip | |
virtio-blk: associate request with a virtqueue
Multiqueue requires that each request knows to which virtqueue it
belongs.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-id: 1466511196-12612-5-git-send-email-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/virtio/virtio-blk.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index 9b03b6af2c..a25b3447d7 100644 --- a/include/hw/virtio/virtio-blk.h +++ b/include/hw/virtio/virtio-blk.h @@ -63,6 +63,7 @@ typedef struct VirtIOBlockReq { VirtQueueElement elem; int64_t sector_num; VirtIOBlock *dev; + VirtQueue *vq; struct virtio_blk_inhdr *in; struct virtio_blk_outhdr out; QEMUIOVector qiov; @@ -80,7 +81,8 @@ typedef struct MultiReqBuffer { bool is_write; } MultiReqBuffer; -void virtio_blk_init_request(VirtIOBlock *s, VirtIOBlockReq *req); +void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq, + VirtIOBlockReq *req); void virtio_blk_free_request(VirtIOBlockReq *req); void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb); |
