Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread Wang Rui
On 2014/8/28 5:20, Maxime Leroy wrote: On Tue, Aug 26, 2014 at 11:58 AM, Wang Rui moon.wang...@huawei.com wrote: On 2014/8/22 18:47, Maxime Leroy wrote: +# util/virivshmemserver.h +virStartIvshmemServer; +virStopIvshmemServer; I think function name virIvshmemStartServer is better. So is

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread David Marchand
Hello Martin, On 08/26/2014 11:33 AM, Martin Kletzander wrote: [Cc'ing David due to some questions/ideas about the ivshmem server] @@ -5120,6 +5121,12 @@ qemuBuildIvshmemCommandLine(virCommandPtr cmd, return -1; virCommandAddArg(cmd, devstr);

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread Martin Kletzander
On Thu, Aug 28, 2014 at 02:35:10PM +0800, Wang Rui wrote: On 2014/8/28 5:20, Maxime Leroy wrote: On Tue, Aug 26, 2014 at 11:58 AM, Wang Rui moon.wang...@huawei.com wrote: On 2014/8/22 18:47, Maxime Leroy wrote: +# util/virivshmemserver.h +virStartIvshmemServer; +virStopIvshmemServer; I

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread Martin Kletzander
On Thu, Aug 28, 2014 at 10:34:11AM +0200, David Marchand wrote: Hello Martin, On 08/26/2014 11:33 AM, Martin Kletzander wrote: [Cc'ing David due to some questions/ideas about the ivshmem server] @@ -5120,6 +5121,12 @@ qemuBuildIvshmemCommandLine(virCommandPtr cmd, return -1;

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread David Marchand
On 08/28/2014 12:34 PM, Martin Kletzander wrote: Great! Really, and it's even easier than what I thought of. We just need to kill the server if we fail to start QEMU after starting the server. There is one caveat, though. There is a race between libvirt checking whether the socket exists

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread David Marchand
On 08/28/2014 02:26 PM, David Marchand wrote: I'm not sure, though, what to do with the first point (race between libvirt creating the socket to see that it exists and ivshmem disconnecting). Maybe libvirt could do this (if QEMU would support it): 1: try to create the socket (if it exists,

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-28 Thread Martin Kletzander
On Thu, Aug 28, 2014 at 03:46:47PM +0200, David Marchand wrote: On 08/28/2014 02:26 PM, David Marchand wrote: I'm not sure, though, what to do with the first point (race between libvirt creating the socket to see that it exists and ivshmem disconnecting). Maybe libvirt could do this (if

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-27 Thread Maxime Leroy
On Tue, Aug 26, 2014 at 11:58 AM, Wang Rui moon.wang...@huawei.com wrote: On 2014/8/22 18:47, Maxime Leroy wrote: +# util/virivshmemserver.h +virStartIvshmemServer; +virStopIvshmemServer; I think function name virIvshmemStartServer is better. So is the stop function. What about

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-26 Thread Martin Kletzander
[Cc'ing David due to some questions/ideas about the ivshmem server] On Fri, Aug 22, 2014 at 12:47:05PM +0200, Maxime Leroy wrote: With the new start param, we are able to start the ivshmem-server. With this xml: shmem name='ivshmem0' model='ivshmem' server path='/tmp/ivshmem0.sock'

Re: [libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-26 Thread Wang Rui
On 2014/8/22 18:47, Maxime Leroy wrote: +# util/virivshmemserver.h +virStartIvshmemServer; +virStopIvshmemServer; I think function name virIvshmemStartServer is better. So is the stop function. @@ -5120,6 +5121,12 @@ qemuBuildIvshmemCommandLine(virCommandPtr cmd, return

[libvirt] [PATCH v1 6/6] ivshmem: add start param to server attribute

2014-08-22 Thread Maxime Leroy
With the new start param, we are able to start the ivshmem-server. With this xml: shmem name='ivshmem0' model='ivshmem' server path='/tmp/ivshmem0.sock' start='yes'/ size unit='M'32/size msi vectors='32' ioeventfd='on'/ /shmem Libvirt will execute an ivshmem-server: