Re: [libvirt] [PATCH v5 2/3] nwfilter: Convert _virNWFilterObjList to use virObjectRWLockable

2018-02-12 Thread Michal Privoznik
On 02/08/2018 02:34 PM, John Ferlan wrote: > > > On 02/08/2018 08:13 AM, Michal Privoznik wrote: >> On 02/06/2018 08:20 PM, John Ferlan wrote: >>> Implement the self locking object list for nwfilter object lists >>> that uses two hash tables to store the nwfilter object by UUID or >>> by Name.

Re: [libvirt] [PATCH v2] vcpupin: add clear feature

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 03:54:21AM -0500, Yi Wang wrote: > We can't clear vcpupin settings of XML once we did vcpupin > command, this is not convenient under some condition such > as migration to a host with less CPUs. > > This patch introduces clear feature, which can clear vcpuin > setting of

Re: [libvirt] [PATCH] virlog: determine the hostname on startup CVE-2018-XXX

2018-02-12 Thread Daniel P . Berrangé
On Sat, Feb 10, 2018 at 07:06:22AM +0100, Michal Privoznik wrote: > On 02/07/2018 02:13 PM, Daniel P. Berrangé wrote: > > On Wed, Feb 07, 2018 at 09:58:21AM +0530, P J P wrote: > >> +-- On Mon, 5 Feb 2018, Daniel P. Berrangé wrote --+ > >> | From: Lubomir Rintel > >> | > >> | At

Re: [libvirt] [PATCH] virlog: Allow opting out from logging

2018-02-12 Thread Daniel P . Berrangé
On Sat, Feb 10, 2018 at 09:02:59AM +0100, Michal Privoznik wrote: > After 759b4d1b0fe5f we are getting hostname in virLogOnceInit(). > Problem with this approach is in the NSS module because the > module calls some internal APIs which occasionally want to log > something. This results in

[libvirt] [PATCH 3/6] virNWFilterObj: Turn into virObjectLockable

2018-02-12 Thread Michal Privoznik
The virNWFilterObj requires recursive locks, otherwise it is regular virObject. So when creating the object we must call virObjectRecursiveLockableNew(). Other than that, this is pure replacement of virNWFilterObj*() APIs with thei virObject*() counterparts. Based-on-work-of: John Ferlan

[libvirt] [PATCH 4/6] conf: Introduce and use virNWFilterObjEndAPI

2018-02-12 Thread Michal Privoznik
Have every API that is getting a virNWFilterObj from virNWFilterObjList grab a reference and at the same time wrap Unlock() + Unref() calls into virNWFilterObjEndAPI(). Based-on-work-of: John Ferlan Signed-off-by: Michal Privoznik ---

Re: [libvirt] [PATCH] virutil: Introduce virGetHostnameSimple()

2018-02-12 Thread Michal Privoznik
On 02/12/2018 11:42 AM, Daniel P. Berrangé wrote: > On Mon, Feb 12, 2018 at 11:29:21AM +0100, Michal Privoznik wrote: >> After 759b4d1b0fe5f we are getting hostname in virLogOnceInit(). >> Problem with this approach is in the NSS module because the >> module calls some internal APIs which

[libvirt] [PATCH 1/6] virObject: use virReportSystemError if applicable

2018-02-12 Thread Michal Privoznik
When initializing a mutex (either regular or RW) the virMutexInit() and virRWLockInit() functions set errno and return -1. It's a pity we don't use virReportSystemError() in that case rather plain virReportError(). Signed-off-by: Michal Privoznik --- src/util/virobject.c |

Re: [libvirt] [PATCH v3 08/15] conf: expand network device callbacks to cover resolving NIC type

2018-02-12 Thread Daniel P . Berrangé
On Fri, Feb 09, 2018 at 05:09:36PM -0500, John Ferlan wrote: > > > On 02/05/2018 10:28 AM, Daniel P. Berrangé wrote: > > Currently the QEMU driver will call directly into the network driver > > impl to modify resolve the atual type of NICs with type=network. It > > has todo this before it has

Re: [libvirt] [PATCH v5 2/3] nwfilter: Convert _virNWFilterObjList to use virObjectRWLockable

2018-02-12 Thread Michal Privoznik
On 02/09/2018 12:47 PM, Stefan Berger wrote: > On 02/09/2018 01:48 AM, Michal Privoznik wrote: >> On 02/08/2018 10:13 PM, Stefan Berger wrote: >>> On 02/08/2018 08:13 AM, Michal Privoznik wrote: On 02/06/2018 08:20 PM, John Ferlan wrote: > Implement the self locking object list for

[libvirt] [PATCH] log: fix deadlock obtaining hostname (related CVE-2018-6764)

2018-02-12 Thread Daniel P . Berrangé
The fix for CVE-2018-6764 introduced a potential deadlock scenario that gets triggered by the NSS module when virGetHostname() calls getaddrinfo to resolve the hostname: #0 0x7f6e714b57e7 in futex_wait #1 futex_wait_simple #2 __pthread_once_slow #3 0x7f6e71d16e7d in virOnce #4

Re: [libvirt] [PATCH] virutil: Introduce virGetHostnameSimple()

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 11:29:21AM +0100, Michal Privoznik wrote: > After 759b4d1b0fe5f we are getting hostname in virLogOnceInit(). > Problem with this approach is in the NSS module because the > module calls some internal APIs which occasionally want to log > something. This results in

Re: [libvirt] [PATCH 2/6] virObject: Introduce virObjectRecursiveLockableNew

2018-02-12 Thread Michal Privoznik
On 02/12/2018 01:10 PM, Peter Krempa wrote: > On Mon, Feb 12, 2018 at 11:52:49 +0100, Michal Privoznik wrote: >> Sometimes we need the lock in virObjectLockable to be recursive. >> Because of the nature of pthreads we don't need a special class >> for that - the pthread_* APIs don't distinguish

Re: [libvirt] [PATCH 2/6] virObject: Introduce virObjectRecursiveLockableNew

2018-02-12 Thread John Ferlan
On 02/12/2018 05:52 AM, Michal Privoznik wrote: > Sometimes we need the lock in virObjectLockable to be recursive. > Because of the nature of pthreads we don't need a special class > for that - the pthread_* APIs don't distinguish between normal > and recursive locks. > > Based-on-work-of: John

Re: [libvirt] [PATCH REBASE 1/2] tests: Add some tests for PCI controller options

2018-02-12 Thread Andrea Bolognani
On Sun, 2018-02-11 at 08:12 -0500, John Ferlan wrote: > On 02/05/2018 11:08 AM, Andrea Bolognani wrote: > > The input configurations set all existing options for all PCI > > controllers, to see what ends up showing up in the output. > > Not quite sure I understand the need. The only capability

[libvirt] [PATCH] virutil: Introduce virGetHostnameSimple()

2018-02-12 Thread Michal Privoznik
After 759b4d1b0fe5f we are getting hostname in virLogOnceInit(). Problem with this approach is in the NSS module because the module calls some internal APIs which occasionally want to log something. This results in virLogInitialize() to be called which in turn ends up calling virGetHostnameQuiet()

Re: [libvirt] [PATCH v2] qemu: Expose rx/tx_queue_size in qemu.conf too

2018-02-12 Thread Martin Kletzander
On Thu, Feb 01, 2018 at 09:58:17AM -0500, John Ferlan wrote: On 02/01/2018 09:04 AM, Michal Privoznik wrote: In 2074ef6cd4a2 and c56cdf259 (and friends) we've added two attributes to virtio NICs: rx_queue_size and tx_queue_size. However, sysadmins might want to set these on per-host basis but

Re: [libvirt] [PATCH 2/6] virObject: Introduce virObjectRecursiveLockableNew

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 11:52:49 +0100, Michal Privoznik wrote: > Sometimes we need the lock in virObjectLockable to be recursive. > Because of the nature of pthreads we don't need a special class > for that - the pthread_* APIs don't distinguish between normal > and recursive locks. > >

Re: [libvirt] [PATCH v2] qemu: Expose rx/tx_queue_size in qemu.conf too

