[libvirt] [PATCH] Have a colorful nodedev.rng with vi

2013-01-18 Thread Osier Yang
Just add the head line to let vi known it's a XML document. --- docs/schemas/nodedev.rng |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng index 7c85815..04d8ee9 100644 --- a/docs/schemas/nodedev.rng +++

Re: [libvirt] [PATCH] Have a colorful nodedev.rng with vi

2013-01-18 Thread Osier Yang
On 2013年01月18日 17:19, Osier Yang wrote: Just add the head line to let vi known it's a XML document. s/with vi//, s/let vi/let editor/, --- docs/schemas/nodedev.rng |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/docs/schemas/nodedev.rng b/docs/schemas/nodedev.rng

Re: [libvirt] RFC: libxl race fixes

2013-01-18 Thread Daniel P. Berrange
On Thu, Jan 17, 2013 at 10:29:35PM -0700, Jim Fehlig wrote: Jim Fehlig wrote: I've been investigating some races in the libxl driver and would like to get comments on some potential solutions. The first race is in the fd/timeout event handling code, which maps libxl's osevent interface

Re: [libvirt] [PATCH] qemu: Support ram bar size for qxl devices

2013-01-18 Thread Alon Levy
Hi Eric, I'm having trouble with the RNG approach. I've created a test rng and test xml with xmllint that can create the problem I am seeing, specifically: test.rng: ?xml version=1.0? grammar xmlns=http://relaxng.org/ns/structure/1.0;

Re: [libvirt] [PATCH] qemu: Support ram bar size for qxl devices

2013-01-18 Thread Gerd Hoffmann
Hi, What is the difference between this new RAM size and what we currently set for ram size. That will influence how we pick a good name, ie one with any qxl prefix, which is not something we can use. It's all a bit more complicated ... Current upstream has *four* parameters here:

Re: [libvirt] [PATCH] qemu: Support ram bar size for qxl devices

2013-01-18 Thread Jiri Denemark
On Fri, Jan 18, 2013 at 05:22:32 -0500, Alon Levy wrote: Hi Eric, I'm having trouble with the RNG approach. I've created a test rng and test xml with xmllint that can create the problem I am seeing, specifically: test.rng: ?xml version=1.0? grammar

Re: [libvirt] [PATCH 07/10] selinux: Resolve resource leak using the default disk label

2013-01-18 Thread Peter Krempa
On 01/17/13 20:17, John Ferlan wrote: Commit id a994ef2d1 changed the mechanism to store/update the default security label from using disk-seclabels[0] to allocating one on the fly. That change allocated the label, but never saved it. This patch will save the label. --- src/conf/domain_conf.c

Re: [libvirt] [PATCH 1/4] qemu: Simplify condition with already extracted flag

2013-01-18 Thread Peter Krempa
On 01/18/13 01:09, Eric Blake wrote: On 01/17/2013 06:12 AM, Peter Krempa wrote: --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK. Pushed. Thanks. Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 00/12] Introduce public APIs for dealing with virTypedParameters

2013-01-18 Thread Michal Privoznik
On 16.01.2013 15:20, Jiri Denemark wrote: Working with virTypedParameters in clients written in C is ugly and requires all clients to duplicate the same code. This set of APIs makes this code for manipulating with virTypedParameters integral part of libvirt so that all clients may benefit from

[libvirt] [PATCH v2 01/10] locking: use virStrcpyStatic instead of memcpy

2013-01-18 Thread John Ferlan
--- src/locking/lock_driver_sanlock.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index 0b7c6d5..95f7d61 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/lock_driver_sanlock.c @@

[libvirt] [PATCH] build: Fix RPM build errors related to libvirt-lxc API

2013-01-18 Thread Viktor Mihajlovski
Added missing entries to makefile and spec. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- docs/Makefile.am |2 +- libvirt.spec.in |1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index b1fa77a..c95497f 100644 ---

Re: [libvirt] [PATCH] qemu: Double mutex unlock in qemuDomainModifyDeviceFlags

