[libvirt] add ivshmem property master
吴 雨霖
leiqi96 at hotmail.com
Fri Feb 1 08:10:11 UTC 2019
[Problem Description]
I read qemu-doc.texi in qemu-mster source code, which have a explain of migrating ivshmem below
“With device property @option{master=on}, the guest will copy the shared.memory on migration to the destination host. With @option{master=off}, the guest will not be able to migrate with the device attached.”
However, libvirt library can not recognize the property “master=on”. When I directly used command "qemu-kvm -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,master=on,bus=pci.0,addr=0xa” to launch a guest, qemu support ivshmem property master=on.
So, I suggest adding code to support property master=on in libvirt.
[Code Review]
The below is the part of source code in qemu-master. There's no definition here about ivshmem master.
domain_conf.h
struct _virDomainShmemDef {
char *name;
unsigned long long size;
int model; /* enum virDomainShmemModel */
struct {
bool enabled;
virDomainChrSourceDef chr;
} server;
struct {
bool enabled;
unsigned vectors;
virTristateSwitch ioeventfd;
} msi;
virDomainDeviceInfo info;
};
[changed code]
src/conf/domain_conf.c
src/conf/domain_conf.h
[Detail of Source Code Modification]
src/conf/domain_conf.h
[cid:image001.png at 01D4BA48.57FBFA10]
src/conf/domain_conf.c
[cid:image002.png at 01D4BA48.5B8017C0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190201/4fa45318/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 63C5FD9331664293830EB5F27582F5C9.png
Type: image/png
Size: 7213 bytes
Desc: 63C5FD9331664293830EB5F27582F5C9.png
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190201/4fa45318/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 601FE61D79824617B0EC1C749BB7369F.png
Type: image/png
Size: 16662 bytes
Desc: 601FE61D79824617B0EC1C749BB7369F.png
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190201/4fa45318/attachment-0003.png>
More information about the libvir-list
mailing list