]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Make sure shmem memory is shared
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 10 Nov 2016 07:20:07 +0000 (08:20 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 10 Nov 2016 07:31:19 +0000 (08:31 +0100)
Even though using /dev/shm/asdf as the backend, we still need to make
the mapping shared.  The original patch forgot to add that parameter.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1392031

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args

index caa80e74c26aed1851df0082c9d0cab3047a5366..d3f99d34c67f4ad448b134c84455fa46a60960f5 100644 (file)
@@ -8565,6 +8565,7 @@ qemuBuildShmemBackendMemProps(virDomainShmemDefPtr shmem)
     virJSONValueObjectCreate(&ret,
                              "s:mem-path", mem_path,
                              "U:size", shmem->size,
+                             "b:share", true,
                              NULL);
 
     VIR_FREE(mem_path);
index 7abc7f8c4be5d88f734f8e44033d6a46b8118bfd..688b7c7f63e2ad704f44797420be99d7ed41167e 100644 (file)
@@ -18,13 +18,13 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -usb \
 -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/shmem0,\
-size=4194304 \
+size=4194304,share=yes \
 -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,bus=pci.0,addr=0x3 \
 -object memory-backend-file,id=shmmem-shmem1,mem-path=/dev/shm/shmem1,\
-size=134217728 \
+size=134217728,share=yes \
 -device ivshmem-plain,id=shmem1,memdev=shmmem-shmem1,bus=pci.0,addr=0x5 \
 -object memory-backend-file,id=shmmem-shmem2,mem-path=/dev/shm/shmem2,\
-size=268435456 \
+size=268435456,share=yes \
 -device ivshmem-plain,id=shmem2,memdev=shmmem-shmem2,bus=pci.0,addr=0x4 \
 -device ivshmem-doorbell,id=shmem3,chardev=charshmem3,ioeventfd=on,bus=pci.0,\
 addr=0x6 \