summaryrefslogtreecommitdiffstats
path: root/include/hw
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/hw
parent1be0ac2109fbaca6e730ac578f0564507d173e2d (diff)
downloadhqemu-15324404f68cde561d0eeee3d18a7b203f57f095.zip
hqemu-15324404f68cde561d0eeee3d18a7b203f57f095.tar.gz
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/hw')
-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 080831e..6bf759f 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;
OpenPOWER on IntegriCloud