summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2015-10-09 17:17:25 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-10-22 14:34:49 +0300
commit15324404f68cde561d0eeee3d18a7b203f57f095 (patch)
treea8a52cb4cf0af571dc946f06a08f2dcde185f8a3 /include
parent1be0ac2109fbaca6e730ac578f0564507d173e2d (diff)
downloadqemu-15324404f68cde561d0eeee3d18a7b203f57f095.tar.gz
qemu-15324404f68cde561d0eeee3d18a7b203f57f095.tar.bz2
qemu-15324404f68cde561d0eeee3d18a7b203f57f095.zip
vhost: alloc shareable log
If the backend is requires it, allocate shareable memory. vhost_log_get() now uses 2 globals "vhost_log" and "vhost_log_shm", that way there is a common non-shareable log and a common shareable one. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Thibaut Collet <thibaut.collet@6wind.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/vhost.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h
index 080831ed67..6bf759f5c7 100644
--- a/include/hw/virtio/vhost.h
+++ b/include/hw/virtio/vhost.h
@@ -31,7 +31,8 @@ typedef unsigned long vhost_log_chunk_t;
struct vhost_log {
unsigned long long size;
int refcnt;
- vhost_log_chunk_t log[0];
+ int fd;
+ vhost_log_chunk_t *log;
};
struct vhost_memory;