|
|
127bba |
From fda2c7a3be95b163c88132fe98ce19e2e624aa02 Mon Sep 17 00:00:00 2001
|
|
|
127bba |
Message-Id: <fda2c7a3be95b163c88132fe98ce19e2e624aa02@dist-git>
|
|
|
127bba |
From: Martin Kletzander <mkletzan@redhat.com>
|
|
|
127bba |
Date: Thu, 10 Nov 2016 10:16:59 +0100
|
|
|
127bba |
Subject: [PATCH] qemu: Make sure shmem memory is shared
|
|
|
127bba |
|
|
|
127bba |
Even though using /dev/shm/asdf as the backend, we still need to make
|
|
|
127bba |
the mapping shared. The original patch forgot to add that parameter.
|
|
|
127bba |
|
|
|
127bba |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1392031
|
|
|
127bba |
|
|
|
127bba |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
127bba |
(cherry picked from commit 5672a265ce061827595be2270f29e8eb920313bd)
|
|
|
127bba |
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
127bba |
---
|
|
|
127bba |
src/qemu/qemu_command.c | 1 +
|
|
|
127bba |
tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args | 6 +++---
|
|
|
127bba |
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
127bba |
|
|
|
127bba |
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
|
|
127bba |
index dd8f60f..43e1a93 100644
|
|
|
127bba |
--- a/src/qemu/qemu_command.c
|
|
|
127bba |
+++ b/src/qemu/qemu_command.c
|
|
|
127bba |
@@ -8580,6 +8580,7 @@ qemuBuildShmemBackendMemProps(virDomainShmemDefPtr shmem)
|
|
|
127bba |
virJSONValueObjectCreate(&ret,
|
|
|
127bba |
"s:mem-path", mem_path,
|
|
|
127bba |
"U:size", shmem->size,
|
|
|
127bba |
+ "b:share", true,
|
|
|
127bba |
NULL);
|
|
|
127bba |
|
|
|
127bba |
VIR_FREE(mem_path);
|
|
|
127bba |
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args b/tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args
|
|
|
127bba |
index 7abc7f8..688b7c7 100644
|
|
|
127bba |
--- a/tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args
|
|
|
127bba |
+++ b/tests/qemuxml2argvdata/qemuxml2argv-shmem-plain-doorbell.args
|
|
|
127bba |
@@ -18,13 +18,13 @@ QEMU_AUDIO_DRV=none \
|
|
|
127bba |
-boot c \
|
|
|
127bba |
-usb \
|
|
|
127bba |
-object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/shmem0,\
|
|
|
127bba |
-size=4194304 \
|
|
|
127bba |
+size=4194304,share=yes \
|
|
|
127bba |
-device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,bus=pci.0,addr=0x3 \
|
|
|
127bba |
-object memory-backend-file,id=shmmem-shmem1,mem-path=/dev/shm/shmem1,\
|
|
|
127bba |
-size=134217728 \
|
|
|
127bba |
+size=134217728,share=yes \
|
|
|
127bba |
-device ivshmem-plain,id=shmem1,memdev=shmmem-shmem1,bus=pci.0,addr=0x5 \
|
|
|
127bba |
-object memory-backend-file,id=shmmem-shmem2,mem-path=/dev/shm/shmem2,\
|
|
|
127bba |
-size=268435456 \
|
|
|
127bba |
+size=268435456,share=yes \
|
|
|
127bba |
-device ivshmem-plain,id=shmem2,memdev=shmmem-shmem2,bus=pci.0,addr=0x4 \
|
|
|
127bba |
-device ivshmem-doorbell,id=shmem3,chardev=charshmem3,ioeventfd=on,bus=pci.0,\
|
|
|
127bba |
addr=0x6 \
|
|
|
127bba |
--
|
|
|
127bba |
2.10.2
|
|
|
127bba |
|