mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
1be0ac2109
commit
15324404f6
2 changed files with 49 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue