From 15324404f68cde561d0eeee3d18a7b203f57f095 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 9 Oct 2015 17:17:25 +0200 Subject: vhost: alloc shareable log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- include/hw/virtio/vhost.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/hw/virtio') 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; -- cgit 1.4.1