summaryrefslogtreecommitdiffstats
path: root/include/hw/virtio/virtio.h
diff options
context:
space:
mode:
authorPaolo Bonzini2017-01-27 16:40:17 +0100
committerMichael S. Tsirkin2017-02-17 20:52:30 +0100
commitc611c76417f52b335ecaab01c61743e3b705eb7c (patch)
treea8cec626b13d7fccd8f43857745c1a27d6f3db70 /include/hw/virtio/virtio.h
parentvirtio: use MemoryRegionCache to access descriptors (diff)
downloadqemu-c611c76417f52b335ecaab01c61743e3b705eb7c.tar.gz
qemu-c611c76417f52b335ecaab01c61743e3b705eb7c.tar.xz
qemu-c611c76417f52b335ecaab01c61743e3b705eb7c.zip
virtio: add MemoryListener to cache ring translations
The cached translations are RCU-protected to allow efficient use when processing virtqueues. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.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/hw/virtio/virtio.h')
-rw-r--r--include/hw/virtio/virtio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index 0863a254ba..15efcf2057 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -85,6 +85,7 @@ struct VirtIODevice
uint32_t generation;
int nvectors;
VirtQueue *vq;
+ MemoryListener listener;
uint16_t device_id;
bool vm_running;
bool broken; /* device in invalid state, needs reset */