Re: [libvirt] [PATCH v2] maint: improve usage of autogen's --no-git

2015-02-06 Thread Eric Blake
On 02/06/2015 09:19 AM, Stefan Zimmermann wrote: If you will build libvirt with the no-git-option than you is the gnulib-srcdir mandatory. You will lose this information till now. With this patch you will save this information. Still an awkward read; I've adjusted it as follows: If you

[libvirt] [PATCH 6/6] po: add security_stack.c into POTFILES.in

2015-02-06 Thread Erik Skultety
Previous patches of these series introduced a new check which might endup reporting an error. In that case POTFILES.in had to be updated, so that syntax-check could pass successfully --- po/POTFILES.in | 1 + 1 file changed, 1 insertion(+) diff --git a/po/POTFILES.in b/po/POTFILES.in index

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Eric Blake
On 02/06/2015 10:49 AM, Daniel P. Berrange wrote: I'm still trying to figure out how virCommandReorderFDs() got into the picture (I didn't write that section of the code); when I originally worked on virCommand, the only way to pass fds to the child was in direct positions (same fd in child

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Stefan Berger
On 02/06/2015 01:58 PM, Eric Blake wrote: On 02/06/2015 10:49 AM, Daniel P. Berrange wrote: I'm still trying to figure out how virCommandReorderFDs() got into the picture (I didn't write that section of the code); when I originally worked on virCommand, the only way to pass fds to the child

Re: [libvirt] [PATCH 02/10] conf: support backend domain name in disk and network devices

2015-02-06 Thread Marek Marczykowski-Górecki
On Fri, Feb 06, 2015 at 05:36:40PM +, Daniel P. Berrange wrote: On Thu, Feb 05, 2015 at 06:17:08AM +0100, Marek Marczykowski-Górecki wrote: At least Xen supports backend drivers in another domain (aka driver domain). This patch introduces XML config option for such setting as 'domain'

[libvirt] [PATCH 3/6] conf: forbid seclabel duplicates for domain devices

