Re: [libvirt] [PATCH v4 9/9] docs: Add vhost-scsi

2016-12-07 Thread Jim Fehlig
On 11/22/2016 02:16 PM, John Ferlan wrote: On 11/21/2016 10:58 PM, Eric Farman wrote: Signed-off-by: Eric Farman --- docs/formatdomain.html.in | 24 1 file changed, 24 insertions(+) This will get squashed in with the conf patch. I'll

Re: [libvirt] [PATCH RFC v3 03/15] storage pools: refactoring of fs backend

2016-12-07 Thread John Ferlan
On 12/02/2016 10:38 AM, Olga Krishtal wrote: > The fs backend for storage pools works a lot with > directories and etc. The same is true for filesystem pools with > directory backend. In order to avoid rewriting the same code once again > patch moves this code to virpoolcommon.c. > I would

Re: [libvirt] [PATCH RFC v3 02/15] storage pools: functions refactoring

2016-12-07 Thread John Ferlan
On 12/02/2016 10:38 AM, Olga Krishtal wrote: > After reusage of all possible storage pool structures > we will able to use some storage pool functions. > > Signed-off-by: Olga Krishtal > --- > src/Makefile.am | 2 +- > src/conf/storage_conf.c | 162 >

Re: [libvirt] [PATCH RFC v3 01/15] storage pools: refactoring of basic structs

2016-12-07 Thread John Ferlan
On 12/02/2016 10:38 AM, Olga Krishtal wrote: > This is the first patch in fspool patchest. > FSPool and storage pools has a lot in common, however we > want to have separate drivers for its managment. > > We want to use almost all storage pool descriptional structures > for filesystem pool. All

Re: [libvirt] [PATCH v2] storage: vz storage pool support

2016-12-07 Thread John Ferlan
[...] >>> >> I see what you mean; however, IMO vstorage should be separate. Maybe >> there's another opinion out there, but since you're requiring >> "something" else to be installed in order to get the WITH_VSTORAGE to be >> set to 1, then a separate file is in order. >> >> Not sure they're

Re: [libvirt] [PATCH v2] storage: vz storage pool support

2016-12-07 Thread Olga Krishtal
On 06/12/16 22:26, John Ferlan wrote: On 12/06/2016 06:10 AM, Olga Krishtal wrote: On 06/12/16 02:59, John Ferlan wrote: On 12/02/2016 12:09 PM, Olga Krishtal wrote: On 20/09/16 23:30, John Ferlan wrote: On 07/14/2016 01:13 PM, Olga Krishtal wrote: This patch supports pool and volume

Re: [libvirt] [PATCH v4 4/4] gluster: cache glfs connection object per volume

2016-12-07 Thread Peter Krempa
On Tue, Dec 06, 2016 at 22:52:01 +0530, Prasanna Kumar Kalever wrote: > Currently, in case if we have 4 extra attached disks, then for each disk > we need to call 'glfs_init' (over network) and friends which could be costly. > > Additionally snapshot(external) scenario will further complex the

Re: [libvirt] [Qemu-ppc] [RFC PATCH qemu] spapr_pci: Create PCI-express root bus by default

2016-12-07 Thread Andrea Bolognani
[Added Marcel to CC] On Wed, 2016-12-07 at 15:11 +1100, David Gibson wrote: > > Is the difference between q35 and pseries guests with > > respect to PCIe only relevant when it comes to assigned > > devices, or in general? I'm asking this because you seem to > > focus entirely on assigned devices.

Re: [libvirt] [PATCH v2 3/3] security: Drop virSecurityManagerSetHugepages

2016-12-07 Thread Ján Tomko
On Tue, Nov 29, 2016 at 10:31:13AM +0100, Michal Privoznik wrote: Since its introduction in 2012 this internal API did nothing. Moreover we have the same API that does exactly the same: virSecurityManagerDomainSetPathLabel. Signed-off-by: Michal Privoznik ---

Re: [libvirt] [PATCH v2 2/3] qemu: Create hugepage path on per domain basis

2016-12-07 Thread Ján Tomko
On Tue, Nov 29, 2016 at 10:31:12AM +0100, Michal Privoznik wrote: If you've ever tried running a huge page backed guest under different user than root, you probably failed. Problem is even Should this be: different than the user in qemu.conf? though we have corresponding APIs in the security

Re: [libvirt] [PATCH v4 2/4] storage: optimize calls to virStorageFileInit and friends