2018-02-12 Thread Michal Privoznik
On 02/12/2018 01:05 PM, Daniel P. Berrangé wrote: > On Mon, Feb 12, 2018 at 12:44:52PM +0100, Martin Kletzander wrote: >> On Thu, Feb 01, 2018 at 09:58:17AM -0500, John Ferlan wrote: >>> >>> >>> On 02/01/2018 09:04 AM, Michal Privoznik wrote: In 2074ef6cd4a2 and c56cdf259 (and friends) we've

Re: [libvirt] [PATCH] log: fix deadlock obtaining hostname (related CVE-2018-6764)

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 11:52:43AM +0100, Michal Privoznik wrote: > On 02/12/2018 11:08 AM, Daniel P. Berrangé wrote: > > The fix for CVE-2018-6764 introduced a potential deadlock scenario > > that gets triggered by the NSS module when virGetHostname() calls > > getaddrinfo to resolve the

[libvirt] [PATCH] tests: fix running of qemuxml2argvtest program

2018-02-12 Thread Daniel P . Berrangé
The previous commit: commit a455d41e3e1c1af3a36ccdbb2e3f2356cc58993e Author: Daniel P. Berrangé Date: Thu Jan 25 09:35:50 2018 + conf: expand network device callbacks to cover resolving NIC type mistakenly dropped qemuxml2argvtest from the tests due to a

Re: [libvirt] [PATCH] tests: fix running of qemuxml2argvtest program

2018-02-12 Thread Michal Privoznik
On 02/12/2018 12:11 PM, Daniel P. Berrangé wrote: > The previous commit: > > commit a455d41e3e1c1af3a36ccdbb2e3f2356cc58993e > Author: Daniel P. Berrangé > Date: Thu Jan 25 09:35:50 2018 + > > conf: expand network device callbacks to cover resolving NIC type

Re: [libvirt] [PATCH v2] qemu: Expose rx/tx_queue_size in qemu.conf too

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 12:44:52PM +0100, Martin Kletzander wrote: > On Thu, Feb 01, 2018 at 09:58:17AM -0500, John Ferlan wrote: > > > > > > On 02/01/2018 09:04 AM, Michal Privoznik wrote: > > > In 2074ef6cd4a2 and c56cdf259 (and friends) we've added two > > > attributes to virtio NICs:

Re: [libvirt] [PATCH REBASE 2/2] qemu: Clean up PCI controller options

2018-02-12 Thread Andrea Bolognani
On Sun, 2018-02-11 at 08:22 -0500, John Ferlan wrote: > On 02/05/2018 11:08 AM, Andrea Bolognani wrote: > > Most of the options are only applicable to one or two controller > > types, so they should be filtered out everywhere else. > > > > This will reduce user confusion and, in at least one

[libvirt] [PATCH 2/6] virObject: Introduce virObjectRecursiveLockableNew

2018-02-12 Thread Michal Privoznik
Sometimes we need the lock in virObjectLockable to be recursive. Because of the nature of pthreads we don't need a special class for that - the pthread_* APIs don't distinguish between normal and recursive locks. Based-on-work-of: John Ferlan Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH] log: fix deadlock obtaining hostname (related CVE-2018-6764)

2018-02-12 Thread Michal Privoznik
On 02/12/2018 11:08 AM, Daniel P. Berrangé wrote: > The fix for CVE-2018-6764 introduced a potential deadlock scenario > that gets triggered by the NSS module when virGetHostname() calls > getaddrinfo to resolve the hostname: > > #0 0x7f6e714b57e7 in futex_wait > #1 futex_wait_simple >

Re: [libvirt] [PATCH v5 1/3] nwfilter: Convert _virNWFilterObj to use virObjectRWLockable

2018-02-12 Thread Michal Privoznik
On 02/09/2018 02:00 PM, John Ferlan wrote: > > > On 02/09/2018 03:41 AM, Michal Privoznik wrote: >> On 02/08/2018 04:06 PM, John Ferlan wrote: >>> [...] >>> >>> +static void >>> +virNWFilterObjPromoteToWrite(virNWFilterObjPtr obj) >>> +{ >>> +virObjectRWUnlock(obj); >>> +

[libvirt] [PATCH 6/6] nwfilter: Remove need for nwfilterDriverLock in some API's

2018-02-12 Thread Michal Privoznik
From: John Ferlan Now that nwfilters object list is self locking, it's no longer necessary to hold the driver level lock for certain API's. Signed-off-by: John Ferlan Signed-off-by: Michal Privoznik ---

[libvirt] [PATCH 0/6] Alternative way of turning NWFilterObj(list) into virObject

2018-02-12 Thread Michal Privoznik
This is heavily based on John's work (except 1/6). The difference to his patches is in using virObjectRecursiveLockableNew() for recursive locks instead of RW locks and lock promoting. Also, in 6/6 I was more confident and removed driver lock from define/undefine APIs. John Ferlan (1):

[libvirt] [PATCH 5/6] nwfilter: Convert _virNWFilterObjList to use virObjectRWLockable

2018-02-12 Thread Michal Privoznik
Based-on-work-of: John Ferlan Signed-off-by: Michal Privoznik --- cfg.mk | 1 - src/conf/virdomainobjlist.c| 3 +- src/conf/virnwfilterobj.c | 409 +++-- src/conf/virnwfilterobj.h

Re: [libvirt] [PATCH 00/14] Basic implementation of persistent reservations

2018-02-12 Thread Michal Privoznik
On 01/18/2018 05:04 PM, Michal Privoznik wrote: > Ping? -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v2] vcpupin: add clear feature

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 13:42:02 +, Daniel Berrange wrote: > On Mon, Feb 12, 2018 at 02:31:46PM +0100, Peter Krempa wrote: > > On Mon, Feb 12, 2018 at 09:39:26 +, Daniel Berrange wrote: > > > On Mon, Feb 12, 2018 at 03:54:21AM -0500, Yi Wang wrote: > > > > We can't clear vcpupin settings

[libvirt] [PATCH 0/3] Fix parsing and formatting of 'UnixSocketAddress' qapi type

2018-02-12 Thread Peter Krempa
Fix the naming mistake, add tests and remove useless comment. Peter Krempa (3): storage: Fix formatting and parsing of qemu type 'UnixSocketAddress' virstoragetest: Add test case for NBD over unix socket with new syntax qemu: block: Remove misleading part of comment in

Re: [libvirt] [PATCH] Revert "qemu: Expose rx/tx_queue_size in qemu.conf too"

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 14:56:49 +, Daniel Berrange wrote: > This reverts commit 038eb472a0d970a17ccf4343ead0666df5c92f9d. > > On reflection adding defaults for arbitrary guest XML device config > settings to the qemu.conf is not a sustainable path. Removing the > support for rx/tx queue size

Re: [libvirt] [PATCH 02/14] qemuDomainDiskChangeSupported: Deny changing reservations

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:34 +0100, Michal Privoznik wrote: > Couple of reasons for that: > > a) there's no monitor command to change path where the pr-helper > connects to, or > b) there's no monitor command to introduce a new pr-helper for a > disk that already exists. > > Signed-off-by:

Re: [libvirt] Should we switch to a different JSON library?

2018-02-12 Thread Pino Toscano
On Tuesday, 7 November 2017 14:05:25 CET Martin Kletzander wrote: > - Jansson [3] - I really like this one. The API seems very intuitive, > it has nice documentation [4] in readthedocs (and I'm > not talking about the visual style, but how easy is to >

Re: [libvirt] [PATCH v2] vcpupin: add clear feature

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 02:31:46PM +0100, Peter Krempa wrote: > On Mon, Feb 12, 2018 at 09:39:26 +, Daniel Berrange wrote: > > On Mon, Feb 12, 2018 at 03:54:21AM -0500, Yi Wang wrote: > > > We can't clear vcpupin settings of XML once we did vcpupin > > > command, this is not convenient under

[libvirt] [PATCH] Revert "qemu: Expose rx/tx_queue_size in qemu.conf too"

2018-02-12 Thread Daniel P . Berrangé
This reverts commit 038eb472a0d970a17ccf4343ead0666df5c92f9d. On reflection adding defaults for arbitrary guest XML device config settings to the qemu.conf is not a sustainable path. Removing the support for rx/tx queue size so that it doesn't set a bad precedent. Signed-off-by: Daniel P.

Re: [libvirt] [PATCH 00/14] Basic implementation of persistent reservations

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:32 +0100, Michal Privoznik wrote: > QEMU added support for SCSI persistent reservations. The way QEMU > implemented that makes it slightly harder for libvirt to adapt to - it's > a small binary that needs to start before qemu so that it can connect to > it. Basically,

[libvirt] [PATCH 2/3] virstoragetest: Add test case for NBD over unix socket with new syntax

2018-02-12 Thread Peter Krempa
Use the new syntax which uses the 'UnixSocket' type in qemu. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index ea3d2833dd..87519495f0 100644 ---

[libvirt] [PATCH 3/3] qemu: block: Remove misleading part of comment in qemuBlockStorageSourceBuildJSONSocketAddress

2018-02-12 Thread Peter Krempa
The array indexes are formatted if the JSON->commandline translator is translating an array type. It does not at all depend on this function. Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_block.c

Re: [libvirt] [PATCH v2] vcpupin: add clear feature

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 09:39:26 +, Daniel Berrange wrote: > On Mon, Feb 12, 2018 at 03:54:21AM -0500, Yi Wang wrote: > > We can't clear vcpupin settings of XML once we did vcpupin > > command, this is not convenient under some condition such > > as migration to a host with less CPUs. > > > >

[libvirt] [PATCH 1/3] storage: Fix formatting and parsing of qemu type 'UnixSocketAddress'

2018-02-12 Thread Peter Krempa
The documentation for the JSON/qapi type 'UnixSocketAddress' states that the unix socket path field is named 'path'. We used 'socket' by mistake. Fix both the formatter and parser and test suite. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544325 Signed-off-by: Peter Krempa

Re: [libvirt] [PATCH 04/14] qemu_domain: Introduce qemuDomainDiskPRObject

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:36 +0100, Michal Privoznik wrote: > This is an extended definition of virStoragePRDef because it > contains runtime information (like path to pr helper socket, its > pid and alias). Since these are driver dependant we should have a > driver specific structure instead

Re: [libvirt] [PATCH 03/14] qemu: Introduce pr-manager-helper capability

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:35 +0100, Michal Privoznik wrote: > The capability tracks if qemu has pr-manager-helper object. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_capabilities.c | 2 ++ > src/qemu/qemu_capabilities.h | 1 + > 2 files changed, 3

Re: [libvirt] [PATCH 1/1] includes: function parameter names same in headers

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 12:20:55PM -0600, Chris Venteicher wrote: > Headers use same function parameter names as definition code. > --- > include/libvirt/libvirt-domain.h| 26 +- > include/libvirt/libvirt-event.h | 4 ++-- > include/libvirt/libvirt-host.h |

Re: [libvirt] Should we switch to a different JSON library?

2018-02-12 Thread Ján Tomko
On Mon, Feb 12, 2018 at 02:38:02PM +0100, Pino Toscano wrote: On Tuesday, 7 November 2017 14:05:25 CET Martin Kletzander wrote: - Jansson [3] - I really like this one. The API seems very intuitive, it has nice documentation [4] in readthedocs (and I'm not

Re: [libvirt] [PATCH 03/11] qemu: Move GIC checks to qemuDomainDefValidateFeatures()

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > Keep them along with other arch/machine type checks for > features instead of waiting until command line generation > time. > > Signed-off-by: Andrea Bolognani > --- > src/qemu/qemu_command.c | 7 --- >

Re: [libvirt] Should we switch to a different JSON library?

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 07:47:00PM +0100, Ján Tomko wrote: > On Mon, Feb 12, 2018 at 02:38:02PM +0100, Pino Toscano wrote: > > On Tuesday, 7 November 2017 14:05:25 CET Martin Kletzander wrote: > > > - Jansson [3] - I really like this one. The API seems very intuitive, > > > it

Re: [libvirt] [PATCH 07/14] qemu: Generate cmd line at startup

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:39 +0100, Michal Privoznik wrote: > This is the easier part. All we need to do here is put -object > pr-manger-helper,id=$alias,path=$socketPath and then just > reference the object in -drive file.pr-manger=$alias. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [PATCH 13/14] qemu_hotplug: Hotplug of reservations

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:45 +0100, Michal Privoznik wrote: > Surprisingly, nothing special is happening here. If we are the > first to use the managed helper then spawn it. If not, we're > almost done. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_hotplug.c

Re: [libvirt] [PATCH 02/14] qemuDomainDiskChangeSupported: Deny changing reservations

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 17:19:24 +0100, Andrea Bolognani wrote: > On Mon, 2018-02-12 at 16:40 +0100, Peter Krempa wrote: > > > @@ -6865,6 +6865,14 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr > > > disk, > > > CHECK_EQ(src->readonly, "readonly", true); > > >

Re: [libvirt] [PATCH 09/14] qemu: Start PR daemons on domain startup

2018-02-12 Thread Daniel P . Berrangé
On Mon, Feb 12, 2018 at 05:54:19PM +0100, Peter Krempa wrote: > On Thu, Jan 18, 2018 at 17:04:41 +0100, Michal Privoznik wrote: > > Before we exec() qemu we have to spawn pr-helper processes for > > all managed reservations (well, technically there can only one). > > The only caveat there is that

Re: [libvirt] [PATCH 09/14] qemu: Start PR daemons on domain startup

2018-02-12 Thread Peter Krempa
On Mon, Feb 12, 2018 at 17:10:23 +, Daniel Berrange wrote: > On Mon, Feb 12, 2018 at 05:54:19PM +0100, Peter Krempa wrote: > > On Thu, Jan 18, 2018 at 17:04:41 +0100, Michal Privoznik wrote: > > > Before we exec() qemu we have to spawn pr-helper processes for > > > all managed reservations

Re: [libvirt] [PATCH 06/14] qemu: Store prAlias and prPath in status XML

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:38 +0100, Michal Privoznik wrote: > Now that we generate pr-manger alias and socket path store them > in status XML so that they are preserved across daemon restarts. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 72 >

Re: [libvirt] [PATCH 05/14] qemu: Generate alias for pr-helper

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:37 +0100, Michal Privoznik wrote: > While we're not generating the command line just yet (look for > the next commit), we can generate the alias for pr-manager. > A domain can have up to one managed pr-manager (in which case > socket path is decided by libvirt and

Re: [libvirt] [PATCH 09/14] qemu: Start PR daemons on domain startup

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:41 +0100, Michal Privoznik wrote: > Before we exec() qemu we have to spawn pr-helper processes for > all managed reservations (well, technically there can only one). > The only caveat there is that we should place the process into > the same namespace and cgroup as

[libvirt] [PATCH] qemu: Fix indentation in qemuBuildControllerDevStr()

2018-02-12 Thread Andrea Bolognani
Add braces around the multi-line body as well, in compliance with our coding style. Signed-off-by: Andrea Bolognani --- Pushed as trivial. src/qemu/qemu_command.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c

Re: [libvirt] [PATCH 10/14] qemu: Track PR daemons PIDs in status XML

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:42 +0100, Michal Privoznik wrote: > We need to keep track of spawned processes so that we can kill > them when qemu process dies. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_domain.c | 130 >

[libvirt] [PATCH 1/1] includes: function parameter names same in headers

2018-02-12 Thread Chris Venteicher
Headers use same function parameter names as definition code. --- include/libvirt/libvirt-domain.h| 26 +- include/libvirt/libvirt-event.h | 4 ++-- include/libvirt/libvirt-host.h | 4 ++-- include/libvirt/libvirt-interface.h | 4 ++--

Re: [libvirt] [PATCH 02/14] qemuDomainDiskChangeSupported: Deny changing reservations

2018-02-12 Thread Andrea Bolognani
On Mon, 2018-02-12 at 16:40 +0100, Peter Krempa wrote: > > @@ -6865,6 +6865,14 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr > > disk, > > CHECK_EQ(src->readonly, "readonly", true); > > CHECK_EQ(src->shared, "shared", true); > > > > +if

Re: [libvirt] [PATCH 12/14] qemu_process.c: Introduce qemuProcessSetupPRDaemon

2018-02-12 Thread Peter Krempa
On Thu, Jan 18, 2018 at 17:04:44 +0100, Michal Privoznik wrote: > Again, for hotplug we need to be able to spawn just one process. > Not all of them. Expose the static function we already have for > that. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_process.c |

[libvirt] Google Summer of Code 2018

2018-02-12 Thread Michal Privoznik
Dear list, Libvirt has been accepted to this year's GSoC. Yay! For those interested in mentoring let me know (if you haven't already). For those interested in participating as students now it's the best time to view our ideas page [1] and contact corresponding mentors. If you have your own idea

Re: [libvirt] [PATCH 02/11] qemu: Use switch in qemuDomainDefValidateFeatures()

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > The compiler can make sure we are handling all features. > > While reworking the logic, also change error messages to a more > consistent style. > > Signed-off-by: Andrea Bolognani > --- > src/libvirt_private.syms | 2 ++

Re: [libvirt] [PATCH 01/11] qemu: Move feature verification from PostParse() to Validate()

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > We want to perform all feature verification in a single spot, but > some of it (eg. GIC) is currently being performed at command line > generation time, and moving it to PostParse() would cause guests > to disappear. Moving verification to

[libvirt] [PATCH 0/1] Function declarations match definitions

2018-02-12 Thread Chris Venteicher
Interested in fixing mismatches between function parameter names in declarations (header files) and definitions (.c files)? This is a cosmetic / redability fix and does not change functionality. This is patch 1 of larger set of 22 patches that fix parameter names across the libvirt source code.

Re: [libvirt] [PATCH 06/11] conf: Integrate all features ABI checks in the switch

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > There are a few stray checks which still live outside of the > switch in virDomainDefFeaturesCheckABIStability() for no good > reason. Move them inside the switch, and update the error > messages to be consistent while at it. > > Signed-off-by:

Re: [libvirt] [PATCH 08/11] qemu: Fix GIC behavior for the default case

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > When no GIC version is specified, we currently default to GIC v2; > however, that's not a great default, since guests will fail to > start if the hardware only supports GIC v3. > > Change the behavior so that a sensible default is chosen

[libvirt] [PATCHv2 0/1] Function declarations match definitions

2018-02-12 Thread Chris Venteicher
Interested in fixing mismatches between function parameter names in declarations (header files) and definitions (.c files)? This is a cosmetic / redability fix and does not change functionality. This is patch 1 of larger set of 22 patches that fix parameter names across the libvirt source code.

Re: [libvirt] [PATCH 11/11] tests: Clean up HPT tests

2018-02-12 Thread John Ferlan
On 02/06/2018 11:43 AM, Andrea Bolognani wrote: > Give them better names and remove some redundancy. > > Signed-off-by: Andrea Bolognani > --- > ...es-hpt-resizing.args => pseries-features-hpt.args} | 1 - > .../pseries-features-hpt.xml} | 0 >

Re: [libvirt] [PATCH REBASE 1/2] tests: Add some tests for PCI controller options

2018-02-12 Thread John Ferlan
On 02/12/2018 04:32 AM, Andrea Bolognani wrote: > On Sun, 2018-02-11 at 08:12 -0500, John Ferlan wrote: >> On 02/05/2018 11:08 AM, Andrea Bolognani wrote: >>> The input configurations set all existing options for all PCI >>> controllers, to see what ends up showing up in the output. >> >> Not

Re: [libvirt] [PATCH 04/11] conf: Use switch in virDomainDefFeaturesCheckABIStability()

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > The compiler can make sure we are handling all features. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c | 41 + > 1 file changed, 33 insertions(+), 8 deletions(-)

Re: [libvirt] [PATCH 05/11] conf: Validate VIR_DOMAIN_FEATURE_CAPABILITIES properly

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > Unlike most other features, VIR_DOMAIN_FEATURE_CAPABILITIES is > of type virDomainCapabilitiesPolicy instead of virTristateSwitch, > so we need to handle it separately for the error message to make > sense. > > Signed-off-by: Andrea Bolognani

Re: [libvirt] [PATCH 07/11] tests: Improve GIC tests

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > Account for the fact that the default might change based on what > GIC versions are supported by QEMU. That's not the case at the > moment, but it will be soon. > > Signed-off-by: Andrea Bolognani > --- >

