[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

 

src/conf/domain_conf.c