[libvirt] [RFC PATCH 4/5] qemu: Build command line for ivshmem device
Maxime Leroy
maxime.leroy at 6wind.com
Thu Aug 7 15:05:04 UTC 2014
On Wed, Aug 6, 2014 at 12:04 PM, Wang Rui <moon.wangrui at huawei.com> wrote:
> On 2014/8/6 0:48, Maxime Leroy wrote:
>> This patch implements support for the ivshmem device
>> in QEMU.
>>
>> Example from this xml:
>>
>> <ivshmem server='yes'' role='master'/>
>
> s/'yes''/'yes'
>
[..]
>> + virCommandAddArg(cmd, "-device");
>> + if (!(devstr = qemuBuildIvshmemDevStr(def, ivshmem, qemuCaps)))
>> + goto error;
>> + virCommandAddArg(cmd, devstr);
>> + VIR_FREE(devstr);
>> +
>> + if (ivshmem->use_server == VIR_DOMAIN_IVSHMEM_SERVER_ENABLED) {
>> + virDomainChrSourceDef source;
>> +
>> + source.type = VIR_DOMAIN_CHR_TYPE_UNIX;
>> + source.data.nix.path = ivshmem->file;
>> + source.data.nix.listen = false;
>> +
>> + virCommandAddArg(cmd, "-chardev");
>
> In qemuBuildCommandLine() , "-device" and "-chardev" capabilities are checked
> before most(not all) of virCommandAddArg for devices. I think that will be
> nicer.
>
ok, I will update accordingly.
More information about the libvir-list
mailing list