aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-04-06 12:16:23 +0200
committerMichael S. Tsirkin <mst@redhat.com>2016-04-07 19:57:33 +0300
commiteb41cf78fcdbe3ba3566482c72ff314246a906cc (patch)
tree5ba764a9add063d51842cc67c22376e6b8c44ceb /include
parent2b2cbcadc157295c7a1a25d7e7d0db9cdafcf773 (diff)
downloadqemu-eb41cf78fcdbe3ba3566482c72ff314246a906cc.zip
qemu-eb41cf78fcdbe3ba3566482c72ff314246a906cc.tar.gz
qemu-eb41cf78fcdbe3ba3566482c72ff314246a906cc.tar.bz2
virtio-blk: fix disabled mode
We must not call virtio_blk_data_plane_notify if dataplane is disabled: we would hit a segmentation fault in notify_guest_bh as s->guest_notifier has not been setup and is NULL. Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-blk.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
index ae84d92..59ae1e4 100644
--- a/include/hw/virtio/virtio-blk.h
+++ b/include/hw/virtio/virtio-blk.h
@@ -53,6 +53,7 @@ typedef struct VirtIOBlock {
unsigned short sector_mask;
bool original_wce;
VMChangeStateEntry *change;
+ bool dataplane_disabled;
bool dataplane_started;
struct VirtIOBlockDataPlane *dataplane;
} VirtIOBlock;