[libvirt] [PATCHv2 1/1] include: function parameter names same in declaration

2018-02-12 Thread Chris Venteicher
Headers use same function parameter names as definition code. In some cases in libvirt-domain and libvirt-network an established naming pattern in the header files was more consistent and informative in which case the implementation was modified in the c file. ---

Re: [libvirt] [PATCH 09/11] conf: Improve IOAPIC feature handling

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > Instead of storing separately whether the feature is enabled > or not and what driver should be used, store both of them in > a single place. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c | 29

Re: [libvirt] [PATCH 10/11] conf: Improve HPT feature handling

2018-02-12 Thread John Ferlan
On 02/06/2018 11:42 AM, Andrea Bolognani wrote: > Instead of storing separately whether the feature is enabled > or not and what resizing policy should be used, store both of > them in a single place. > > Signed-off-by: Andrea Bolognani > --- > src/conf/domain_conf.c |

[libvirt] [PATCH v2] vcpupin: add clear feature

2018-02-12 Thread Yi Wang
We can't clear vcpupin settings of XML once we did vcpupin command, this is not convenient under some condition such as migration to a host with less CPUs. This patch introduces clear feature, which can clear vcpuin setting of XML using a 'c' option. Signed-off-by: Yi Wang

Re: [libvirt] [PATCH v4 2/8] libxl: pass driver config to libxlMakeDomBuildInfo

2018-02-12 Thread Jim Fehlig
On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. --- Changes

Re: [libvirt] [PATCH v4 1/8] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-02-12 Thread Jim Fehlig
On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). --- Changes since v3: - new patch, mostly unrelated, but found while adjusting tests

[libvirt] [PATCH v2 0/2] Support network stats for hostdev(SR-IOV) in Switchdev mode

2018-02-12 Thread Jai Singh Rana
With availability of switchdev model in linux, it is possible to capture stats for hostdev SR-IOV VFs using its VF representor interface name on host for nics supporting switchdev model. These stats are supported by adding helper APIs for getting VF Representor name based on BDF info in 'hostdev'

[libvirt] [PATCH v2 1/2] util: Add helper APIs to get/verify VF Representor name

2018-02-12 Thread Jai Singh Rana
Switchdev VF Representor interface name on host is derived based on BDF of pci SR-IOV device in 'hostdev' and querying required net sysfs entries on host. --- v2 includes commented code cleanup in virnetdevhostdev.c po/POTFILES.in | 1 + src/Makefile.am | 1 +

[libvirt] [PATCH v2 2/2] qemu: conf: Network stats support for hostdev VF Representor

2018-02-12 Thread Jai Singh Rana
In case of , return stats if its a Switchdev VF Representor interface of pci SR-IOV device. --- v2 fixes bracket spacing in domain_conf.c src/conf/domain_conf.c | 7 +++ src/qemu/qemu_driver.c | 34 ++ 2 files changed, 37 insertions(+), 4 deletions(-) diff

Re: [libvirt] [PATCH] qemu: cpu: fix fullCPU to include all emulatable qemu features

2018-02-12 Thread Nikolay Shirokovskiy
ping On 20.11.2017 15:55, Nikolay Shirokovskiy wrote: > On Core i5 650 guest fail to start with error [1] if guest cpu config is taken > from domcapabilities and check is set to partial. > > The problem is in qemu caps fullCPU calculation in > virQEMUCapsInitHostCPUModel. > It is supposed to