2015-02-06 Thread Erik Skultety
Parser checks for per-domain seclabel duplicates, so it would be nice if it checked for per-device seclabel duplicates the same way Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1165485 --- src/conf/domain_conf.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Stefan Berger
On 02/06/2015 01:56 PM, Eric Blake wrote: On 02/06/2015 09:41 AM, Stefan Berger wrote: @@ -214,6 +215,12 @@ virCommandReorderFDs(virCommandPtr cmd) if (!cmd || cmd-has_error || !cmd-npassfd) return; +if ((cmd-flags VIR_EXEC_FIXED_FDS)) { +

Re: [libvirt] [PATCH 0/6] security: Add check for invalid security models and duplicates

2015-02-06 Thread Eric Blake
On 02/06/2015 11:13 AM, Erik Skultety wrote: Add a check for invalid security models in per-device configuration as well as a check for seclabel duplicates in per-device configuration Erik Skultety (6): security: Add check for valid security model conf: fix a minor typo conf:

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Eric Blake
On 02/06/2015 12:19 PM, Stefan Berger wrote: virCommandReorderFDs is not used on WIN32 -- that would then mean that the fdsets could not be used on WIN32 or a different return value would have to be given here. Like return cmd-npassfd -1 on WIN32 ? virCommand in general has problems

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Eric Blake
On 02/06/2015 09:41 AM, Stefan Berger wrote: @@ -214,6 +215,12 @@ virCommandReorderFDs(virCommandPtr cmd) if (!cmd || cmd-has_error || !cmd-npassfd) return; +if ((cmd-flags VIR_EXEC_FIXED_FDS)) { +virReportError(VIR_ERR_INTERNAL_ERROR, %s, +

Re: [libvirt] [PATCH 02/10] conf: support backend domain name in disk and network devices

2015-02-06 Thread Marek Marczykowski-Górecki
On Fri, Feb 06, 2015 at 08:03:43PM +, Daniel P. Berrange wrote: On Fri, Feb 06, 2015 at 07:11:40PM +0100, Marek Marczykowski-Górecki wrote: On Fri, Feb 06, 2015 at 05:36:40PM +, Daniel P. Berrange wrote: On Thu, Feb 05, 2015 at 06:17:08AM +0100, Marek Marczykowski-Górecki wrote:

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Stefan Berger
On 02/06/2015 03:11 PM, Eric Blake wrote: On 02/06/2015 12:19 PM, Stefan Berger wrote: virCommandReorderFDs is not used on WIN32 -- that would then mean that the fdsets could not be used on WIN32 or a different return value would have to be given here. Like return cmd-npassfd -1 on WIN32 ?

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Eric Blake
On 02/06/2015 04:12 PM, Stefan Berger wrote: it's not that simple unfortunately; if we started to re-order / re-map using dup() the file descriptors then all fd's that make it onto the command line, like those for -netdev and others, also need to be adapted to have that re-ordered fd on the

Re: [libvirt] [PATCH 02/10] conf: support backend domain name in disk and network devices

2015-02-06 Thread Daniel P. Berrange
On Fri, Feb 06, 2015 at 07:11:40PM +0100, Marek Marczykowski-Górecki wrote: On Fri, Feb 06, 2015 at 05:36:40PM +, Daniel P. Berrange wrote: On Thu, Feb 05, 2015 at 06:17:08AM +0100, Marek Marczykowski-Górecki wrote: At least Xen supports backend drivers in another domain (aka driver

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Stefan Berger
On 02/06/2015 02:43 PM, Stefan Berger wrote: On 02/06/2015 01:58 PM, Eric Blake wrote: On 02/06/2015 10:49 AM, Daniel P. Berrange wrote: I'm still trying to figure out how virCommandReorderFDs() got into the picture (I didn't write that section of the code); when I originally worked on

[libvirt] virt-manager issue, FreeBSD

2015-02-06 Thread Jason Helfman
Hi, I am working on resolving an issue with virt-manager on FreeBSD. A contributor recently worked on getting spice-gtk ported to FreeBSD, however I am working on this error when launching console.py. [helfman@its-helfman03 ~/workspace/ports/deskutils/virt-manager]$ python

[libvirt] [PATCH 5/6] test: add test to check for device seclabel duplicates

2015-02-06 Thread Erik Skultety
--- .../qemuxml2argv-seclabel-device-multiple.xml | 35 ++ 1 file changed, 35 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-device-multiple.xml

[libvirt] [PATCH 4/6] schema: allow multiple seclabel for devices in domaincommon.rng

2015-02-06 Thread Erik Skultety
In our RNG schema we do allow multiple seclabels per-domain, bu don't allow this for devices, yet we neither have a check in our XML parser, nor in a post-parse callback. As one of my previous patches in this series added that check to the XML parser, let's allow multiple seclabels for devices

Re: [libvirt] [PATCH 02/10] conf: support backend domain name in disk and network devices

2015-02-06 Thread Eric Blake
On 02/06/2015 11:11 AM, Marek Marczykowski-Górecki wrote: On Fri, Feb 06, 2015 at 05:36:40PM +, Daniel P. Berrange wrote: On Thu, Feb 05, 2015 at 06:17:08AM +0100, Marek Marczykowski-Górecki wrote: At least Xen supports backend drivers in another domain (aka driver domain). This patch

[libvirt] [PATCH] Follow up fix of commit a58e1cb4

2015-02-06 Thread Cédric Bosdonnat
commit a58e1cb4 didn't fix the bug if the security_default_confined is not set to 1. We now clean up even if there is no seclabel defined or the default one. --- src/lxc/lxc_process.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_process.c

Re: [libvirt] [PATCH 4/5 RESEND] Trivially implement VIR_CONNECT_BASELINE_CPU_MIGRATABLE for non-x86 cpus

2015-02-06 Thread Jiri Denemark
On Fri, Feb 06, 2015 at 13:00:00 +0100, Ján Tomko wrote: Assume no features block migration. --- src/cpu/cpu_aarch64.c | 3 ++- src/cpu/cpu_arm.c | 3 ++- src/cpu/cpu_generic.c | 3 ++- src/cpu/cpu_powerpc.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) ACK Jirka --

[libvirt] [PATCH 07/12] qemu: command: Refactor creation of RNG device commandline

2015-02-06 Thread Peter Krempa
As the RNG device is using an -object as backend refactor the code to use the JSON to commandline generator so that we can reuse the code later in hotplug. --- src/qemu/qemu_command.c | 108 +--- 1 file changed, 84 insertions(+), 24 deletions(-) diff

[libvirt] [PATCH 12/12] qemu: Implement random number generator hotunplug

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com Signed-off-by: Luyao Huang lhu...@redhat.com Signed-off-by: Peter Krempa pkre...@redhat.com --- src/qemu/qemu_driver.c | 4 +- src/qemu/qemu_hotplug.c | 106 +++- src/qemu/qemu_hotplug.h | 4 +- 3 files changed,

[libvirt] [PATCH 09/12] conf: Add helpers to insert/remove/find RNG devices in domain def

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com The helpers will be useful when implementing hotplug and coldplug of random number generator devices. Signed-off-by: Luyao Huang lhu...@redhat.com Signed-off-by: Peter Krempa pkre...@redhat.com --- src/conf/domain_conf.c | 66

[libvirt] [PATCH 11/12] qemu: Implement random number generator hotplug

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com Export the required helpers and add backend code to hotplug RNG devices. Signed-off-by: Luyao Huang lhu...@redhat.com Signed-off-by: Peter Krempa pkre...@redhat.com --- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_command.h | 4 ++ src/qemu/qemu_driver.c

[libvirt] [PATCH 08/12] audit: export virDomainAuditRNG

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com Signed-off-by: Luyao Huang lhu...@redhat.com --- src/conf/domain_audit.c | 2 +- src/conf/domain_audit.h | 7 +++ src/libvirt_private.syms | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_audit.c

[libvirt] [PATCH 00/12] Implement random number generator hot/cold (un)plug

2015-02-06 Thread Peter Krempa
Extension of Luyao's series with changes that were possible due to the prepare series for memory hotplug. Luyao Huang (7): qemu: Add helper to assign RNG device aliases qemu: refactor qemuBuildRNGDeviceArgs to allow reuse in RNG hotplug qemu: command: Make RNG backend device IDs unique

[libvirt] [PATCH 04/12] qemu: command: Make RNG backend device IDs unique

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com Libvirt didn't prefix the random number generator backend object alias with any string thus the device alias and object alias were identical. To avoid possible problems, rename the alias for the backend object and tweak tests to comply with the change.

[libvirt] [PATCH 03/12] qemu: refactor qemuBuildRNGDeviceArgs to allow reuse in RNG hotplug

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com Rename qemuBuildRNGDeviceArgs to qemuBuildRNGDevStr and change the return type so that it can be reused in the device hotplug code later. Signed-off-by: Luyao Huang lhu...@redhat.com Signed-off-by: Peter Krempa pkre...@redhat.com --- src/qemu/qemu_command.c |

[libvirt] [PATCH] storage: rbd: Improve the error when start a pool based on non-exist rados object

2015-02-06 Thread Shanzhi Yu
When start/create a pool based on non-exist rados object, the error will be like $virsh pool-start p-c error: Failed to start pool p-c error: failed to create the RBD IoCTX. Does the pool 'libvirt-pool-clone' exist?: No such file or directory update it to error: Failed to start pool p-c error:

Re: [libvirt] [Xen-devel] [PATCH 0/2] libxl: fix handling of fd and timer registrations

2015-02-06 Thread Anthony PERARD
On Mon, Feb 02, 2015 at 05:00:34PM -0700, Jim Fehlig wrote: This small series fixes some assertions we occasionally see in the libxl driver when running libvirt-TCK. The assertions were due to races between destroying per-domain libxl_ctx and receiving fd and timer callbacks associated with

[libvirt] [PATCH 0/2] Support mrg_rxbuf attribute for virtio-net devices

2015-02-06 Thread Ján Tomko
For https://bugzilla.redhat.com/show_bug.cgi?id=1186886 Ján Tomko (2): Add mrg_rxbuf option to virtio interfaces Wire up mrg_rxbuf option for qemu docs/formatdomain.html.in | 6 +- docs/schemas/domaincommon.rng | 5 +

[libvirt] [PATCH 1/2] Add mrg_rxbuf option to virtio interfaces

2015-02-06 Thread Ján Tomko
Add an XML attribute to allow disabling merge of rx buffers on the host: interface ... ... model type='virtio'/ driver ... host mrg_rxbuf='off'/ /driver /interface https://bugzilla.redhat.com/show_bug.cgi?id=1186886 --- docs/formatdomain.html.in | 6 +-

[libvirt] [PATCH 4/5 RESEND] Trivially implement VIR_CONNECT_BASELINE_CPU_MIGRATABLE for non-x86 cpus

2015-02-06 Thread Ján Tomko
Assume no features block migration. --- src/cpu/cpu_aarch64.c | 3 ++- src/cpu/cpu_arm.c | 3 ++- src/cpu/cpu_generic.c | 3 ++- src/cpu/cpu_powerpc.c | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cpu/cpu_aarch64.c b/src/cpu/cpu_aarch64.c index 6346f9b..e6d5f53

Re: [libvirt] [PATCH] storage: rbd: Improve the error when start a pool based on non-exist rados object

2015-02-06 Thread Ján Tomko
On Fri, Feb 06, 2015 at 07:45:37PM +0800, Shanzhi Yu wrote: When start/create a pool based on non-exist rados object, the error will be like $virsh pool-start p-c error: Failed to start pool p-c error: failed to create the RBD IoCTX. Does the pool 'libvirt-pool-clone' exist?: No such file

[libvirt] [PATCH 2/2] Wire up mrg_rxbuf option for qemu

2015-02-06 Thread Ján Tomko
interface ... ... model type='virtio'/ driver ... host mrg_rxbuf='off'/ /driver /interface will result in: -device virtio-net-pci,mrg_rxbuf=off,... https://bugzilla.redhat.com/show_bug.cgi?id=1186886 --- src/qemu/qemu_command.c | 4

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Stefan Berger
On 01/30/2015 07:17 PM, Eric Blake wrote: On 11/20/2014 08:08 AM, Stefan Berger wrote: Pass the TPM file descriptor to QEMU via command line. Instead of passing /dev/tpm0 we now pass /dev/fdset/10 and the additional parameters -add-fd set=10,fd=20. This addresses the use case when QEMU is

Re: [libvirt] [PATCH 02/10] conf: support backend domain name in disk and network devices

2015-02-06 Thread Daniel P. Berrange
On Thu, Feb 05, 2015 at 06:17:08AM +0100, Marek Marczykowski-Górecki wrote: At least Xen supports backend drivers in another domain (aka driver domain). This patch introduces XML config option for such setting as 'domain' attribute of 'source' element. Verification its content is left for the

[libvirt] [PATCH 02/12] qemu: Add helper to assign RNG device aliases

2015-02-06 Thread Peter Krempa
From: Luyao Huang lhu...@redhat.com This function is used to assign an alias for a RNG device. It will be later reused when hotplugging RNGs. Signed-off-by: Luyao Huang lhu...@redhat.com Signed-off-by: Peter Krempa pkre...@redhat.com --- src/qemu/qemu_command.c | 13 -

Re: [libvirt] [RFC PATCH 08/12] qemu: add support for memory devices

2015-02-06 Thread Peter Krempa
On Wed, Feb 04, 2015 at 17:28:00 -0500, John Ferlan wrote: On 01/30/2015 08:21 AM, Peter Krempa wrote: Add support to start qemu instance with 'pc-dimm' device. Thanks to the refactors we are able to reuse the existing function to determine the parameters. ---

[libvirt] [PATCH 01/12] conf: Introduce helper to find duplicate device address

2015-02-06 Thread Peter Krempa
When adding devices to the definition it's useful to check whether the devices don't reside on a conflicting address. This patch adds a helper that iterates all device info and comapres the addresses with the given info. --- src/conf/domain_conf.c | 98

[libvirt] [PATCH 05/12] qemu: command: Shuffle around formatting of alias for RNG device backend

2015-02-06 Thread Peter Krempa
Move the alias name right after the object type for rng-egd backend so that we can later use the JSON to commandline generator to create the command line. --- src/qemu/qemu_command.c | 2 +- tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.args | 2 +-

[libvirt] [PATCH 06/12] qemu: command: Break some very long lines in qemuBuildRNGDevStr()

2015-02-06 Thread Peter Krempa
--- src/qemu/qemu_command.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7d4af4c..6380621 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6227,13 +6227,17 @@

[libvirt] [PATCH v2] maint: improve usage of autogen's --no-git

2015-02-06 Thread Stefan Zimmermann
If you will build libvirt with the no-git-option than you is the gnulib-srcdir mandatory. You will lose this information till now. With this patch you will save this information. Signed-off-by: Stefan Zimmermann s...@linux.vnet.ibm.com --- autogen.sh | 4 1 file changed, 4 insertions(+)

Re: [libvirt] [RFC PATCH 02/12] conf: Add support for parsing and formatting max memory and slot count

2015-02-06 Thread Peter Krempa
On Thu, Feb 05, 2015 at 20:54:11 -0700, Eric Blake wrote: On 01/30/2015 06:20 AM, Peter Krempa wrote: Add a XML element that will allow to specify maximum supportable memory s/a XML/an XML/ and the count of memory slots to use with memory hotplug. Might be nice to demonstrate that XML

Re: [libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

2015-02-06 Thread Daniel P. Berrange
On Fri, Jan 30, 2015 at 05:17:56PM -0700, Eric Blake wrote: On 11/20/2014 08:08 AM, Stefan Berger wrote: Wow, I've been horribly slow at reviewing this. Do feel free to ping on list if no one seems to notice a patch, to widen the chances of anyone taking a glance at it. Pass the TPM

[libvirt] [PATCH 1/6] security: Add check for valid security model

2015-02-06 Thread Erik Skultety
We do have a check for valid per-domain security model, however we still do permit an invalid security model for a disk type device. This patch introduces a new function virSecurityStackCheckDiskLabels which compares user specified security model against currently registered security drivers. That

[libvirt] [PATCH 2/6] conf: fix a minor typo

2015-02-06 Thread Erik Skultety
--- src/conf/domain_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4251b13..a36dace 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5213,7 +5213,7 @@ virSecurityLabelDefsParseXML(virDomainDefPtr

[libvirt] [PATCH 0/6] security: Add check for invalid security models and duplicates

2015-02-06 Thread Erik Skultety
Add a check for invalid security models in per-device configuration as well as a check for seclabel duplicates in per-device configuration Erik Skultety (6): security: Add check for valid security model conf: fix a minor typo conf: forbid seclabel duplicates for domain devices schema: