Re: [libvirt] [RFC PATCH 1/2] LXC: Drop capabilities only if we're not within a user namespace

2013-06-25 Thread Richard Weinberger
Am 13.06.2013 20:02, schrieb Richard Weinberger: Dropping capabilities within a user namespace makes no sense because any uid 0 process will regain all caps upon execve(). Signed-off-by: Richard Weinberger rich...@nod.at --- src/lxc/lxc_container.c | 21 ++--- 1 file

[libvirt] [PATCH] tests: Introduce qemuhotplugtest

2013-06-25 Thread Michal Privoznik
As my punishment for the break in 7f15ebc7 (fixed in 752596b5dd) I'm introducing this test to make sure it won't happen again. Currently, only test for graphics/ is supported. --- .gitignore | 1 + tests/Makefile.am | 11

Re: [libvirt] [PATCHv2 01/12] pci: eliminate unused driver arg from virPCIDeviceDetach

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:27PM -0400, Laine Stump wrote: The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice object, and virPCIDeviceDetach retrieves it from there). Remove it. What happens when libvirtd is restarted ? Are we

Re: [libvirt] [PATCH] tests: Introduce qemuhotplugtest

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 11:38:15AM +0200, Michal Privoznik wrote: As my punishment for the break in 7f15ebc7 (fixed in 752596b5dd) I'm introducing this test to make sure it won't happen again. Currently, only test for graphics/ is supported. --- .gitignore

Re: [libvirt] [RFC PATCH 1/2] LXC: Drop capabilities only if we're not within a user namespace

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 09:47:13AM +0200, Richard Weinberger wrote: Am 13.06.2013 20:02, schrieb Richard Weinberger: Dropping capabilities within a user namespace makes no sense because any uid 0 process will regain all caps upon execve(). Signed-off-by: Richard Weinberger rich...@nod.at

Re: [libvirt] [PATCH 2/2] bridge: don't crash on bandwidth unplug with no bandwidth

2013-06-25 Thread Ján Tomko
On 06/21/2013 09:23 PM, John Ferlan wrote: On 06/21/2013 01:30 PM, Ján Tomko wrote: If networkUnplugBandwidth is called on a network which has no bandwidth defined, print a warning instead of crashing. This can happen when destroying a domain with bandwith if s/bandwith/bandwidth

Re: [libvirt] [PATCHv2 02/12] pci: rename virPCIDeviceGetVFIOGroupDev to virPCIDeviceGetIOMMUGroupDev

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:28PM -0400, Laine Stump wrote: I realized after the fact that it's probably better in the long run to give this function a name that matches the name of the link used in sysfs to hold the group (iommu_group). I'm changing it now because I'm about to add several

Re: [libvirt] [PATCHv2 03/12] pci: make virPCIParseDeviceAddress public

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:29PM -0400, Laine Stump wrote: This function has utility outside of virpci.c, so make it public. --- src/libvirt_private.syms | 1 + src/util/virpci.c| 2 +- src/util/virpci.h| 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [libvirt] [PATCHv2 04/12] pci: new iommu_group functions

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:30PM -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] [PATCHv2 05/12] nodedev: add iommuGroup to node device object

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:31PM -0400, Laine Stump wrote: This includes adding it to the nodedev parser and formatter, docs, and test. --- docs/formatnode.html.in| 63 +++- docs/schemas/nodedev.rng | 11 +++

Re: [libvirt] [PATCHv4] Configure native vlan modes on Open vSwitch ports

2013-06-25 Thread John Ferlan
On 06/17/2013 01:56 PM, james robson wrote: ...snip... diff --git a/src/util/virnetdevopenvswitch.c b/src/util/virnetdevopenvswitch.c index 2aee445..47e6027 100644 --- a/src/util/virnetdevopenvswitch.c +++ b/src/util/virnetdevopenvswitch.c @@ -109,8 +109,22 @@ int

Re: [libvirt] [PATCHv2 04/12] pci: new iommu_group functions

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:30PM -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] [PATCHv2 06/12] pci: eliminate repetitive path constructions in virPCIDeviceBindToStub

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:32PM -0400, Laine Stump wrote: The same strings were being re-created multiple times just to save declaring a new variable. In the meantime, the use of the generic variable names led to confusion when trying to follow the code. This patch creates strings for:

Re: [libvirt] [PATCHv2 07/12] pci: update stubDriver name in virPCIDeviceBindToStub

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:33PM -0400, Laine Stump wrote: If the device is bound to a stub driver different from what is saved in the virPCIDevice's stubDriver attribute, update it. --- src/util/virpci.c | 8 1 file changed, 8 insertions(+) ACK Daniel -- |:

Re: [libvirt] [PATCHv2 08/12] qemu: don't reset PCI devices being assigned with VFIO

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:34PM -0400, Laine Stump wrote: I just learned that VFIO resets PCI devices when they are assigned to guests / returned to the host, so it is redundant for libvirt to reset the devices. This patch inhibits calling virPCIDeviceReset to devices that will be/were

Re: [libvirt] [PATCHv2 09/12] pci: virPCIDeviceListAddCopy API

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:35PM -0400, Laine Stump wrote: Make a copy of the device and add the copy to the list. (virPCIDeviceListAdd() adds the original object to the list instead). --- src/libvirt_private.syms | 1 + src/util/virpci.c| 17 + src/util/virpci.h

Re: [libvirt] [PATCHv2 10/12] pci: eliminate leak in OOM condition

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:36PM -0400, Laine Stump wrote: The fix I pushed a few commits ago would still leak a virPCIDevice in case of an OOM error. Although it's inconsequential in practice, this patch satisfies my OCD. --- src/util/virpci.c | 8 +++- 1 file changed, 3

Re: [libvirt] [PATCHv2 12/12] qemu: fix infinite loop in OOM error path

2013-06-25 Thread Daniel P. Berrange
On Mon, Jun 24, 2013 at 11:05:38PM -0400, Laine Stump wrote: A loop in qemuPrepareHostdevPCIDevices() intended to cycle through all the objects on the list pcidevs was doing while (listcount 0), but nothing in the body of the loop was reducing the size of the list - it was instead removing

Re: [libvirt] [PATCH 15/21] Adapt virDomainMigrateVersion3 for extensible migration APIs

2013-06-25 Thread John Ferlan
On 06/18/2013 10:05 AM, Jiri Denemark wrote: --- src/libvirt.c | 177 +++--- 1 file changed, 133 insertions(+), 44 deletions(-) ...snip... +if (useParams) { +if (virTypedParamsGetString(params, nparams, +

[libvirt] [PATCH v2] BSD: implement virNetDev(Set|Clear)IPv4Address

2013-06-25 Thread Roman Bogorodskiy
Provide an implementation of virNetDev(Set|Clear)IPv4Address based on BSD ifconfig tool in addition to 'ip' from Linux iproute2 package. --- configure.ac | 15 +++ src/util/virnetdev.c | 26 ++ 2 files changed, 41 insertions(+) diff --git

Re: [libvirt] [PATCH] BSD: implement virNetDev(Set|Clear)IPv4Address

2013-06-25 Thread Roman Bogorodskiy
Laine Stump wrote: There is a potential problem here. When this function was renamed from brAddInetAddress(), it was incorrectly given the IPv4 moniker. In fact, it is used to add either IPv4 or IPv6 addresses to the interface. In order for this to work correctly, you'll need to check the

[libvirt] [PATCH] virsh: edit: don't leak XML string on reedit or redefine

2013-06-25 Thread Ján Tomko
Free the old XML strings before overwriting them if the user has chosen to reedit the file or force the redefinition. Found by Alex Jia trying to reproduce another bug: https://bugzilla.redhat.com/show_bug.cgi?id=977430#c3 --- tools/virsh-edit.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [libvirt] [PATCH] virsh: edit: don't leak XML string on reedit or redefine

2013-06-25 Thread Peter Krempa
On 06/25/13 15:18, Ján Tomko wrote: Free the old XML strings before overwriting them if the user has chosen to reedit the file or force the redefinition. Found by Alex Jia trying to reproduce another bug: https://bugzilla.redhat.com/show_bug.cgi?id=977430#c3 --- tools/virsh-edit.c | 2 ++ 1

[libvirt] [PATCH] Use 1.1.0 everywhere in the documentation

2013-06-25 Thread Ján Tomko
Since we already have the v1.1.0-rc1 tag in git. --- Pushed as trivial. docs/formatdomain.html.in | 2 +- docs/formatnetwork.html.in | 2 +- docs/formatstorage.html.in | 4 ++-- src/libxl/libxl_driver.c | 2 +- src/xen/xen_driver.c | 2 +- 5 files changed, 6 insertions(+), 6

Re: [libvirt] [PATCH] virsh: edit: don't leak XML string on reedit or redefine

2013-06-25 Thread Ján Tomko
On 06/25/2013 03:38 PM, Peter Krempa wrote: On 06/25/13 15:18, Ján Tomko wrote: Free the old XML strings before overwriting them if the user has chosen to reedit the file or force the redefinition. Found by Alex Jia trying to reproduce another bug:

Re: [libvirt] [PATCH] tests: Introduce qemuhotplugtest

2013-06-25 Thread Michal Privoznik
On 25.06.2013 12:00, Daniel P. Berrange wrote: +#define DO_TEST(file, dev, fial, ...) \ +do { \ +const char *my_mon[] = { __VA_ARGS__, NULL}; \ +struct qemuHotplugTestData data = \ +{.domain_filename = file,

Re: [libvirt] [PATCH] tests: Introduce qemuhotplugtest

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:45:47PM +0200, Michal Privoznik wrote: On 25.06.2013 12:00, Daniel P. Berrange wrote: +#define DO_TEST(file, dev, fial, ...) \ +do { \ +const char *my_mon[] = { __VA_ARGS__, NULL}; \ +struct qemuHotplugTestData data =

[libvirt] [PATCH v2 3/5] qemu: Move internals of Confirm phase to qemu_migration.c

2013-06-25 Thread Jiri Denemark
--- src/qemu/qemu_driver.c| 43 ++--- src/qemu/qemu_migration.c | 225 -- src/qemu/qemu_migration.h | 5 +- 3 files changed, 144 insertions(+), 129 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

[libvirt] [PATCH v2 0/5] Make migration APIs more extensible -- qemu patches

2013-06-25 Thread Jiri Denemark
These are the patches for qemu driver that were already acked but had to be reworked due to the introduction of ACL checks. Jiri Denemark (5): qemu: Move internals of Begin phase to qemu_migration.c qemu: Move common parts of Prepare phase to qemu_migration.c qemu: Move internals of Confirm

[libvirt] [PATCH v2 1/5] qemu: Move internals of Begin phase to qemu_migration.c

2013-06-25 Thread Jiri Denemark
--- src/qemu/qemu_driver.c| 71 +++--- src/qemu/qemu_migration.c | 86 +-- src/qemu/qemu_migration.h | 2 +- 3 files changed, 89 insertions(+), 70 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 5/5] qemu: Implement support for VIR_MIGRATE_PARAM_GRAPHICS_URI

2013-06-25 Thread Jiri Denemark
--- src/qemu/qemu_driver.c| 14 ++-- src/qemu/qemu_migration.c | 189 +++--- src/qemu/qemu_migration.h | 2 + 3 files changed, 140 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index cedec91..127abfe

[libvirt] [PATCH v2 4/5] Implement extensible migration APIs in qemu driver

2013-06-25 Thread Jiri Denemark
--- src/qemu/qemu_driver.c| 302 -- src/qemu/qemu_migration.c | 162 ++--- src/qemu/qemu_migration.h | 9 ++ 3 files changed, 417 insertions(+), 56 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt] [PATCH v2 2/5] qemu: Move common parts of Prepare phase to qemu_migration.c

2013-06-25 Thread Jiri Denemark
--- src/qemu/qemu_driver.c| 120 +++--- src/qemu/qemu_migration.c | 44 + src/qemu/qemu_migration.h | 4 ++ 3 files changed, 65 insertions(+), 103 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index

Re: [libvirt] [PATCH 15/21] Adapt virDomainMigrateVersion3 for extensible migration APIs

2013-06-25 Thread Jiri Denemark
On Tue, Jun 25, 2013 at 06:56:35 -0400, John Ferlan wrote: On 06/18/2013 10:05 AM, Jiri Denemark wrote: --- src/libvirt.c | 177 +++--- 1 file changed, 133 insertions(+), 44 deletions(-) ...snip... +if (useParams) { +

Re: [libvirt] [PATCH v2 1/5] qemu: Move internals of Begin phase to qemu_migration.c

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:59:44PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_driver.c| 71 +++--- src/qemu/qemu_migration.c | 86 +-- src/qemu/qemu_migration.h | 2 +- 3 files changed, 89 insertions(+), 70

Re: [libvirt] [PATCH v2 2/5] qemu: Move common parts of Prepare phase to qemu_migration.c

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:59:45PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_driver.c| 120 +++--- src/qemu/qemu_migration.c | 44 + src/qemu/qemu_migration.h | 4 ++ 3 files changed, 65 insertions(+), 103 deletions(-) ACK

Re: [libvirt] [PATCH v2 4/5] Implement extensible migration APIs in qemu driver

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:59:47PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_driver.c| 302 -- src/qemu/qemu_migration.c | 162 ++--- src/qemu/qemu_migration.h | 9 ++ 3 files changed, 417 insertions(+), 56

Re: [libvirt] [PATCH v2 3/5] qemu: Move internals of Confirm phase to qemu_migration.c

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:59:46PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_driver.c| 43 ++--- src/qemu/qemu_migration.c | 225 -- src/qemu/qemu_migration.h | 5 +- 3 files changed, 144 insertions(+), 129 deletions(-) ACK

Re: [libvirt] [PATCH v2 5/5] qemu: Implement support for VIR_MIGRATE_PARAM_GRAPHICS_URI

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 03:59:48PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_driver.c| 14 ++-- src/qemu/qemu_migration.c | 189 +++--- src/qemu/qemu_migration.h | 2 + 3 files changed, 140 insertions(+), 65 deletions(-) ACK Daniel --

Re: [libvirt] [PATCH] Use 1.1.0 everywhere in the documentation

2013-06-25 Thread Jim Fehlig
Ján Tomko wrote: Since we already have the v1.1.0-rc1 tag in git. [...] diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index a311d78..9f52394 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4625,7 +4625,7 @@ static virDriver libxlDriver = {

Re: [libvirt] [PATCH v2 0/5] Make migration APIs more extensible -- qemu patches

2013-06-25 Thread Jiri Denemark
On Tue, Jun 25, 2013 at 15:59:43 +0200, Jiri Denemark wrote: These are the patches for qemu driver that were already acked but had to be reworked due to the introduction of ACL checks. Jiri Denemark (5): qemu: Move internals of Begin phase to qemu_migration.c qemu: Move common parts of

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

2013-06-25 Thread Jim Fehlig
Peter Krempa wrote: Not every timer model is supported with each hypervisor. Explicitly mention the driver supporting each timer model. --- docs/formatdomain.html.in | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in

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

2013-06-25 Thread Michal Novotny
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 caps-qemu-kvm.xml test by maxCpus for one of test emulators On

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

2013-06-25 Thread Michal Novotny
It has been accidentally sent twice. Please ignore and review just one version as both v4 are the same ;-) Also, it has been `make check` and `make syntax-check` tested and passed :-) Thanks, Michal On 06/25/2013 05:44 PM, Michal Novotny wrote: Implement check whether (maximum) vCPUs doesn't

[libvirt] [PATCH] util: fix bug found by Coverity

2013-06-25 Thread Laine Stump
Commit 861d40565 added code (my personal change to clean up the submitter's code, *not* the fault of the submitter) that dereferenced virtVlan without first checking for NULL. This patch fixes that and, as part of the fix, cleans up some unnecessary obtuseness. --- John - Does this eliminate the

Re: [libvirt] [PATCHv2 03/12] pci: make virPCIParseDeviceAddress public

2013-06-25 Thread Laine Stump
On 06/25/2013 06:30 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:29PM -0400, Laine Stump wrote: This function has utility outside of virpci.c, so make it public. --- src/libvirt_private.syms | 1 + src/util/virpci.c| 2 +- src/util/virpci.h| 2 ++ 3 files

Re: [libvirt] [PATCHv2 01/12] pci: eliminate unused driver arg from virPCIDeviceDetach

2013-06-25 Thread Laine Stump
On 06/25/2013 05:50 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:27PM -0400, Laine Stump wrote: The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice object, and virPCIDeviceDetach retrieves it from there). Remove it.

Re: [libvirt] [PATCHv2 04/12] pci: new iommu_group functions

2013-06-25 Thread Laine Stump
On 06/25/2013 06:34 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:30PM -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;

Re: [libvirt] [PATCHv2 01/12] pci: eliminate unused driver arg from virPCIDeviceDetach

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 12:35:03PM -0400, Laine Stump wrote: On 06/25/2013 05:50 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:27PM -0400, Laine Stump wrote: The driver arg to virPCIDeviceDetach is no longer used (the name of the stub driver is now set in the virPCIDevice

Re: [libvirt] [PATCHv2 04/12] pci: new iommu_group functions

2013-06-25 Thread Laine Stump
On 06/25/2013 06:40 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:30PM -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;

Re: [libvirt] [PATCHv2 08/12] qemu: don't reset PCI devices being assigned with VFIO

2013-06-25 Thread Laine Stump
On 06/25/2013 06:44 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:34PM -0400, Laine Stump wrote: I just learned that VFIO resets PCI devices when they are assigned to guests / returned to the host, so it is redundant for libvirt to reset the devices. This patch inhibits calling

Re: [libvirt] [PATCHv2 09/12] pci: virPCIDeviceListAddCopy API

2013-06-25 Thread Laine Stump
On 06/25/2013 06:45 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:35PM -0400, Laine Stump wrote: Make a copy of the device and add the copy to the list. (virPCIDeviceListAdd() adds the original object to the list instead). --- src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCHv2 08/12] qemu: don't reset PCI devices being assigned with VFIO

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 01:06:55PM -0400, Laine Stump wrote: On 06/25/2013 06:44 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:34PM -0400, Laine Stump wrote: I just learned that VFIO resets PCI devices when they are assigned to guests / returned to the host, so it is redundant

Re: [libvirt] [PATCH] util: fix bug found by Coverity

2013-06-25 Thread John Ferlan
On 06/25/2013 12:11 PM, Laine Stump wrote: Commit 861d40565 added code (my personal change to clean up the submitter's code, *not* the fault of the submitter) that dereferenced virtVlan without first checking for NULL. This patch fixes that and, as part of the fix, cleans up some unnecessary

Re: [libvirt] [PATCH] util: fix bug found by Coverity

2013-06-25 Thread Laine Stump
On 06/25/2013 01:30 PM, John Ferlan wrote: On 06/25/2013 12:11 PM, Laine Stump wrote: Commit 861d40565 added code (my personal change to clean up the submitter's code, *not* the fault of the submitter) that dereferenced virtVlan without first checking for NULL. This patch fixes that and, as

Re: [libvirt] [PATCHv2 08/12] qemu: don't reset PCI devices being assigned with VFIO

2013-06-25 Thread Laine Stump
On 06/25/2013 01:09 PM, Daniel P. Berrange wrote: On Tue, Jun 25, 2013 at 01:06:55PM -0400, Laine Stump wrote: On 06/25/2013 06:44 AM, Daniel P. Berrange wrote: On Mon, Jun 24, 2013 at 11:05:34PM -0400, Laine Stump wrote: I just learned that VFIO resets PCI devices when they are assigned to

Re: [libvirt] [RFC PATCH 1/2] LXC: Drop capabilities only if we're not within a user namespace

2013-06-25 Thread Daniel P. Berrange
On Thu, Jun 13, 2013 at 08:02:17PM +0200, Richard Weinberger wrote: Dropping capabilities within a user namespace makes no sense because any uid 0 process will regain all caps upon execve(). That is true, except for the fact that libvirt has removed the capabilities from the bounding set too.

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

2013-06-25 Thread Daniel P. Berrange
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 playing with user namespaces. This is a problem with the way we're initializing mounts in the user namespace. We

Re: [libvirt] [RFC PATCH 1/2] LXC: Drop capabilities only if we're not within a user namespace

2013-06-25 Thread Richard Weinberger
Am 25.06.2013 22:36, schrieb Daniel P. Berrange: On Thu, Jun 13, 2013 at 08:02:17PM +0200, Richard Weinberger wrote: Dropping capabilities within a user namespace makes no sense because any uid 0 process will regain all caps upon execve(). That is true, except for the fact that libvirt has

Re: [libvirt] [RFC PATCH 1/2] LXC: Drop capabilities only if we're not within a user namespace

2013-06-25 Thread Daniel P. Berrange
On Tue, Jun 25, 2013 at 11:52:58PM +0200, Richard Weinberger wrote: Am 25.06.2013 22:36, schrieb Daniel P. Berrange: On Thu, Jun 13, 2013 at 08:02:17PM +0200, Richard Weinberger wrote: Dropping capabilities within a user namespace makes no sense because any uid 0 process will regain all

[libvirt] [PATCHv3] pci: new iommu_group functions

2013-06-25 Thread Laine Stump
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 /sys/kernel/iommu_groups/$n, where $n is the group number (there will be a corresponding

Re: [libvirt] [PATCHv2 00/12] remains of 'support VFIO groups'

2013-06-25 Thread Laine Stump
On 06/24/2013 11:05 PM, Laine Stump wrote: This is what remains of yesterday's VFIO groups patchset that is considered still useful, but wasn't yet ACKed (I've pushed the 5 that were ACKed). In addition, I found a few more bugs in the virPCIDeviceList handling and have included patches for

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

2013-06-25 Thread Gao feng
On 06/14/2013 02:02 AM, Richard Weinberger wrote: Within a user namespace root can remount these filesysems at any time rw. Create these mappings only if we're not playing with user namespaces. Without user namespace,the root user of container can remount all of the filesystem too, since he is

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

2013-06-25 Thread Gao feng
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 playing with user namespaces. This is a problem with the

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

2013-06-25 Thread Laine Stump
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 in untested, or leave the HAL driver without this functionality?

[libvirt] [PATCH] test: include qemuhotplugtest data files in source rpm

2013-06-25 Thread Laine Stump
commit 0fc12bca added a new test called qemuhotplugtest which has several data files in tests/qemuhotplugtestdata, but didn't add that directory to EXTRA_DIST in the tests Makefile.am, so the make check done during a make rpm was failing due to missing data files. --- Pushed under the build