[libvirt] [PATCH 1/2] network: allow vlan in type='hostdev' networks

2013-06-26 Thread Laine Stump
Although SRIOV network cards support setting a vlan tag on their virtual functions, and although setting this vlan tag via a vlan element in a domain's interface works, setting a vlan tag for these devices in a network definition, or in a network portgroup definition is also supposed to work (and

[libvirt] [PATCH 0/2] a couple of vlan-related fixes

2013-06-26 Thread Laine Stump
One in the code, one in the documentation (the latter was pushed as trivial) Laine Stump (2): network: allow vlan in type='hostdev' networks docs: correct and update network vlan example docs/formatnetwork.html.in | 39 ++- src/network/bridge_driver.c |

[libvirt] [PATCH 2/2] docs: correct and update network vlan example

2013-06-26 Thread Laine Stump
Somehow I put an example of a domain interface with a vlan element into the network documentation. This patch replaces that with an example of a network definition that has a vlan element with trunk='yes', multiple tags, and even the new nativeMode attribute. It also includes a portgroup that has

Re: [libvirt] [PATCH 0/2] a couple of vlan-related fixes

2013-06-26 Thread Michal Privoznik
On 26.06.2013 08:20, Laine Stump wrote: One in the code, one in the documentation (the latter was pushed as trivial) Laine Stump (2): network: allow vlan in type='hostdev' networks docs: correct and update network vlan example docs/formatnetwork.html.in | 39

[libvirt] Google Summer of Code 2013 has started

2013-06-26 Thread Stefan Hajnoczi
It is a pleasure to welcome the following GSoC 2013 students to the QEMU, KVM, and libvirt communities: Libvirt Wireshark Dissector - Yuto KAWAMURA (kawamuray) http://qemu-project.org/Features/LibvirtWiresharkDissector Libvirt Introduce API to query IP addresses for given domain - Nehal J. Wani

[libvirt] Libvirt : Bootstrap fails for local gnulib

2013-06-26 Thread chandrashekar shastri
Hi All, The Libvirt compliation fails to bootstarp for local gnulib. We do not have outbound access for the test machines. So, we ll pull the gnulib from and copy to the test machines. When we run ./bootstrap --no-git --gnulib-srcdir=/path/to/local, below is the error: ./bootstrap:

Re: [libvirt] [PATCHv2 05/12] nodedev: add iommuGroup to node device object

2013-06-26 Thread Daniel P. Berrange
On Wed, Jun 26, 2013 at 12:53:47AM -0400, Laine Stump wrote: I just realized that I had only implemented this for the udev nodeDevice driver, but not the HAL driver. I can easily add the same code into the HAL driver, but don't have any system to test building it on. Should I put that code

Re: [libvirt] [RFC PATCH 2/2] LXC: Create ro overlay mounts only if we're not within a user namespace

2013-06-26 Thread Daniel P. Berrange
On Wed, Jun 26, 2013 at 10:26:10AM +0800, Gao feng wrote: On 06/26/2013 04:39 AM, Daniel P. Berrange wrote: On Thu, Jun 13, 2013 at 08:02:18PM +0200, Richard Weinberger wrote: Within a user namespace root can remount these filesysems at any time rw. Create these mappings only if we're not

Re: [libvirt] [RFC PATCH 2/2] LXC: Create ro overlay mounts only if we're not within a user namespace

2013-06-26 Thread Gao feng
On 06/26/2013 05:38 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 10:26:10AM +0800, Gao feng wrote: On 06/26/2013 04:39 AM, Daniel P. Berrange wrote: On Thu, Jun 13, 2013 at 08:02:18PM +0200, Richard Weinberger wrote: Within a user namespace root can remount these filesysems at any

[libvirt] [PATCH] [docs] Fix sample TPM XML

2013-06-26 Thread Stefan Berger
Fix an error in the sample TPM XML. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- docs/formatdomain.html.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: libvirt-acl/docs/formatdomain.html.in ===

Re: [libvirt] [RFC PATCH 2/2] LXC: Create ro overlay mounts only if we're not within a user namespace

2013-06-26 Thread Daniel P. Berrange
On Wed, Jun 26, 2013 at 05:56:19PM +0800, Gao feng wrote: On 06/26/2013 05:38 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 10:26:10AM +0800, Gao feng wrote: On 06/26/2013 04:39 AM, Daniel P. Berrange wrote: On Thu, Jun 13, 2013 at 08:02:18PM +0200, Richard Weinberger wrote:

Re: [libvirt] [PATCH] [docs] Fix sample TPM XML

2013-06-26 Thread Ján Tomko
On 06/26/2013 12:53 PM, Stefan Berger wrote: Fix an error in the sample TPM XML. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- docs/formatdomain.html.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: libvirt-acl/docs/formatdomain.html.in

Re: [libvirt] [PATCH] [docs] Fix sample TPM XML

2013-06-26 Thread Stefan Berger
On 06/26/2013 07:02 AM, Ján Tomko wrote: On 06/26/2013 12:53 PM, Stefan Berger wrote: Fix an error in the sample TPM XML. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- docs/formatdomain.html.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index:

Re: [libvirt] [PATCH] [docs] Fix sample TPM XML

2013-06-26 Thread Ján Tomko
On 06/26/2013 02:12 PM, Stefan Berger wrote: On 06/26/2013 07:02 AM, Ján Tomko wrote: On 06/26/2013 12:53 PM, Stefan Berger wrote: Fix an error in the sample TPM XML. Signed-off-by: Stefan Berger stef...@linux.vnet.ibm.com --- docs/formatdomain.html.in |2 +- 1 file changed, 1

[libvirt] [PATCH 4/4] qemu: Always label newly created file on migration (save/managedsave)

2013-06-26 Thread Peter Krempa
Migration to file when (managed)saving a machine failed when static labelling was used. Use the new security driver method to avoid this. --- src/qemu/qemu_migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c

[libvirt] [PATCH 2/4] conf: refactor virSecurityLabelDefParseXML

2013-06-26 Thread Peter Krempa
Simplification of the code without functional impact. --- src/conf/domain_conf.c | 72 ++ 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e41dfa2..6b6196c 100644 ---

[libvirt] [PATCH 1/4] qemu: Improve info message and remove a variable in qemuDomainManagedSave

2013-06-26 Thread Peter Krempa
Mention the domain name that is being saved and remove the unneeded variable that only stores a constant. --- src/qemu/qemu_driver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f51e766..23eb4fb 100644 ---

[libvirt] [PATCH 0/4] Fix image labeling when saving a guest

2013-06-26 Thread Peter Krempa
This series cleans up a few places related to selinux labels and fixes issues with selinux when saving a machine with static selinux label and relabeling turned off. Peter Krempa (4): qemu: Improve info message and remove a variable in qemuDomainManagedSave conf: refactor

[libvirt] [PATCH 3/4] security: Introduce method for labeling file descriptors of created files

2013-06-26 Thread Peter Krempa
The method labels the file descriptor even if dynamic labeling/relabeling is turned off. This is needed for files created by libvirt and then passed along to qemu as a FD. --- src/libvirt_private.syms| 1 + src/security/security_dac.c | 9 + src/security/security_driver.h |

[libvirt] [PATCH] Fix invalid read in virCgroupGetValueStr

2013-06-26 Thread Ján Tomko
Don't check for '\n' at the end of file if zero bytes were read. Found by valgrind: ==404== Invalid read of size 1 ==404==at 0x529B09F: virCgroupGetValueStr (vircgroup.c:540) ==404==by 0x529AF64: virCgroupMoveTask (vircgroup.c:1079) ==404==by 0x1EB475: qemuSetupCgroupForEmulator

[libvirt] [PATCH] Plug leak in virCgroupMoveTask

2013-06-26 Thread Ján Tomko
We only break out of the while loop if *content is an empty string. However the buffer has been allocated to BUFSIZ + 1 (8193 in my case), but it gets overwritten in the next for iteration. Move VIR_FREE right before we overwrite it to avoid the leak. ==5777== 16,386 bytes in 2 blocks are

Re: [libvirt] [PATCH] Plug leak in virCgroupMoveTask

2013-06-26 Thread Peter Krempa
On 06/26/13 15:09, Ján Tomko wrote: We only break out of the while loop if *content is an empty string. However the buffer has been allocated to BUFSIZ + 1 (8193 in my case), but it gets overwritten in the next for iteration. Move VIR_FREE right before we overwrite it to avoid the leak.

Re: [libvirt] [PATCH] Fix invalid read in virCgroupGetValueStr

2013-06-26 Thread Peter Krempa
On 06/26/13 15:06, Ján Tomko wrote: Don't check for '\n' at the end of file if zero bytes were read. Found by valgrind: ==404== Invalid read of size 1 ==404==at 0x529B09F: virCgroupGetValueStr (vircgroup.c:540) ==404==by 0x529AF64: virCgroupMoveTask (vircgroup.c:1079) ==404==by

Re: [libvirt] [PATCH] docs: Document hypervisor drivers that support certain timer models

2013-06-26 Thread Paolo Bonzini
Il 25/06/2013 17:26, Jim Fehlig ha scritto: -being modified, and can be one of platform, hpet, -kvmclock, pit, rtc, or tsc. +being modified, and can be one of +platform (currently unsupported), Platform should be supported by Xen, though

Re: [libvirt] [PATCH] Fix invalid read in virCgroupGetValueStr

2013-06-26 Thread Ján Tomko
On 06/26/2013 03:20 PM, Peter Krempa wrote: On 06/26/13 15:06, Ján Tomko wrote: Don't check for '\n' at the end of file if zero bytes were read. Found by valgrind: ==404== Invalid read of size 1 ==404==at 0x529B09F: virCgroupGetValueStr (vircgroup.c:540) ==404==by 0x529AF64:

Re: [libvirt] [PATCH v4] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Martin Kletzander
On 06/25/2013 05:44 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences between v3 and v4 (this one): - Rebased to latest libvirt version - Capability XML output extended by maxCpus field - Extended

Re: [libvirt] [PATCH v4] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Michal Novotny
On 06/26/2013 04:17 PM, Martin Kletzander wrote: On 06/25/2013 05:44 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences between v3 and v4 (this one): - Rebased to latest libvirt version - Capability XML output

Re: [libvirt] [PATCH v4] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Martin Kletzander
On 06/26/2013 04:20 PM, Michal Novotny wrote: On 06/26/2013 04:17 PM, Martin Kletzander wrote: On 06/25/2013 05:44 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences between v3 and v4 (this one): - Rebased to

Re: [libvirt] [PATCH v4] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Michal Novotny
On 06/26/2013 04:29 PM, Martin Kletzander wrote: On 06/26/2013 04:20 PM, Michal Novotny wrote: On 06/26/2013 04:17 PM, Martin Kletzander wrote: On 06/25/2013 05:44 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences

Re: [libvirt] RFC: Improving unit test coverage

2013-06-26 Thread Richard W.M. Jones
XML parser/formatter reliability While we have good testing of valid XML documents, there have been a number of cases where invalid XML documents have caused crashes or other bad behaviour. It is not reasonable to add test cases for every possible invalid

[libvirt] [PATCH v5] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Michal Novotny
Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences between v4 and v5 (this one): - Changed type to unsigned int - Renamed variable to maxCpus to match previous naming - When machines types are parsed from command line set maxCpus = 0 to don't

Re: [libvirt] [PATCH v5] qemu: Implement CPUs check against machine type's cpu-max

2013-06-26 Thread Martin Kletzander
On 06/26/2013 05:46 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't exceed machine type's cpu-max settings. Differences between v4 and v5 (this one): - Changed type to unsigned int - Renamed variable to maxCpus to match previous naming - When machines types are

Re: [libvirt] [PATCHv3] pci: new iommu_group functions

2013-06-26 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 06:40:09PM -0400, Laine Stump wrote: Any device which belongs to an IOMMU group (used by vfio) will have links to all devices of its group listed in /sys/bus/pci/$device/iommu_group/devices; /sys/bus/pci/$device/iommu_group is actually a link to

Re: [libvirt] [PATCH] docs: Document hypervisor drivers that support certain timer models

2013-06-26 Thread Jim Fehlig
Paolo Bonzini wrote: Il 25/06/2013 17:26, Jim Fehlig ha scritto: -being modified, and can be one of platform, hpet, -kvmclock, pit, rtc, or tsc. +being modified, and can be one of +platform (currently unsupported), Platform

Re: [libvirt] [RFC PATCH 2/2] LXC: Create ro overlay mounts only if we're not within a user namespace

2013-06-26 Thread Gao feng
On 06/26/2013 07:01 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 05:56:19PM +0800, Gao feng wrote: On 06/26/2013 05:38 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 10:26:10AM +0800, Gao feng wrote: On 06/26/2013 04:39 AM, Daniel P. Berrange wrote: On Thu, Jun 13, 2013 at

Re: [libvirt] [RFC PATCH 2/2] LXC: Create ro overlay mounts only if we're not within a user namespace

2013-06-26 Thread Gao feng
On 06/26/2013 07:01 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 05:56:19PM +0800, Gao feng wrote: On 06/26/2013 05:38 PM, Daniel P. Berrange wrote: On Wed, Jun 26, 2013 at 10:26:10AM +0800, Gao feng wrote: On 06/26/2013 04:39 AM, Daniel P. Berrange wrote: On Thu, Jun 13, 2013 at