mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
virtio-blk: Make request completion function virtual
virtio_blk_req_complete will call VirtIOBlock.complete_request() to push data and notify guest. No functional change. Later, this will allow dataplane to provide it's own (vring_) version. Signed-off-by: Fam Zheng <famz@redhat.com> Tested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
13344f3a17
commit
bf4bd461b4
2 changed files with 11 additions and 1 deletions
|
@ -117,6 +117,7 @@ struct VirtIOBlkConf
|
|||
|
||||
struct VirtIOBlockDataPlane;
|
||||
|
||||
struct VirtIOBlockReq;
|
||||
typedef struct VirtIOBlock {
|
||||
VirtIODevice parent_obj;
|
||||
BlockDriverState *bs;
|
||||
|
@ -128,6 +129,8 @@ typedef struct VirtIOBlock {
|
|||
unsigned short sector_mask;
|
||||
bool original_wce;
|
||||
VMChangeStateEntry *change;
|
||||
/* Function to push to vq and notify guest */
|
||||
void (*complete_request)(struct VirtIOBlockReq *req, unsigned char status);
|
||||
#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
|
||||
Notifier migration_state_notifier;
|
||||
struct VirtIOBlockDataPlane *dataplane;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue