Re: [libvirt] [PATCH] vbox: fix VIR_STRDUP value check

2013-05-21 Thread Ján Tomko
On 05/20/2013 05:08 PM, Michal Privoznik wrote: > On 20.05.2013 11:59, Ján Tomko wrote: >> In my review of 31532ca I missed the fact that VIR_STRDUP >> now returns 1 on success, and 0 if the source was NULL. >> >> (This still doesn't add proper OOM error handling.) >> --- >> src/vbox/vbox_tmpl.c |

Re: [libvirt] [PATCH 0/3 v4] add 'sharePolicy' attribute for qemu vnc sharing policy

2013-05-21 Thread Ján Tomko
On 05/21/2013 04:31 PM, Guannan Ren wrote: > > v3->v4 > add missing .args, .xml files > (I raw it in git Untracked files this morning and >thought about it for a while, then git-cleaned them...) > rebase work. > > v2->v3 > rebase work. > > v1->v2: > changed attribute name from 'pol

Re: [libvirt] [PATCH 31/31] syntax-check: Add the rule to forbid whitespace before "; "

2013-05-21 Thread Osier Yang
On 21/05/13 23:40, Eric Blake wrote: On 05/21/2013 04:01 AM, Osier Yang wrote: Only a few cases are allowed: 1) The expression is empty for "for" loop, E.g. for (i = 0; ; i++) 2) An empty statement while (write(statuswrite, &status, 1) == -1 && errno == EINTR) ; /* emp

Re: [libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Osier Yang
On 21/05/13 23:41, Ján Tomko wrote: s/nwfitler/nwfilter/ in the subject Thanks, pushed with the fix. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/3] Fix the syntax-check failure

2013-05-21 Thread Osier Yang
Introduced by commit 7ac2c4fe624, pushed under build-breaker rule. --- src/conf/interface_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/interface_conf.h b/src/conf/interface_conf.h index ae93811..ed6986c 100644 --- a/src/conf/interface_conf.h +++ b/src/conf/in

[libvirt] [PATCH 1/2] util: add virGetGroupList

2013-05-21 Thread Eric Blake
Since neither getpwuid_r() nor initgroups() are safe to call in between fork and exec (they obtain a mutex, but if some other thread in the parent also held the mutex at the time of the fork, the child will deadlock), we have to split out the functionality that is unsafe. This patch adds a nice wr

[libvirt] [PATCH 2/2] util: make virSetUIDGID async-signal-safe

2013-05-21 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 POSIX states that multi-threaded apps should not use functions that are not async-signal-safe between fork and exec, yet we were using getpwuid_r and initgroups. Although rare, it is possible to hit deadlock in the child, when it tries to grab a

[libvirt] [PATCH 0/2] avoid getpwuid_r deadlock

2013-05-21 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=964358 Posting now to get reviews started. I'd especially like to get feedback that it doesn't break LXC, and that it works with root-squash NFS when using qemu:qemu instead of root:root in /etc/libvirt/qemu.conf. I hope to do more testing myself, and a

[libvirt] Remove OPTION section in output of 'virsh help command' if no option exists.

2013-05-21 Thread Zhang Xiaohe
Don't print 'OPTION' if there's no options. Just behaves as DESCRIPTION does. This mostly affects 'interface' command group. Signed-off-by: Zhang Xiaohe Reported-by: Li Yang --- tools/virsh.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/vir

Re: [libvirt] [PATCH v2] interface: list all interfaces with flags == 0

2013-05-21 Thread Guannan Ren
On 05/21/2013 10:51 PM, Eric Blake wrote: On 05/21/2013 07:29 AM, Guannan Ren wrote: virConnectListAllInterfaces should support to list all of interfaces when the value of flags is 0. The behaviour is consistent with other virConnectListAll* APIs --- src/conf/interface_conf.h |

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Tue, May 21, 2013 at 11:12:26AM -0600, Eric Blake wrote: >> I have also argued in the past that it would be useful for libvirt to >> support the idea of a template, where you can specify a domain XML that >> inherits defaults from the template. We've already don

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 11:12:26AM -0600, Eric Blake wrote: > On 05/21/2013 10:42 AM, Anthony Liguori wrote: > > Perhaps the right thing to do for OpenStack is to allow for a user > > specified configuration file to select things like the default hardware > > models/machine types? Then this could

Re: [libvirt] [PATCH v4 01/13] Adapt to VIR_STRDUP and VIR_STRNDUP in src/conf/*

2013-05-21 Thread Eric Blake
On 05/21/2013 03:14 AM, Michal Privoznik wrote: >>> @@ -392,17 +392,14 @@ virCapabilitiesAddGuest(virCapsPtr caps, >>> if (VIR_ALLOC(guest) < 0) >>> goto no_memory; >>> >>> -if ((guest->ostype = strdup(ostype)) == NULL) >>> +if (VIR_STRDUP(guest->ostype, ostype) < 0) >>>

Re: [libvirt] [PATCH] cgroup: be robust against cgroup movement races

2013-05-21 Thread Eric Blake
On 05/21/2013 03:43 AM, Daniel P. Berrange wrote: > On Mon, May 20, 2013 at 09:07:17PM -0600, Eric Blake wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=965169 documents a >> problem starting domains when cgroups are enabled; I was able >> to reliably reproduce the race about 5% of the time w

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Eric Blake
On 05/21/2013 10:42 AM, Anthony Liguori wrote: > Perhaps the right thing to do for OpenStack is to allow for a user > specified configuration file to select things like the default hardware > models/machine types? Then this could become node configuration instead > of dynamic configuration. > > I

Re: [libvirt] [PATCHv4 4/4] qemu: Enable multiqueue network

2013-05-21 Thread Laine Stump
On 05/21/2013 10:18 AM, Michal Privoznik wrote: > --- > src/qemu/qemu_command.c | 36 > src/qemu/qemu_hotplug.c | 37 ++--- > 2 files changed, 54 insertions(+), 19 deletions(-) > > diff --git a/src/qemu/qemu_command.c b/src/qemu/

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Tue, May 21, 2013 at 07:55:27PM +1000, Paul Mackerras wrote: >> On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: >> I think libvirt needs some more sensible way to ask qemu what its >> capabilities are. Currently it has no way to ask qemu "wha

Re: [libvirt] [PATCHv4 3/4] qemu: Adapt qemuBuildInterfaceCommandLine to to multiqueue net

2013-05-21 Thread Laine Stump
On 05/21/2013 10:18 AM, Michal Privoznik wrote: > In order to learn libvirt multiqueue several things must be done: > > 1) The '/dev/net/tun' device needs to be opened multiple times with > IFF_MULTI_QUEUE flag passed to ioctl(fd, TUNSETIFF, &ifr); > > 2) Similar, the '/dev/vhost-net' must be opene

Re: [libvirt] [PATCH] libvirt writes an mcs translation file to /run/setrans directory

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 09:12:49AM -0400, dwa...@redhat.com wrote: > From: Dan Walsh > > mcstransd is a translation tool that can translate MCS Labels into human > understandable code. I have patched it to watch for translation files in the > /run/setrans directory. This allows us to run comman

Re: [libvirt] [PATCH] interface: list all interfaces with flags == 0

2013-05-21 Thread Guan Nan Ren
Impressive. :) - Original Message - From: "Eric Blake" To: "Guannan Ren" Cc: libvir-list@redhat.com Sent: Tuesday, May 21, 2013 10:49:57 PM Subject: Re: [libvirt] [PATCH] interface: list all interfaces with flags == 0 On 05/21/2013 06:49 AM, Guannan Ren wrote: Guannan's logic says whe

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Laine Stump
On 05/21/2013 11:34 AM, Daniel P. Berrange wrote: > On Tue, May 21, 2013 at 11:29:26AM -0400, Laine Stump wrote: >> On 05/21/2013 07:44 AM, Ján Tomko wrote: >>> On 05/21/2013 01:37 PM, Laine Stump wrote: On 05/21/2013 04:03 AM, Ján Tomko wrote: > On 05/21/2013 09:32 AM, Dominik Mostowiec w

Re: [libvirt] [PATCH 08/31] src/phyp: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
On 21/05/13 23:37, Eric Blake wrote: On 05/21/2013 04:00 AM, Osier Yang wrote: --- src/phyp/phyp_driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ACK for being mechanical. However... diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 4594cbf..70d3adb 10

Re: [libvirt] [PATCH 31/31] syntax-check: Add the rule to forbid whitespace before "; "

2013-05-21 Thread Eric Blake
On 05/21/2013 04:01 AM, Osier Yang wrote: > Only a few cases are allowed: > > 1) The expression is empty for "for" loop, E.g. > > for (i = 0; ; i++) > > 2) An empty statement > > while (write(statuswrite, &status, 1) == -1 && > errno == EINTR) > ; /* empty */ > > 3) ";" is i

Re: [libvirt] [PATCHv4 2/4] qemu: Move interface cmd line construction into a separate function

2013-05-21 Thread Laine Stump
On 05/21/2013 10:18 AM, Michal Privoznik wrote: > Currently, we have one huge function to construct qemu command line. > This is very ineffective esp. if there's a fault somewhere. > --- > src/qemu/qemu_command.c | 224 > +--- > 1 file changed, 117 inse

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Laine Stump
On 05/21/2013 07:44 AM, Ján Tomko wrote: > On 05/21/2013 01:37 PM, Laine Stump wrote: >> On 05/21/2013 04:03 AM, Ján Tomko wrote: >>> On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: hi, I try to add 2 VF by "hostdev". Networks (vnet0, vnet1) with: . >>

Re: [libvirt] [PATCHv4 1/4] Introduce /domain/devices/interface/driver/@queues attribute

2013-05-21 Thread Laine Stump
On 05/21/2013 10:18 AM, Michal Privoznik wrote: > This attribute is going to represent number of queues for > multique vhost network interface. This commit implements XML > extension part of the feature and add one test as well. For now, > we can only do xml2xml test as qemu command line generation

Re: [libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Eric Blake
On 05/21/2013 04:01 AM, Osier Yang wrote: > The more common habit is to add the comment after the statements. > --- > src/nwfilter/nwfilter_dhcpsnoop.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c > b/src/nwfilter/nwfilter_dhcpsno

Re: [libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Ján Tomko
s/nwfitler/nwfilter/ in the subject Jan -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 08/31] src/phyp: Remove the whitespace before '; '

2013-05-21 Thread Eric Blake
On 05/21/2013 04:00 AM, Osier Yang wrote: > --- > src/phyp/phyp_driver.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) ACK for being mechanical. However... > > diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c > index 4594cbf..70d3adb 100644 > --- a/src/phyp/phyp_dri

Re: [libvirt] [PATCH 01/31] src/network: Remove the whitespace before '; '

2013-05-21 Thread Eric Blake
On 05/21/2013 04:00 AM, Osier Yang wrote: > --- > src/network/bridge_driver.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description

Re: [libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Osier Yang
On 21/05/13 23:35, Eric Blake wrote: On 05/21/2013 04:01 AM, Osier Yang wrote: The more common habit is to add the comment after the statements. --- src/nwfilter/nwfilter_dhcpsnoop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/s

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 11:29:26AM -0400, Laine Stump wrote: > On 05/21/2013 07:44 AM, Ján Tomko wrote: > > On 05/21/2013 01:37 PM, Laine Stump wrote: > >> On 05/21/2013 04:03 AM, Ján Tomko wrote: > >>> On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: > hi, > I try to add 2 VF by "hostdev

Re: [libvirt] [PATCH] qemu: Don't remove the "return 0"

2013-05-21 Thread Osier Yang
On 21/05/13 23:07, Eric Blake wrote: On 05/21/2013 09:04 AM, Osier Yang wrote: Commit f60a50c7957 intended to remove the warning only, but not with the "return 0" together. --- src/qemu/qemu_cgroup.c | 2 ++ 1 file changed, 2 insertions(+) ACK. Pushed, thanks. -- libvir-list mailing list l

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 17:55, Paul Mackerras wrote: On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: On Tue, May 21, 2013 at 09:31:26AM +0100, Peter Maydell wrote: On 21 May 2013 09:19, Li Zhang wrote: We encounter this problem in openstack which always use default machine type. Cu

Re: [libvirt] [PATCH 03/31] src/conf: Remove the whitespace before '; '

2013-05-21 Thread Eric Blake
On 05/21/2013 04:00 AM, Osier Yang wrote: > --- > src/conf/capabilities.c | 50 +- > src/conf/cpu_conf.c | 14 +-- > src/conf/domain_audit.c | 10 +- > src/conf/domain_conf.c | 230 > ++-- > src/conf/domain_event.c | 32

Re: [libvirt] [PATCH] qemu: Don't remove the "return 0"

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 11:04:36PM +0800, Osier Yang wrote: > Commit f60a50c7957 intended to remove the warning only, but not with > the "return 0" together. > --- > src/qemu/qemu_cgroup.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c >

Re: [libvirt] [PATCH 02/31] src/libxl: Remove the whitespace before '; '

2013-05-21 Thread Eric Blake
On 05/21/2013 04:00 AM, Osier Yang wrote: > --- > src/libxl/libxl_conf.c | 4 ++-- > src/libxl/libxl_driver.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) ACK. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc

Re: [libvirt] [PATCH] qemu: Don't remove the "return 0"

2013-05-21 Thread Eric Blake
On 05/21/2013 09:04 AM, Osier Yang wrote: > Commit f60a50c7957 intended to remove the warning only, but not with > the "return 0" together. > --- > src/qemu/qemu_cgroup.c | 2 ++ > 1 file changed, 2 insertions(+) ACK. > > diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c > index ff9a

[libvirt] [PATCH] qemu: Don't remove the "return 0"

2013-05-21 Thread Osier Yang
Commit f60a50c7957 intended to remove the warning only, but not with the "return 0" together. --- src/qemu/qemu_cgroup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index ff9a075..fb88802 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/q

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Li Zhang
On 2013年05月21日 17:25, Daniel P. Berrange wrote: On Tue, May 21, 2013 at 05:02:51PM +0800, Li Zhang wrote: On 2013年05月21日 16:45, Peter Maydell wrote: On 21 May 2013 09:39, Daniel P. Berrange wrote: Libvirt has always had support for specifying what machine type to use. This discussion is simpl

Re: [libvirt] [PATCH 2/7] qemu: Abstract code for memory controller setting into a helper

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 04:56:37PM +0200, Viktor Mihajlovski wrote: > On 05/20/2013 01:35 PM, Osier Yang wrote: > >>>(!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) { > >>>+if (vm->def->mem.hard_limit != 0 || > >>>+vm->def->mem.soft_limit != 0 || > >>>+

Re: [libvirt] [PATCH 2/7] qemu: Abstract code for memory controller setting into a helper

2013-05-21 Thread Osier Yang
On 21/05/13 22:56, Viktor Mihajlovski wrote: On 05/20/2013 01:35 PM, Osier Yang wrote: (!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) { +if (vm->def->mem.hard_limit != 0 || +vm->def->mem.soft_limit != 0 || +vm->def->mem.swap_hard_limit != 0)

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Christian Borntraeger
On 21/05/13 14:04, Anthony Liguori wrote: > "Daniel P. Berrange" writes: > >> On Tue, May 21, 2013 at 07:55:27PM +1000, Paul Mackerras wrote: >>> On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: QEMU has the notion of a default machine for each target, and that is wha

Re: [libvirt] [PATCH 2/7] qemu: Abstract code for memory controller setting into a helper

2013-05-21 Thread Viktor Mihajlovski
On 05/20/2013 01:35 PM, Osier Yang wrote: (!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) { +if (vm->def->mem.hard_limit != 0 || +vm->def->mem.soft_limit != 0 || +vm->def->mem.swap_hard_limit != 0) { +virReportError(VIR_ERR_CONFIG_U

Re: [libvirt] [PATCH v2] interface: list all interfaces with flags == 0

2013-05-21 Thread Eric Blake
On 05/21/2013 07:29 AM, Guannan Ren wrote: > virConnectListAllInterfaces should support to list all of > interfaces when the value of flags is 0. The behaviour is > consistent with other virConnectListAll* APIs > --- > src/conf/interface_conf.h | 4 > src/interface/interface_ba

Re: [libvirt] [PATCH] interface: list all interfaces with flags == 0

2013-05-21 Thread Eric Blake
On 05/21/2013 06:49 AM, Guannan Ren wrote: Guannan's logic says when to drop: >>> +if (MATCH(VIR_CONNECT_LIST_INTERFACES_FILTERS_ACTIVE) && >>> +!((MATCH(VIR_CONNECT_LIST_INTERFACES_ACTIVE) && >>> + (status & NETCF_IFACE_ACTIVE)) || >>> + (MATCH(VIR_

[libvirt] [PATCH 2/3 v4] conf: add 'sharePolicy' attribute to graphics element for vnc

2013-05-21 Thread Guannan Ren
-vnc :5900,share=allow-exclusive allows clients to ask for exclusive access which is implemented by dropping other connections Connecting multiple clients in parallel requires all clients asking for a shared session (vncviewer: -shared switch) -vnc :5900,share=force-shared disables exclusive cli

[libvirt] [PATCH 1/3 v4] qemu: new vnc display sharing policy caps flag

2013-05-21 Thread Guannan Ren
QEMU_CAPS_VNC_SHARE_POLICY (qemu >= 1.1) --- src/qemu/qemu_capabilities.c | 7 ++- src/qemu/qemu_capabilities.h | 1 + tests/qemuhelptest.c | 9 ++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 8

[libvirt] [PATCHv4 2/4] qemu: Move interface cmd line construction into a separate function

2013-05-21 Thread Michal Privoznik
Currently, we have one huge function to construct qemu command line. This is very ineffective esp. if there's a fault somewhere. --- src/qemu/qemu_command.c | 224 +--- 1 file changed, 117 insertions(+), 107 deletions(-) diff --git a/src/qemu/qemu_comma

[libvirt] [PATCH 3/3 v4] qemu: add ', share=' to qemu commandline

2013-05-21 Thread Guannan Ren
example: qemu ${otherargs} \ -vnc 127.0.0.1:0,share=allow-exclusive --- src/qemu/qemu_command.c| 36 ++ tests/qemuargv2xmltest.c | 1 + .../qemuxml2argv-graphics-vnc-policy.args | 4 +++ .../qemuxml2a

[libvirt] [PATCH 0/3 v4] add 'sharePolicy' attribute for qemu vnc sharing policy

2013-05-21 Thread Guannan Ren
v3->v4 add missing .args, .xml files (I raw it in git Untracked files this morning and thought about it for a while, then git-cleaned them...) rebase work. v2->v3 rebase work. v1->v2: changed attribute name from 'policy' to 'sharePolicy' renamed caps flag name: QEMU_CAPS_VNC_SHARE

Re: [libvirt] [PATCH] udev: should not list bridge devices

2013-05-21 Thread Guannan Ren
On 05/21/2013 10:09 PM, Laine Stump wrote: On 05/21/2013 09:28 AM, Guannan Ren wrote: When using udev backend, virsh iface-list outputs bridge devices like: Name State MAC Address em1 active e8:39:35:58:

[libvirt] [PATCHv4 3/4] qemu: Adapt qemuBuildInterfaceCommandLine to to multiqueue net

2013-05-21 Thread Michal Privoznik
In order to learn libvirt multiqueue several things must be done: 1) The '/dev/net/tun' device needs to be opened multiple times with IFF_MULTI_QUEUE flag passed to ioctl(fd, TUNSETIFF, &ifr); 2) Similar, the '/dev/vhost-net' must be opened as many times as in 1) in order to keep 1:1 ratio recomm

Re: [libvirt] [PATCH] udev: should not list bridge devices

2013-05-21 Thread Laine Stump
On 05/21/2013 09:28 AM, Guannan Ren wrote: > When using udev backend, virsh iface-list outputs bridge devices > like: > Name State MAC Address > > em1 active e8:39:35:58:d5:94 > lo active

[libvirt] [PATCHv4 4/4] qemu: Enable multiqueue network

2013-05-21 Thread Michal Privoznik
--- src/qemu/qemu_command.c | 36 src/qemu/qemu_hotplug.c | 37 ++--- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7059b08..0474670 100644 --- a/src/qemu

[libvirt] [PATCHv4 1/4] Introduce /domain/devices/interface/driver/@queues attribute

2013-05-21 Thread Michal Privoznik
This attribute is going to represent number of queues for multique vhost network interface. This commit implements XML extension part of the feature and add one test as well. For now, we can only do xml2xml test as qemu command line generation code is not adapted yet. --- docs/formatdomain.html.in

[libvirt] [PATCHv4 0/4] Multiple TX queue support

2013-05-21 Thread Michal Privoznik
Fixed version with Laine's comments worked in [1]. Moreover, most of the patches joined together. Patches 2, 3 and 5 has been ACKed already. BTW, patch 4 is really a different to patch 3. The only thing they share is a commit message body. Kernel and subsequently QEMU learned multiple transmit qu

[libvirt] [PATCH] libvirt writes an mcs translation file to /run/setrans directory

2013-05-21 Thread dwalsh
From: Dan Walsh mcstransd is a translation tool that can translate MCS Labels into human understandable code. I have patched it to watch for translation files in the /run/setrans directory. This allows us to run commands like ps -eZ and see system_u:system_r:svirt_t:Fedora18 rather then system

[libvirt] This patch fixes up a previous patch to work in containers

2013-05-21 Thread dwalsh
It also adds the ability to pass in privileged field into Security Manager so that writing to /run/setrans only attempted on privileged machines [PATCH] libvirt writes an mcs translation file to /run/setrans -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listin

Re: [libvirt] [PATCH 3/3 v3] qemu: add ', share=' to qemu commandline

2013-05-21 Thread Ján Tomko
On 05/16/2013 03:00 PM, Guannan Ren wrote: > example: qemu ${otherargs} \ > -vnc 127.0.0.1:0,share=allow-exclusive > --- > src/qemu/qemu_command.c | 36 > tests/qemuargv2xmltest.c | 1 + > tests/qemuxml2argvtest.c | 1 + You forgot to add the .a

Re: [libvirt] [PATCH 0/3] Resolve Coverity found issues

2013-05-21 Thread John Ferlan
On 05/16/2013 10:01 AM, John Ferlan wrote: > Upgraded to Coverity 6.5.3 which uncovered a few code paths with issues. > > John Ferlan (3): > lxc_process: Resolve Coverity NULL_RETURNS error > xencapstest: Resolve Coverity CHECKED_RETURN error > shunloadtest: Resolve Coverity CHECKED_RETURN e

[libvirt] [PATCH v2] interface: list all interfaces with flags == 0

2013-05-21 Thread Guannan Ren
virConnectListAllInterfaces should support to list all of interfaces when the value of flags is 0. The behaviour is consistent with other virConnectListAll* APIs --- src/conf/interface_conf.h | 4 src/interface/interface_backend_netcf.c | 29 +++-- src/i

[libvirt] [PATCH] udev: should not list bridge devices

2013-05-21 Thread Guannan Ren
When using udev backend, virsh iface-list outputs bridge devices like: Name State MAC Address em1 active e8:39:35:58:d5:94 lo active 00:00:00:00:00:00 virbr0 active fe

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Dominik Mostowiec
Hmm, It seems to be working (after only simple tests). -- Dominik 2013/5/21 Ján Tomko > On 05/21/2013 01:37 PM, Laine Stump wrote: > > On 05/21/2013 04:03 AM, Ján Tomko wrote: > >> On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: > >>> hi, > >>> I try to add 2 VF by "hostdev". > >>> Networks (

Re: [libvirt] [PATCH 06/11] Convert Xen domain VCPU driver methods to use virDomainDefPtr

2013-05-21 Thread Daniel P. Berrange
On Mon, May 20, 2013 at 12:14:04PM -0600, Jim Fehlig wrote: > Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Introduce use of a virDomainDefPtr in the domain VCPU > > APIs to simplify introduction of ACL security checks. > > The virDomainPtr cannot be safely used, since the app >

Re: [libvirt] [PATCH 05/11] Convert Xen domain start/migration APIs to use virDomainDefPtr

2013-05-21 Thread Daniel P. Berrange
On Mon, May 20, 2013 at 11:40:34AM -0600, Jim Fehlig wrote: > I finally have some time to continue reviewing this series... > > Daniel P. Berrange wrote: > > From: "Daniel P. Berrange" > > > > Introduce use of a virDomainDefPtr in the domain migrate & > > start APIs to simplify introduction of AC

Re: [libvirt] [PATCH] interface: list all interfaces with flags == 0

2013-05-21 Thread Guannan Ren
On 05/21/2013 08:15 PM, Jiri Denemark wrote: On Tue, May 21, 2013 at 17:05:09 +0800, Guan Nan Ren wrote: virConnectListAllInterfaces should support to list all of interfaces when the value of flags is 0. The behaviour is consistent with other virConnectListAll* APIs --- diff --git a/src/interfac

Re: [libvirt] [PATCH] interface: list all interfaces with flags == 0

2013-05-21 Thread Jiri Denemark
On Tue, May 21, 2013 at 17:05:09 +0800, Guan Nan Ren wrote: > virConnectListAllInterfaces should support to list all of > interfaces when the value of flags is 0. The behaviour is > consistent with other virConnectListAll* APIs > --- > diff --git a/src/interface/interface_backend_netcf.c > b/src/i

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Peter Maydell
On 21 May 2013 13:04, Anthony Liguori wrote: > We've talked in the past about having an accelerator specific machine > default. I think this is a perfectly reasonable thing to do and would > solve the problem for ARM and for PPC. For ARM I would prefer not to have a default at all, and make the

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Tue, May 21, 2013 at 07:55:27PM +1000, Paul Mackerras wrote: >> On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: >> > QEMU has the notion of a default machine for each target, and that is >> > what libvirt uses if the user hasn't specified a ma

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Ján Tomko
On 05/21/2013 01:37 PM, Laine Stump wrote: > On 05/21/2013 04:03 AM, Ján Tomko wrote: >> On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: >>> hi, >>> I try to add 2 VF by "hostdev". >>> Networks (vnet0, vnet1) with: >>> >>> >>> . >>> >>> Domain: >>> >>> >>

Re: [libvirt] two hostdev devices problem

2013-05-21 Thread Laine Stump
On 05/21/2013 04:03 AM, Ján Tomko wrote: > On 05/21/2013 09:32 AM, Dominik Mostowiec wrote: >> hi, >> I try to add 2 VF by "hostdev". >> Networks (vnet0, vnet1) with: >> >> >> . >> >> Domain: >> >> >> >> >> >> >> >> virsh create er

Re: [libvirt] [PATCH] qemu: fix a typo in qemuAddSharedDevice

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 06:40:34PM +0800, Guannan Ren wrote: > --- > src/qemu/qemu_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c > index 41fe0b9..7266d3b 100644 > --- a/src/qemu/qemu_conf.c > +++ b/src/qemu/qemu_conf.c

Re: [libvirt] [PATCH] qemu: fix a typo in qemuAddSharedDevice

2013-05-21 Thread Osier Yang
On 21/05/13 18:40, Guannan Ren wrote: --- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 41fe0b9..7266d3b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1184,7 +1184,7 @@ qemuAddShared

[libvirt] [PATCH] qemu: fix a typo in qemuAddSharedDevice

2013-05-21 Thread Guannan Ren
--- src/qemu/qemu_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 41fe0b9..7266d3b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1184,7 +1184,7 @@ qemuAddSharedDevice(virQEMUDriverPtr driver, if (d

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Peter Maydell
On 21 May 2013 11:01, Daniel P. Berrange wrote: > On Tue, May 21, 2013 at 07:55:27PM +1000, Paul Mackerras wrote: >> I think libvirt needs some more sensible way to ask qemu what its >> capabilities are. Currently it has no way to ask qemu "what machines >> can you emulate with kvm acceleration?"

[libvirt] [PATCH 24/31] src/remote: Remove the whitespace before "; "

2013-05-21 Thread Osier Yang
--- src/remote/remote_driver.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 13212d0..229a188 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -524,7 +524,7 @@

Re: [libvirt] [Qemu-devel] [qemu-devel] Default machine type setting for ppc64

2013-05-21 Thread Daniel P. Berrange
On Tue, May 21, 2013 at 07:55:27PM +1000, Paul Mackerras wrote: > On Tue, May 21, 2013 at 09:39:53AM +0100, Daniel P. Berrange wrote: > > On Tue, May 21, 2013 at 09:31:26AM +0100, Peter Maydell wrote: > > > On 21 May 2013 09:19, Li Zhang wrote: > > > > We encounter this problem in openstack which

[libvirt] [PATCH 22/31] src/utils: Remove the whitespace before "; "

2013-05-21 Thread Osier Yang
--- src/util/virarch.c | 2 +- src/util/virauth.c | 2 +- src/util/vircgroup.c| 38 +++--- src/util/vircommand.c | 12 ++-- src/util/vireventpoll.c | 22 +++--- src/util/virhash.c | 6 +++--- sr

[libvirt] [PATCH 21/31] tests/: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- tests/commandhelper.c| 6 +++--- tests/eventtest.c| 18 +- tests/fdstreamtest.c | 14 +++--- tests/libvirtdconftest.c | 2 +- tests/nodeinfotest.c | 2 +- tests/qemuhelptest.c | 2 +- tests/qemu

[libvirt] [PATCH 27/31] python: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- python/libvirt-lxc-override.c | 4 ++-- python/libvirt-override.c | 16 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python/libvirt-lxc-override.c b/python/libvirt-lxc-override.c index ead175f..c69affc 100644 --- a/python/libvirt-lxc-override.c +++ b/p

[libvirt] [PATCH 30/31] nwfitler: Change the comment style

2013-05-21 Thread Osier Yang
The more common habit is to add the comment after the statements. --- src/nwfilter/nwfilter_dhcpsnoop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index b9921e5..451c783 100644 --- a/src/nwfilter/nw

[libvirt] [PATCH 29/31] src/*.[ch]: Remove the whitespace before "; "

2013-05-21 Thread Osier Yang
--- src/libvirt-lxc.c | 2 +- src/libvirt.c | 10 +- src/nodeinfo.c| 18 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/libvirt-lxc.c b/src/libvirt-lxc.c index 6b4e995..f30b6c3 100644 --- a/src/libvirt-lxc.c +++ b/src/libvirt-lxc.c @@ -151,

[libvirt] [PATCH 19/31] tools: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- tools/virsh-domain.c | 6 +++--- tools/virsh-nodedev.c | 6 +++--- tools/virsh-nwfilter.c | 2 +- tools/virsh-secret.c | 2 +- tools/virsh.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index bb94ac1..bc424

[libvirt] [PATCH 16/31] src/xen: Remove the whitespace before ';'

2013-05-21 Thread Osier Yang
--- src/xen/xen_driver.c | 6 +++--- src/xen/xen_driver.h | 2 +- src/xen/xen_hypervisor.c | 4 ++-- src/xen/xen_inotify.c| 4 ++-- src/xen/xm_internal.c| 4 ++-- src/xen/xs_internal.c| 12 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/x

[libvirt] [PATCH 11/31] src/uml: Remove the whitespace before ';'

2013-05-21 Thread Osier Yang
--- src/uml/uml_conf.c | 12 ++-- src/uml/uml_driver.c | 14 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c index 52b705c..6e0725c 100644 --- a/src/uml/uml_conf.c +++ b/src/uml/uml_conf.c @@ -407,7 +407,7 @@ virComm

[libvirt] [PATCH 31/31] syntax-check: Add the rule to forbid whitespace before "; "

2013-05-21 Thread Osier Yang
Only a few cases are allowed: 1) The expression is empty for "for" loop, E.g. for (i = 0; ; i++) 2) An empty statement while (write(statuswrite, &status, 1) == -1 && errno == EINTR) ; /* empty */ 3) ";" is inside double-quote, I.e, as part of const string. E.g. vshPrint(c

[libvirt] [PATCH 09/31] src/node_device: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/node_device/node_device_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index 4aeaed5..620cd58 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -33

[libvirt] [PATCH 06/31] src/xenxs: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/xenxs/xen_sxpr.c | 20 ++-- src/xenxs/xen_xm.c | 16 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/xenxs/xen_sxpr.c b/src/xenxs/xen_sxpr.c index 9a76d04..16737a0 100644 --- a/src/xenxs/xen_sxpr.c +++ b/src/xenxs/xen_sxpr.c @@ -676,7

[libvirt] [PATCH 04/31] src/test: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/test/test_driver.c | 80 +- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index d0d7832..f1cdd92 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -192,7 +192

[libvirt] [PATCH 18/31] src/storage: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/storage/storage_backend.c | 14 +++--- src/storage/storage_backend_disk.c| 2 +- src/storage/storage_backend_iscsi.c | 10 +- src/storage/storage_backend_logical.c | 6 +++--- src/storage/storage_driver.c | 26 +- 5 files cha

[libvirt] [PATCH 23/31] src/rpc: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- src/rpc/virnetclient.c| 12 ++-- src/rpc/virnetclientprogram.c | 12 ++-- src/rpc/virnetmessage.c | 6 +++--- src/rpc/virnetserver.c| 26 +- src/rpc/virnetserverclient.c | 4 ++-- src/rpc/virnetserverprogram.c | 2 +- src/rpc/vi

[libvirt] [PATCH 25/31] src/lxc: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- src/lxc/lxc_cgroup.c | 4 ++-- src/lxc/lxc_container.c | 24 src/lxc/lxc_controller.c | 28 ++-- src/lxc/lxc_driver.c | 4 ++-- src/lxc/lxc_hostdev.c| 4 ++-- src/lxc/lxc_process.c| 18 +- 6 files changed, 41

[libvirt] [PATCH 17/31] src/security: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/security/security_dac.c | 8 src/security/security_driver.c | 2 +- src/security/security_selinux.c | 8 src/security/virt-aa-helper.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac

[libvirt] [PATCH 26/31] examples: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- examples/domain-events/events-c/event-test.c | 2 +- examples/openauth/openauth.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c index 301caad..eeff50f 100644

[libvirt] [PATCH 20/31] daemon: Remove the whitespace before ";"

2013-05-21 Thread Osier Yang
--- daemon/libvirtd-config.c | 2 +- daemon/remote.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon/libvirtd-config.c b/daemon/libvirtd-config.c index 1c57475..66dfb4a 100644 --- a/daemon/libvirtd-config.c +++ b/daemon/libvirtd-config.c @@ -88,7

[libvirt] [PATCH 28/31] src/locking: Remove the whitespace before "; "

2013-05-21 Thread Osier Yang
--- src/locking/domain_lock.c | 4 ++-- src/locking/lock_daemon.c | 4 ++-- src/locking/lock_driver_lockd.c | 12 ++-- src/locking/lock_driver_sanlock.c | 6 +++--- src/locking/lock_manager.c| 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --gi

[libvirt] [PATCH 05/31] src/vbox: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/vbox/vbox_tmpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 5a5b429..36d1e7f 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -3478,7 +3478,7 @@ static int vboxConnectListDefinedDomains(virConnectPtr

[libvirt] [PATCH 07/31] src/nwfilter: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/nwfilter/nwfilter_dhcpsnoop.c | 6 +++--- src/nwfilter/nwfilter_driver.c| 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/nwfilter/nwfilter_dhcpsnoop.c b/src/nwfilter/nwfilter_dhcpsnoop.c index 328f90e..b9921e5 100644 --- a/src/nwfilter/nwfilter_dhcpsnoop.

[libvirt] [PATCH 13/31] src/interface: Remove the whitespace before '; '

2013-05-21 Thread Osier Yang
--- src/interface/interface_backend_udev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c index 1fd7d46..6e27e83 100644 --- a/src/interface/interface_backend_udev.c +++ b/src/interface/interface_b

  1   2   >