2013-01-18 Thread Eric Blake
On 01/17/2013 10:25 AM, Viktor Mihajlovski wrote: The driver mutex was unlocked in qemuDomainModifyDeviceFlags before entering qemuDomainObjBeginJobWithDriver where it will be unlocked once more leaving it in an undefined state. The result was that two threads were simultaneously looking up

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: On 01/18/2013 05:44 AM, Pedro Alves wrote: On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org

[libvirt] [PATCH v2 2/10] security: Use virStrcpy to move the label

2013-01-18 Thread John Ferlan
--- src/security/security_dac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index deff024..93a0301 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -995,7 +995,8 @@

[libvirt] [PATCH v2 3/10] rpc: Remove unnecessary calls

2013-01-18 Thread John Ferlan
The code is not reachable as of commit id: bb85f229. Removed virKeepAliveStop() and virObjectUnref() because 'ka' cannot be anything but NULL at the cleanup label. --- src/rpc/virnetserverclient.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/rpc/virnetserverclient.c

[libvirt] [PATCH v2 4/10] parallels: Need to handle virJSONValueObjectGetString error

2013-01-18 Thread John Ferlan
--- src/parallels/parallels_driver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index ea193af..1b47246 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@

[libvirt] [PATCH v2 5/10] util: Need to check child JSON allocation before use

2013-01-18 Thread John Ferlan
--- src/util/virlockspace.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/util/virlockspace.c b/src/util/virlockspace.c index 163404f..4ff0f3a 100644 --- a/src/util/virlockspace.c +++ b/src/util/virlockspace.c @@ -459,8 +459,10 @@ virJSONValuePtr

[libvirt] [PATCH v2 7/10] selinux: Resolve resource leak using the default disk label

2013-01-18 Thread John Ferlan
Commit id a994ef2d1 changed the mechanism to store/update the default security label from using disk-seclabels[0] to allocating one on the fly. That change allocated the label, but never saved it. This patch will save the label. The new virDomainDiskDefAddSecurityLabelDef() is a copy of the

Re: [libvirt] [PATCH 00/12] Introduce public APIs for dealing with virTypedParameters

2013-01-18 Thread Jiri Denemark
On Fri, Jan 18, 2013 at 14:25:09 +0100, Michal Privoznik wrote: On 16.01.2013 15:20, Jiri Denemark wrote: Working with virTypedParameters in clients written in C is ugly and requires all clients to duplicate the same code. This set of APIs makes this code for manipulating with

[libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Daniel P. Berrange
From: Daniel P. Berrange berra...@redhat.com When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain object while in the middle of work, because the monitor might detect EOF in

Re: [libvirt] [PATCHv2 0/3] Colorize HTML documentation

2013-01-18 Thread Jiri Denemark
On Thu, Jan 17, 2013 at 20:24:53 +0100, Jiri Denemark wrote: On Thu, Jan 17, 2013 at 16:00:09 +0100, Claudio Bley wrote: Hi. In version 2 of this series I'm trying to fix some of those issues Jiri had with the initial version. Changes: + do not define a default set of fonts,

Re: [libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Jiri Denemark
On Fri, Jan 18, 2013 at 14:39:11 +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain object

Re: [libvirt] [PATCH v2 7/10] selinux: Resolve resource leak using the default disk label

2013-01-18 Thread Marcelo Cerri
The fix seems correct to me. On Fri, Jan 18, 2013 at 09:34:13AM -0500, John Ferlan wrote: Commit id a994ef2d1 changed the mechanism to store/update the default security label from using disk-seclabels[0] to allocating one on the fly. That change allocated the label, but never saved it. This

Re: [libvirt] [PATCH] qemu: Double mutex unlock in qemuDomainModifyDeviceFlags

2013-01-18 Thread Viktor Mihajlovski
On 01/18/2013 03:13 PM, Eric Blake wrote: I tracked this down to commit 8c5d2ba; it looks like Michal encountered a case of git botching a rebase when forward-porting a patch. If you'll look at that commit, we removed a qemuDriverUnlock() from one function (qemuDomainSendKey), added it to

Re: [libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Richard W.M. Jones
On Fri, Jan 18, 2013 at 02:39:11PM +, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When running virDomainDestroy, we need to make sure that no other background thread cleans up the domain while we're doing our work. This can happen if we release the domain

Re: [libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Richard W.M. Jones
And BTW can we get this patch into F18? (And what is the process to propose this?) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org

[libvirt] [PATCH] qemu: Move one misplaced driver unlock to the right function

2013-01-18 Thread Viktor Mihajlovski
This should have been commit 56fd513 already, but was missed by initially. The driver unlock call in the cleanup section of DomainManagedSave does actually belong to DomainSendKey. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- src/qemu/qemu_driver.c |2 +- 1 file changed,

[libvirt] Coverity update

2013-01-18 Thread John Ferlan
Taking Eric's suggestion from: https://www.redhat.com/archives/libvir-list/2013-January/msg01050.html There's two changes that have yet to be reviewed: https://www.redhat.com/archives/libvir-list/2013-January/msg00537.html https://www.redhat.com/archives/libvir-list/2013-January/msg00541.html

Re: [libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Daniel P. Berrange
On Fri, Jan 18, 2013 at 03:43:34PM +, Richard W.M. Jones wrote: And BTW can we get this patch into F18? (And what is the process to propose this?) I retargetted your BZ to F18 and moved it to POST, so it gets on Cole's radar for an update

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Carlos O'Donell
On Fri, Jan 18, 2013 at 9:36 AM, Pedro Alves pal...@redhat.com wrote: On 01/18/2013 02:24 PM, YOSHIFUJI Hideaki wrote: It's simple enough to move all of the __GLIBC__ uses into libc-compat.h, then you control userspace libc coordination from one file. How about just deciding on a single

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Pedro Alves
On 01/18/2013 02:24 PM, YOSHIFUJI Hideaki wrote: It's simple enough to move all of the __GLIBC__ uses into libc-compat.h, then you control userspace libc coordination from one file. How about just deciding on a single macro/symbol both the kernel and libc (any libc that needs this) define?

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Pedro Alves
On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 21:15:03 -0500 +/* If a glibc-based

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Carlos O'Donell
On 01/18/2013 05:44 AM, Pedro Alves wrote: On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013

Re: [libvirt] [PATCH] Fix race condition when destroying guests

2013-01-18 Thread Eric Blake
On 01/18/2013 08:47 AM, Daniel P. Berrange wrote: On Fri, Jan 18, 2013 at 03:43:34PM +, Richard W.M. Jones wrote: And BTW can we get this patch into F18? (And what is the process to propose this?) I retargetted your BZ to F18 and moved it to POST, so it gets on Cole's radar for an

Re: [libvirt] [PATCH] build: Fix RPM build errors related to libvirt-lxc API

2013-01-18 Thread Eric Blake
On 01/18/2013 06:55 AM, Viktor Mihajlovski wrote: Added missing entries to makefile and spec. Signed-off-by: Viktor Mihajlovski mihaj...@linux.vnet.ibm.com --- docs/Makefile.am |2 +- libvirt.spec.in |1 + 2 files changed, 2 insertions(+), 1 deletion(-) ACK and pushed. -- Eric

Re: [libvirt] [PATCH] Have a colorful nodedev.rng with vi

2013-01-18 Thread Eric Blake
On 01/18/2013 02:19 AM, Osier Yang wrote: Just add the head line to let vi known it's a XML document. s/known/know/ --- docs/schemas/nodedev.rng |1 + 1 files changed, 1 insertions(+), 0 deletions(-) ACK to the idea, but before you push... diff --git a/docs/schemas/nodedev.rng

[libvirt] [PATCHv2] spec: indent %if to make it easier to see conditions

2013-01-18 Thread Eric Blake
Nested conditionals are hard to read if they are not indented. We can't add arbitrary whitespace to everything in spec files, but we CAN add spaces before %if and %define. Use this trick, plus a fancy sed script that rewrites a spec file into a C file, so we can use cppi to keep our spec file

Re: [libvirt] [PATCH] qemu: Move one misplaced driver unlock to the right function

2013-01-18 Thread Eric Blake
On 01/18/2013 08:45 AM, Viktor Mihajlovski wrote: This should have been commit 56fd513 already, but was missed by initially. The driver unlock call in the cleanup section of s/by // DomainManagedSave does actually belong to DomainSendKey. Please also call out commit 8c5d2ba as the source of

Re: [libvirt] [PATCH] qemu: Move one misplaced driver unlock to the right function

2013-01-18 Thread Eric Blake
On 01/18/2013 10:19 AM, Eric Blake wrote: On 01/18/2013 08:45 AM, Viktor Mihajlovski wrote: This should have been commit 56fd513 already, but was missed by initially. The driver unlock call in the cleanup section of s/by // DomainManagedSave does actually belong to DomainSendKey.

[libvirt] [PATCH] Log flags passed to qemuMigrationPrepare{Tunnel, Direct} APIs

2013-01-18 Thread Michal Privoznik
We are already logging other arguments passed, however, @flags were missing there. --- Pushed as these chunks were ACKed and are not really part of my NBD patchset: https://www.redhat.com/archives/libvir-list/2013-January/msg01306.html src/qemu/qemu_migration.c | 9 + 1 file changed, 5

Re: [libvirt] [PATCH] qemu: Support ram bar size for qxl devices

2013-01-18 Thread Alon Levy
On 01/17/2013 12:35 PM, Alon Levy wrote: Adds a qxl-ram attribute globaly to the video.model element, that changes s/globaly/globally/ check. the resulting qemu command line only if video.type == qxl. That attribute gets a default value of 64*1024 only if model.type is qxl.

[libvirt] [PATCH v2] qemu: Support ram bar size for qxl devices

2013-01-18 Thread Alon Levy
Adds a ram attribute globally to the video.model element, that changes the resulting qemu command line only if video.type == qxl. video model type='qxl' ram='65536' vram='65536' heads='1'/ /video That attribute gets a default value of 64*1024. The schema is unchanged for other video element

Re: [libvirt] RFC: libxl race fixes

2013-01-18 Thread Jim Fehlig
Daniel P. Berrange wrote: On Thu, Jan 17, 2013 at 10:29:35PM -0700, Jim Fehlig wrote: Jim Fehlig wrote: I've been investigating some races in the libxl driver and would like to get comments on some potential solutions. The first race is in the fd/timeout event handling code, which

[libvirt] [PATCH 1/5] schema: Make the cpuset type reusable across schema files

2013-01-18 Thread Peter Krempa
--- docs/schemas/basictypes.rng | 6 ++ docs/schemas/domaincommon.rng | 5 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/schemas/basictypes.rng b/docs/schemas/basictypes.rng index 38cab16..8e44e8d 100644 --- a/docs/schemas/basictypes.rng +++

[libvirt] [PATCH 0/5] Add additional data to the NUMA topology information

2013-01-18 Thread Peter Krempa
See patch 2/5 for explaination. Peter Krempa (5): schema: Make the cpuset type reusable across schema files schemas: Add schemas for more CPU topology information in the caps XML conf: Split out NUMA topology formatting to simplify access to data capabilities: Switch CPU data in NUMA

[libvirt] [PATCH 2/5] schemas: Add schemas for more CPU topology information in the caps XML

2013-01-18 Thread Peter Krempa
This patch adds RNG schemas for adding more information in the topology output of the NUMA section in the capabilities XML. The added elements are designed to provide more information about the placement and topology of the processors in the system to management applications. A demonstration of

[libvirt] [PATCH 3/5] conf: Split out NUMA topology formatting to simplify access to data

2013-01-18 Thread Peter Krempa
--- src/conf/capabilities.c | 43 +-- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 365c511..0d2512e 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -678,6

[libvirt] [PATCH 4/5] capabilities: Switch CPU data in NUMA topology to a struct

2013-01-18 Thread Peter Krempa
This will allow storing additional topology data in the NUMA topology definition. This patch changes the storage type and fixes fallback of the change across the drivers using it. This patch also changes semantics of adding new NUMA cell information. Until now the data were re-allocated and

[libvirt] [PATCH 5/5] capabilities: Add additional data to the NUMA topology info

2013-01-18 Thread Peter Krempa
This patch adds data gathering to the NUMA gathering files and adds support for outputting the data. The test driver and xend driver need to be adapted to fill sensible data to the structure. --- src/conf/capabilities.c | 14 +++-- src/nodeinfo.c | 55