aboutsummaryrefslogtreecommitdiffstats
path: root/hw/virtio.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2011-01-10 14:28:40 +0200
committerMichael S. Tsirkin <mst@redhat.com>2011-01-10 14:44:07 +0200
commit85cf2a8d7435754f685a26f95dcb43a93a84ff60 (patch)
tree2924eccb9ec1ac1e450e36316515b4f1bb353c3d /hw/virtio.h
parent3dbca8e6a7a5be52c3251ad03bf30d73301babf3 (diff)
virtio: move vmstate change tracking to core
Move tracking vmstate change from virtio-net to virtio.c as it is going to be used by virito-blk and virtio-pci for the ioeventfd support. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio.h')
-rw-r--r--hw/virtio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/virtio.h b/hw/virtio.h
index 02fa312d3..bd5274225 100644
--- a/hw/virtio.h
+++ b/hw/virtio.h
@@ -95,6 +95,7 @@ typedef struct {
unsigned (*get_features)(void * opaque);
int (*set_guest_notifiers)(void * opaque, bool assigned);
int (*set_host_notifier)(void * opaque, int n, bool assigned);
+ void (*vmstate_change)(void * opaque, bool running);
} VirtIOBindings;
#define VIRTIO_PCI_QUEUE_MAX 64
@@ -123,6 +124,8 @@ struct VirtIODevice
const VirtIOBindings *binding;
void *binding_opaque;
uint16_t device_id;
+ bool vm_running;
+ VMChangeStateEntry *vmstate;
};
static inline void virtio_set_status(VirtIODevice *vdev, uint8_t val)