2016-12-07 Thread Peter Krempa
On Tue, Dec 06, 2016 at 22:51:59 +0530, Prasanna Kumar Kalever wrote: > Currently, each among virStorageFileGetMetadataRecurse, > qemuSecurityChownCallback, qemuDomainSnapshotPrepareDiskExternal and > qemuDomainSnapshotCreateSingleDiskActive makes calls to virStorageFileInit > and friends for

Re: [libvirt] Libvirt domain event usage and consistency

2016-12-07 Thread Fabian Deutsch
On Wed, Dec 7, 2016 at 8:26 AM, Michal Privoznik wrote: > On 06.12.2016 14:12, Roman Mohr wrote: >> On Fri, Nov 25, 2016 at 4:34 PM, Michal Privoznik >> wrote: >> >>> On 25.11.2016 14:38, Roman Mohr wrote: >>> >>> >> [...] >> >> 4) There

Re: [libvirt] [PATCH v2 1/3] virDomainObjGetShortName: take virDomainDef

2016-12-07 Thread Ján Tomko
On Tue, Nov 29, 2016 at 10:31:11AM +0100, Michal Privoznik wrote: So far this function takes virDomainObjPtr which: 1) is an overkill, 2) might be not available in all the places we will use it. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 4 ++--

[libvirt] [PATCH 2/2] docs: Adjust pool/vol target output

2016-12-07 Thread John Ferlan
Looks like the and were put in the wrong place... They're not elements, rather they are elements Signed-off-by: John Ferlan --- docs/formatstorage.html.in | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/formatstorage.html.in

[libvirt] [PATCH 0/2] Fix some storage vol formatting issues (code and doc)

2016-12-07 Thread John Ferlan
While reviewing another set of changes I tripped across this. John Ferlan (2): conf: Format the "nocow" field. docs: Adjust pool/vol target output docs/formatstorage.html.in | 16 src/conf/storage_conf.c| 2 ++

[libvirt] [PATCH 1/2] conf: Format the "nocow" field.

2016-12-07 Thread John Ferlan
Commit id 'a9fd30e63' added a '' field to be parsed, but didn't Format the field on output. This patch fixes that and adds the vol-qcow2-nocow test to/for storagevolxml2xml Signed-off-by: John Ferlan --- src/conf/storage_conf.c| 2 ++

Re: [libvirt] [PATCH 4/4] configure: sort libvirt macros

2016-12-07 Thread Pavel Hrdina
On Wed, Dec 07, 2016 at 03:15:16PM +, Daniel P. Berrange wrote: > On Wed, Dec 07, 2016 at 04:08:14PM +0100, Pavel Hrdina wrote: > > Signed-off-by: Pavel Hrdina > > --- > > configure.ac | 8 > > 1 file changed, 4 insertions(+), 4 deletions(-) > > ACK Thanks, all

[libvirt] [PATCH 0/4] first part of configure cleanup and one bug fix

2016-12-07 Thread Pavel Hrdina
Pavel Hrdina (4): configure: cleanup openwsman leftovers configure: remove check for CPUID m4/virt-lib: properly pass header_name in LIBVIRT_CHECK_LIB(_ALT) configure: sort libvirt macros configure.ac | 32 m4/virt-lib.m4| 6 +++---

Re: [libvirt] [PATCH 4/4] configure: sort libvirt macros

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 04:08:14PM +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > configure.ac | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) ACK Regards, Daniel -- |: http://berrange.com -o-

[libvirt] [PATCH 2/4] configure: remove check for CPUID

2016-12-07 Thread Pavel Hrdina
This check is not required because all i386 and x86_64 cpus have the cpuid instruction. Signed-off-by: Pavel Hrdina --- configure.ac | 19 --- src/cpu/cpu_x86.c | 4 ++-- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/configure.ac

Re: [libvirt] [PATCH 3/4] m4/virt-lib: properly pass header_name in LIBVIRT_CHECK_LIB(_ALT)

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 04:08:13PM +0100, Pavel Hrdina wrote: > The *header_name* cannot be quoted, otherwise it is not translated to > the passed argument. Without this fix the generated configure contains > *ac_cv_header_header_name*, but there should be for example > *ac_cv_header_sals_sasl_h*

Re: [libvirt] [PATCH 1/4] configure: cleanup openwsman leftovers

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 04:08:11PM +0100, Pavel Hrdina wrote: > Commit a99bfb4b moved openwsman to its onw file but forget to remove > those few lines. > > Signed-off-by: Pavel Hrdina > --- > configure.ac | 5 - > 1 file changed, 5 deletions(-) > > diff --git

Re: [libvirt] [PATCH 2/4] configure: remove check for CPUID

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 04:08:12PM +0100, Pavel Hrdina wrote: > This check is not required because all i386 and x86_64 cpus have the > cpuid instruction. Technically cpuid was only introduced in i486 cpus or later. Of course no one is going to be running libvirt on anything older than an i686, so

Re: [libvirt] [RFC] phi support in libvirt

2016-12-07 Thread Daniel P. Berrange
On Mon, Dec 05, 2016 at 04:12:22PM +, Feng, Shaohe wrote: > Hi all: > > As we are know Intel® Xeon phi targets high-performance computing and other > parallel workloads. > Now qemu has supported phi virtualization,it is time for libvirt to support > phi. Can you provide pointer to the

[libvirt] [PATCH 4/4] configure: sort libvirt macros

2016-12-07 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- configure.ac | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 3b129e0207..d8802808b8 100644 --- a/configure.ac +++ b/configure.ac @@ -248,9 +248,11 @@ LIBVIRT_CHECK_CURL

[libvirt] [PATCH 1/4] configure: cleanup openwsman leftovers

2016-12-07 Thread Pavel Hrdina
Commit a99bfb4b moved openwsman to its onw file but forget to remove those few lines. Signed-off-by: Pavel Hrdina --- configure.ac | 5 - 1 file changed, 5 deletions(-) diff --git a/configure.ac b/configure.ac index 3802e5910c..6f04bdc1f6 100644 --- a/configure.ac +++

[libvirt] [PATCH 3/4] m4/virt-lib: properly pass header_name in LIBVIRT_CHECK_LIB(_ALT)

2016-12-07 Thread Pavel Hrdina
The *header_name* cannot be quoted, otherwise it is not translated to the passed argument. Without this fix the generated configure contains *ac_cv_header_header_name*, but there should be for example *ac_cv_header_sals_sasl_h* for "sasl/sasl.h". Signed-off-by: Pavel Hrdina

Re: [libvirt] [PATCH] AppArmor: allow QEMU to set_process_name.

2016-12-07 Thread Jamie Strandboge
On Wed, 2016-12-07 at 08:37 +0100, Christian Ehrhardt wrote: > On Tue, Dec 6, 2016 at 5:40 PM, Jamie Strandboge > wrote: > > > > > I forgot to reiterate: the above is true *unless* there is another > > non-DAC, non- > > MAC kernel mediation (eg, does the kernel only allow

Re: [libvirt] [PATCH v4 3/4] virStorageFileDeinit: don't free metadata used for storage driver access

2016-12-07 Thread Peter Krempa
On Tue, Dec 06, 2016 at 22:52:00 +0530, Prasanna Kumar Kalever wrote: > Let the metadata for storage driver access to remote and local volumes > be cleaned by its respective driver *Deinit methods. > > This will be used in the next patch, which will implement a connection > cache for/in gluster

Re: [libvirt] [PATCH v4 1/4] util: change the virStorageNetHostDef type

2016-12-07 Thread Peter Krempa
On Tue, Dec 06, 2016 at 22:51:58 +0530, Prasanna Kumar Kalever wrote: > Currently, the Host object looks like > > struct _virStorageNetHostDef { > char *name; > char *port; > int transport; /* virStorageNetHostTransport */ > char *socket; /* path to unix socket */

[libvirt] [PATCH 0/2] Couple of recently found Coverity issues

2016-12-07 Thread John Ferlan
Nuisance for some, but both have negative repurcussions although one is "just" a test. John Ferlan (2): tests: Fix virmacmaptest when allocation fails nss: Need to check error condition on virJSONValueArraySize tests/virmacmaptest.c | 9 +++-- tools/nss/libvirt_nss.c | 3 ++- 2 files

[libvirt] [PATCH 2/2] nss: Need to check error condition on virJSONValueArraySize

2016-12-07 Thread John Ferlan
If the 'nleases < 0' on return, then the subsequent call to findLeaseInJSON will not produce the expected results (passed in as a size_t, but nleases is a ssize_t). So check if the returned value < 0 and if so, goto cleanup. Found by Coverity as a NEGATIVE_RETURNS event Signed-off-by: John

[libvirt] [PATCH 1/2] tests: Fix virmacmaptest when allocation fails

2016-12-07 Thread John Ferlan
If the allocation fails in DO_TEST_FLUSH_PROLOGUE, then 'mgr == NULL', but the code continues on - which won't be good. So modify the macro to cause an immediate failure and jump to a cleanup label. Found by Coverity as FORWARD_NULL event. Signed-off-by: John Ferlan ---

Re: [libvirt] [PATCH v2 1/2] perf: add one more perf event support

2016-12-07 Thread John Ferlan
On 12/07/2016 05:57 AM, Nitesh Konkar wrote: > With current perf framework, this patch adds support and documentation > for branch instructions perf event. > > Signed-off-by: Nitesh Konkar > --- > docs/formatdomain.html.in | 6 ++ >

Re: [libvirt] [PATCH v2 2/2] perf: reformat documentation on perf events.

2016-12-07 Thread John Ferlan
On 12/07/2016 05:57 AM, Nitesh Konkar wrote: > Signed-off-by: Nitesh Konkar > --- > src/libvirt-domain.c | 48 +++- > 1 file changed, 27 insertions(+), 21 deletions(-) > I went ahead and created something yesterday -

Re: [libvirt] [PATCH v1 16/21] qemu: Enter the namespace on relabelling

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 11:19:46AM +0100, Michal Privoznik wrote: > On 07.12.2016 09:51, Daniel P. Berrange wrote: > > On Mon, Dec 05, 2016 at 02:25:25PM +, Daniel P. Berrange wrote: > >> On Mon, Dec 05, 2016 at 03:14:50PM +0100, Michal Privoznik wrote: > >>> On 05.12.2016 14:40, Daniel P.

[libvirt] [PATCH v2 2/2] perf: reformat documentation on perf events.

2016-12-07 Thread Nitesh Konkar
Signed-off-by: Nitesh Konkar --- src/libvirt-domain.c | 48 +++- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index fa28217..203e189 100644 ---

[libvirt] [PATCH v2 1/2] perf: add one more perf event support

2016-12-07 Thread Nitesh Konkar
With current perf framework, this patch adds support and documentation for branch instructions perf event. Signed-off-by: Nitesh Konkar --- docs/formatdomain.html.in | 6 ++ docs/schemas/domaincommon.rng | 1 +

Re: [libvirt] [PATCH 0/4] docs: Cleanup formatnetwork a bit

2016-12-07 Thread Michal Privoznik
On 07.12.2016 11:08, Jiri Denemark wrote: > Jiri Denemark (4): > formatnetwork: Remove useless > formatnetwork: Split long lines > formatnetwork: Remove extra white space in examples > formatnetwork: Properly mark attributes of /network/dns/srv > > docs/formatnetwork.html.in | 99 >

Re: [libvirt] [PATCH v1 16/21] qemu: Enter the namespace on relabelling

2016-12-07 Thread Michal Privoznik
On 07.12.2016 09:51, Daniel P. Berrange wrote: > On Mon, Dec 05, 2016 at 02:25:25PM +, Daniel P. Berrange wrote: >> On Mon, Dec 05, 2016 at 03:14:50PM +0100, Michal Privoznik wrote: >>> On 05.12.2016 14:40, Daniel P. Berrange wrote: On Thu, Nov 24, 2016 at 03:48:05PM +0100, Michal

Re: [libvirt] [PATCH v2] test: fix screenshot API impl

2016-12-07 Thread Michal Privoznik
On 07.12.2016 10:52, Daniel P. Berrange wrote: > When redoing the website we deleted the libvirtLogo.png file > not remembering that the test driver screenshot API impl > relied on it. > > Rather than having the test driver use the logo as a side > effect, give it its own dedicated image to use.

[libvirt] [PATCH 2/4] formatnetwork: Split long lines

2016-12-07 Thread Jiri Denemark
Let's make sure all examples fit into their grey boxes. Signed-off-by: Jiri Denemark --- docs/formatnetwork.html.in | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index

[libvirt] [PATCH 1/4] formatnetwork: Remove useless

2016-12-07 Thread Jiri Denemark
Almost all XML examples use rather than if the element is empty. Let's remove the two instances of the latter. Signed-off-by: Jiri Denemark --- docs/formatnetwork.html.in | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/formatnetwork.html.in

[libvirt] [PATCH 3/4] formatnetwork: Remove extra white space in examples

2016-12-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- docs/formatnetwork.html.in | 74 +++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index 31d2b8b0b..a74724747 100644 ---

[libvirt] [PATCH 0/4] docs: Cleanup formatnetwork a bit

2016-12-07 Thread Jiri Denemark
Jiri Denemark (4): formatnetwork: Remove useless formatnetwork: Split long lines formatnetwork: Remove extra white space in examples formatnetwork: Properly mark attributes of /network/dns/srv docs/formatnetwork.html.in | 99 -- 1 file

[libvirt] [PATCH 4/4] formatnetwork: Properly mark attributes of /network/dns/srv

2016-12-07 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- docs/formatnetwork.html.in | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in index a74724747..cc7d7c7e7 100644 --- a/docs/formatnetwork.html.in +++

Re: [libvirt] [PATCH 0/3] Fix for generated api docs

2016-12-07 Thread Michal Privoznik
On 06.12.2016 14:57, John Ferlan wrote: > The Makefile.am adjustment works for me - although it's not my preferred > area of the environment to touch, so if there's a "better" way - let me know. > > The GetAllDomainStats current output is just an unreadable mass. This cleans > it up a bit

Re: [libvirt] [PATCH] test: fix screenshot API impl

2016-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2016 at 10:30:56AM +0100, Michal Privoznik wrote: > On 06.12.2016 13:49, Daniel P. Berrange wrote: > > When redoing the website we deleted the libvirtLogo.png file > > not remembering that the test driver screenshot API impl > > relied on it. > > > > Rather than having the test

[libvirt] [PATCH v2] test: fix screenshot API impl

2016-12-07 Thread Daniel P. Berrange
When redoing the website we deleted the libvirtLogo.png file not remembering that the test driver screenshot API impl relied on it. Rather than having the test driver use the logo as a side effect, give it its own dedicated image to use. This is installed in /usr/share/libvirt/test-screenshot.png

Re: [libvirt] [PATCH] test: fix screenshot API impl

2016-12-07 Thread Michal Privoznik
On 06.12.2016 13:49, Daniel P. Berrange wrote: > When redoing the website we deleted the libvirtLogo.png file > not remembering that the test driver screenshot API impl > relied on it. > > Rather than having the test driver use the logo as a side > effect, give it its own dedicated image to use.

Re: [libvirt] [PATCH 0/2] qemu: capabilities: Bump 2.8.0 caps to new version and adapt to changes

2016-12-07 Thread Jiri Denemark
On Wed, Dec 07, 2016 at 10:20:33 +0100, Peter Krempa wrote: > Peter Krempa (2): > test: qemucaps: Bump 2.8.0 state to current master > qemu: capabilities: Add gluster.debug_level detection for 2.8.0+ > > src/qemu/qemu_capabilities.c | 1 + >

[libvirt] [PATCH 2/2] qemu: capabilities: Add gluster.debug_level detection for 2.8.0+

2016-12-07 Thread Peter Krempa
Qemu 2.8.0+ changes arguments structure for blockdev-add in the effort to make it finally stable. Since libvirt recently added the detection of gluster debug support relying on the old syntax we need to add the new as well. --- src/qemu/qemu_capabilities.c | 1 +

[libvirt] [PATCH 0/2] qemu: capabilities: Bump 2.8.0 caps to new version and adapt to changes

2016-12-07 Thread Peter Krempa
Peter Krempa (2): test: qemucaps: Bump 2.8.0 state to current master qemu: capabilities: Add gluster.debug_level detection for 2.8.0+ src/qemu/qemu_capabilities.c | 1 + tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 12 ++--

[libvirt] [PATCH 1/2] test: qemucaps: Bump 2.8.0 state to current master

2016-12-07 Thread Peter Krempa
Qemu decided to change a parameter name in rc-state which was not captured by the 2.8.0 data. Bump it to current version. --- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 12 ++-- tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 4 ++-- 2 files changed, 8 insertions(+), 8

Re: [libvirt] [PATCH 1/6] s390: Cpu driver support for update and compare

2016-12-07 Thread Jiri Denemark
On Tue, Dec 06, 2016 at 17:14:07 -0500, Jason J. Herne wrote: > On 11/28/2016 04:55 AM, Jiri Denemark wrote: > ... > > > +static virCPUCompareResult > > > +virCPUs390Compare(virCPUDefPtr host ATTRIBUTE_UNUSED, > > > + virCPUDefPtr cpu ATTRIBUTE_UNUSED, > > > + bool

Re: [libvirt] [PATCH v3 3/3] gluster: cache glfs connection object per volume

2016-12-07 Thread Peter Krempa
On Tue, Dec 06, 2016 at 22:48:39 +0530, Prasanna Kalever wrote: > On Mon, Dec 5, 2016 at 8:08 PM, Peter Krempa wrote: > > On Mon, Dec 05, 2016 at 18:55:19 +0530, Prasanna Kumar Kalever wrote: > >> Currently, in case if we have 4 extra attached disks, then for each disk > >> we

Re: [libvirt] [PATCH v1 16/21] qemu: Enter the namespace on relabelling

2016-12-07 Thread Daniel P. Berrange
On Mon, Dec 05, 2016 at 02:25:25PM +, Daniel P. Berrange wrote: > On Mon, Dec 05, 2016 at 03:14:50PM +0100, Michal Privoznik wrote: > > On 05.12.2016 14:40, Daniel P. Berrange wrote: > > > On Thu, Nov 24, 2016 at 03:48:05PM +0100, Michal Privoznik wrote: > > >> Instead of trying to fix our

Re: [libvirt] [PATCH] test: fix screenshot API impl

2016-12-07 Thread Andrea Bolognani
On Tue, 2016-12-06 at 16:54 +, Daniel P. Berrange wrote: > > How about a pngcrush'd 640x480 solid color? Not only it would > > be way smaller, but we would also remove any possible confusion > > about it being an actual screenshot of a running domain. >  > I think it is desirable to have it

[libvirt] [PATCH v2 15/21] qemu: Enter the namespace on relabelling

2016-12-07 Thread Michal Privoznik
Instead of trying to fix our security drivers, we can use a simple trick to relabel paths in both namespace and the host. I mean, if we enter the namespace some paths are still shared with the host so any change done to them is visible from the host too. Therefore, we can just enter the namespace

[libvirt] [PATCH v2 18/21] qemu: Manage /dev entry on chardev hotplug

2016-12-07 Thread Michal Privoznik
When attaching a device to a domain that's using separate mount namespace we must maintain /dev entries in order for qemu process to see them. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 64 +++--

[libvirt] [PATCH v2 17/21] qemu: Manage /dev entry on hostdev hotplug

2016-12-07 Thread Michal Privoznik
When attaching a device to a domain that's using separate mount namespace we must maintain /dev entries in order for qemu process to see them. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 157 ++-

[libvirt] [PATCH v2 13/21] qemu: Prepare inputs when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 49 + 1 file changed, 49

[libvirt] [PATCH v2 05/21] virscsi: Introduce virSCSIDeviceGetPath

2016-12-07 Thread Michal Privoznik
We will need this function in near future so that we know what /dev device corresponds to the SCSI device. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virscsi.c | 6 ++ src/util/virscsi.h | 1 + 3 files changed, 8

[libvirt] [PATCH v2 21/21] qemu: Enable mount namespace

2016-12-07 Thread Michal Privoznik
Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0308170e7..9769c11a5 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@

[libvirt] [PATCH v2 06/21] virscsivhost: Introduce virSCSIVHostDeviceGetPath

2016-12-07 Thread Michal Privoznik
We will need this function in near future so that we know what /dev device corresponds to the SCSI device. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virscsivhost.c | 7 +++ src/util/virscsivhost.h | 1 + 3 files changed, 9

[libvirt] [PATCH v2 10/21] qemu: Prepare hostdevs when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 161 + 1 file changed, 161

[libvirt] [PATCH v2 00/21] Run qemu under its own namespace

2016-12-07 Thread Michal Privoznik
v1 posted here: https://www.redhat.com/archives/libvir-list/2016-November/msg01208.html diff to v1: - I've dropped the patches for hugepages which are posted separately [1] - I've reworked some parts according to Dan's suggestions - Filled missing impl for virSCSIVHostDevice which was merged

[libvirt] [PATCH v2 09/21] qemu: Prepare disks when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 50 ++ 1 file changed, 50

[libvirt] [PATCH v2 20/21] qemu: Let users opt-out from containerization

2016-12-07 Thread Michal Privoznik
Given how intrusive previous patches are, it might happen that there's a bug or imperfection. Lets give users a way out: if they set 'namespaces' to an empty array in qemu.conf the feature is suppressed. Signed-off-by: Michal Privoznik --- src/qemu/libvirtd_qemu.aug

[libvirt] [PATCH v2 16/21] qemu: Manage /dev entry on disk hotplug

2016-12-07 Thread Michal Privoznik
When attaching a device to a domain that's using separate mount namespace we must maintain /dev entries in order for qemu process to see them. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 214 +++

[libvirt] [PATCH v2 07/21] qemu_cgroup: Expose defaultDeviceACL

2016-12-07 Thread Michal Privoznik
This is a list of devices that qemu needs for its run (apart from what's configured for domain). The devices on the list are enabled in the CGroups by default so they will be good candidates for initial /dev for new qemu. Signed-off-by: Michal Privoznik ---

[libvirt] [PATCH v2 11/21] qemu: Prepare chardevs when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 35 +++ 1 file changed, 35 insertions(+)

[libvirt] [PATCH v2 19/21] qemu: Manage /dev entry on RNG hotplug

2016-12-07 Thread Michal Privoznik
When attaching a device to a domain that's using separate mount namespace we must maintain /dev entries in order for qemu process to see them. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 70 +++--

[libvirt] [PATCH v2 01/21] virprocess: Introduce virProcessSetupPrivateMountNS

2016-12-07 Thread Michal Privoznik
This part of code that LXC currently uses will be reused so move to a generic function. Signed-off-by: Michal Privoznik --- configure.ac | 2 +- src/libvirt_private.syms | 1 + src/lxc/lxc_controller.c | 18 +- src/util/virprocess.c| 38

[libvirt] [PATCH v2 03/21] virfile: Introduce ACL helpers

2016-12-07 Thread Michal Privoznik
Namely, virFileGetACLs, virFileSetACLs, virFileFreeACLs and virFileCopyACLs. These functions are going to be required when we are creating /dev for qemu. We have copy anything that's in host's /dev exactly as is. Including ACLs. Signed-off-by: Michal Privoznik ---

[libvirt] [PATCH v2 12/21] qemu: Prepare TPM when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 32 1 file changed, 32 insertions(+) diff

[libvirt] [PATCH v2 04/21] virusb: Introduce virUSBDeviceGetPath

2016-12-07 Thread Michal Privoznik
We will need this function in near future so that we know what /dev device corresponds to the USB device. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 1 + src/util/virusb.c| 5 + src/util/virusb.h| 1 + 3 files changed, 7 insertions(+)

[libvirt] [PATCH v2 08/21] qemu: Spawn qemu under mount namespace

2016-12-07 Thread Michal Privoznik
Prime time. When it comes to spawning qemu process and relabelling all the devices it's going to touch, there's inherent race with other applications in the system (e.g. udev). Instead of trying convincing udev to not touch libvirt managed devices, we can create a separate mount namespace for the

[libvirt] [PATCH v2 02/21] virfile: Introduce virFileSetupDev

2016-12-07 Thread Michal Privoznik
This part of code that LXC currently uses will be reused so move to a generic function. Signed-off-by: Michal Privoznik --- src/libvirt_private.syms | 2 ++ src/lxc/lxc_container.c | 20 ++ src/lxc/lxc_controller.c | 14 +- src/util/virfile.c |

[libvirt] [PATCH v2 14/21] qemu: Prepare RNGs when starting a domain

2016-12-07 Thread Michal Privoznik
When starting a domain and separate mount namespace is used, we have to create all the /dev entries that are configured for the domain. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 43 +++ 1 file changed, 43

Re: [libvirt] Libvirt domain event usage and consistency

2016-12-07 Thread Roman Mohr
On Wed, Dec 7, 2016 at 8:38 AM, Fabian Deutsch wrote: > On Wed, Dec 7, 2016 at 8:26 AM, Michal Privoznik > wrote: > > On 06.12.2016 14:12, Roman Mohr wrote: > >> On Fri, Nov 25, 2016 at 4:34 PM, Michal Privoznik > >> wrote: > >> >

Re: [libvirt] [PATCH v3] cgroup: Use system reported "unlimited" value for comparison

2016-12-07 Thread Viktor Mihajlovski
On 07.12.2016 07:51, Martin Kletzander wrote: > On Tue, Dec 06, 2016 at 01:03:29PM +0100, Viktor Mihajlovski > wrote: >> With kernel 3.18 (since commit >> 3e32cb2e0a12b6915056ff04601cf1bb9b44f967) the "unlimited" value >> for cgroup memory limits has changed once again as its byte value >> is now