Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/libvirt_private.syms | 2 ++ src/qemu/qemu_command.c | 4 ++++ tests/qemuxml2argvdata/qemuxml2argv-shmem.args | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 409e0c0018e6..31020e6dc207 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -456,6 +456,8 @@ virDomainSeclabelTypeFromString; virDomainSeclabelTypeToString; virDomainShmemModelTypeFromString; virDomainShmemModelTypeToString; +virDomainShmemRoleTypeFromString; +virDomainShmemRoleTypeToString; virDomainShutdownReasonTypeFromString; virDomainShutdownReasonTypeToString; virDomainShutoffReasonTypeFromString; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5eae0631a14f..60d662270cc8 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8583,6 +8583,10 @@ qemuBuildShmemDevStr(virDomainDefPtr def, if (!shmem->server.enabled) { virBufferAsprintf(&buf, ",shm=%s,id=%s", shmem->name, shmem->info.alias); + if (shmem->role) { + virBufferAsprintf(&buf, ",role=%s", + virDomainShmemRoleTypeToString(shmem->role)); + } } else { virBufferAsprintf(&buf, ",chardev=char%s,id=%s", shmem->info.alias, shmem->info.alias); if (shmem->msi.enabled) { diff --git a/tests/qemuxml2argvdata/qemuxml2argv-shmem.args b/tests/qemuxml2argvdata/qemuxml2argv-shmem.args index 89caf499f8dd..dc69f4ab50fb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-shmem.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-shmem.args @@ -18,8 +18,8 @@ QEMU_AUDIO_DRV=none \ -boot c \ -usb \ -device ivshmem,shm=shmem0,id=shmem0,bus=pci.0,addr=0x3 \ --device ivshmem,size=128m,shm=shmem1,id=shmem1,bus=pci.0,addr=0x5 \ --device ivshmem,size=256m,shm=shmem2,id=shmem2,bus=pci.0,addr=0x4 \ +-device ivshmem,size=128m,shm=shmem1,id=shmem1,role=peer,bus=pci.0,addr=0x5 \ +-device ivshmem,size=256m,shm=shmem2,id=shmem2,role=master,bus=pci.0,addr=0x4 \ -device ivshmem,size=512m,chardev=charshmem3,id=shmem3,bus=pci.0,addr=0x6 \ -chardev socket,id=charshmem3,path=/var/lib/libvirt/shmem-shmem3-sock \ -device ivshmem,size=1024m,chardev=charshmem4,id=shmem4,bus=pci.0,addr=0x7 \ -- 2.10.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list