[libvirt] [PATCH v6 8/8] backup: Introduce virDomainCheckpointPtr

2019-03-14 Thread Eric Blake
Prepare for introducing a bunch of new public APIs related to backup checkpoints by first introducing a new internal type and errors associated with that type. Checkpoints are modeled heavily after virDomainSnapshotPtr (both represent a point in time of the guest), although a snapshot exists with

[libvirt] [PATCH v6 3/8] snapshot: Break out virDomainSnapshotObj into its own file

2019-03-14 Thread Eric Blake
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object code into its own file, which includes moving a typedef to avoid circular inclusions. Mostly straight code motion, although I fixed a

[libvirt] [PATCH v6 0/8] Incremental backups: virDomainSnapshot class

2019-03-14 Thread Eric Blake
This is a respin of patch 4/20 in my larger series: https://www.redhat.com/archives/libvir-list/2019-March/msg00386.html As John pointed out, my v4/v5 posting had a LOT of duplicate code, including lots of poorly commented code managing a potential tree of checkpoints (even if the more immediate

[libvirt] [PATCH v6 5/8] snapshot: Break out virDomainSnapshotObjList into its own file

2019-03-14 Thread Eric Blake
snapshot_conf.h was mixing three separate types: the snapshot definition, the snapshot object, and the snapshot object list. Separate out the snapshot object list code into its own file, and update includes for affected clients. This is just code motion, but done in preparation of sharing a lot

[libvirt] [PATCH v6 6/8] snapshot: Use accessors for virDomainSnapshot members

2019-03-14 Thread Eric Blake
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; the easiest way to share common code is to give both classes a common base class. If this were C++, we'd just use public member inheritance; but since it is C, we instead have to touch EVERY use of

[libvirt] [PATCH v6 2/8] snapshot: Sort virconftypes.h

2019-03-14 Thread Eric Blake
It's easier to locate a typedef if they are stored in sorted order; do so mechanically via: $ sed -i '/typedef struct/ {N; N; s/\n//g}' src/conf/virconftypes.h $ # sorting the lines $ sed -i '/typedef struct/ s/;/;\n/g' src/conf/virconftypes.h Signed-off-by: Eric Blake ---

[libvirt] [PATCH v6 7/8] snapshot: Create virDomainMoment base class

2019-03-14 Thread Eric Blake
Upcoming patches want to add virDomainCheckpoint that behaves very similarly to virDomainCheckpoint; th eeasiest way to share common code is to give both classes a common base class. Thanks to the accessor functions in the previous patch, we have very few changes required outside of

[libvirt] [PATCH v6 4/8] snapshot: Export two functions prior to file split

2019-03-14 Thread Eric Blake
The next patch will require access to the helper functions virDomainSnapshotDefFormatInternal and virDomainSnapshotRedefineValidate from two different files; make the file split easier by exporting these functions. Signed-off-by: Eric Blake --- src/conf/snapshot_conf.h | 13 +

[libvirt] [PATCH v6 1/8] snapshot: Split domain forward typedefs into new file

2019-03-14 Thread Eric Blake
Right now, snapshot_conf.h is rather large - it deals with three separate types: virDomainSnapshotDef (the snapshot definition as it maps to XML), virDomainSnapshotObj (an object containing a def and the relationship to other snapshots), and virDomainSnapshotObjList (a list of snapshot objects),

Re: [libvirt] [PATCH v5 04/20] backup: Introduce virDomainCheckpointPtr

2019-03-14 Thread Eric Blake
On 3/12/19 1:01 PM, John Ferlan wrote: > > > On 3/7/19 12:47 AM, Eric Blake wrote: >> Prepare for introducing a bunch of new public APIs related to >> backup checkpoints by first introducing a new internal type >> and errors associated with that type. Checkpoints are modeled >> heavily after

[libvirt] [PATCH] virobject: Improve documentation

2019-03-14 Thread Eric Blake
I had to inspect the code to learn whether a final virObjectUnref() calls ALL dispose callbacks in child-to-parent order (akin to C++ destructors), or whether I manually had to call a parent-class dispose when writing a child class dispose method. The answer is the former. (Thankfully, since

Re: [libvirt] [PATCH 1/4] conf: Add a new 'xenbus' controller type

2019-03-14 Thread Jim Fehlig
On 3/13/19 7:17 PM, Eric Blake wrote: On 3/8/19 5:05 PM, Jim Fehlig wrote: xenbus is virtual controller (akin to virtio controllers) for Xen paravirtual devices. Although all Xen VMs have a xenbus, it has never been modeled in libvirt, or in Xen native VM config format for that matter.

Re: [libvirt] [PULL 04/14] audio: -audiodev command line option basic implementation

2019-03-14 Thread Zoltán Kővágó
On 2019-03-14 10:46, Peter Maydell wrote: > On Tue, 12 Mar 2019 at 07:13, Gerd Hoffmann wrote: >> >> From: Kővágó, Zoltán >> >> Audio drivers now get an Audiodev * as config paramters, instead of the >> global audio_option structs. There is some code in audio/audio_legacy.c >> that converts the

Re: [libvirt] [PATCH 03/21] tests: qemuxml2argv: add va_arg enum handling

2019-03-14 Thread Eric Blake
On 3/14/19 2:42 PM, Cole Robinson wrote: >> >>> +typedef enum { >>> +    ARG_QEMU_CAPS = 1, >>> + >>> +    ARG_END = QEMU_CAPS_LAST, >>> +} testInfoArgNames; >>> + Do you need some sort of compile-time check that QEMU_CAPS_LAST doesn't overlap with any other ARG_*? >>> +    while ((argname =

Re: [libvirt] [PATCH 03/21] tests: qemuxml2argv: add va_arg enum handling

2019-03-14 Thread Cole Robinson
On 3/14/19 11:23 AM, Eric Blake wrote: On 3/14/19 9:43 AM, Cole Robinson wrote: This establishes a pattern that will allow us to make test macros more general purpose, by taking optional arguments. The general format will be: DO_TEST_FULL(... ARG_FOO, , ARG_BAR, )

Re: [libvirt] [PATCH 00/21] tests: qemuxml2argv: support optional arguments

2019-03-14 Thread Cole Robinson
On 3/14/19 11:17 AM, Eric Blake wrote: On 3/14/19 9:43 AM, Cole Robinson wrote: Right now in qemuxml2argv we have a proliferation of DO_*TEST* macros. They essentially fill in data in the testInfo struct and invoke the test function. There's several bits of data that we want to specify for a

[libvirt] [jenkins-ci PATCH] lcitool: add special case for Debian i386/i686 mixup

2019-03-14 Thread Daniel P . Berrangé
Although the toolchain binaries for 32-bit x86 are using the ABI i686-linux-gnu, the library install directory is strangely named with the different i386-linux-gnu. Signed-off-by: Daniel P. Berrangé --- guests/lcitool | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git

[libvirt] [jenkins-ci PATCH] jenkins: only send one email on build failure

2019-03-14 Thread Daniel P . Berrangé
The current config causes jenkins to send a build on every single failure. This is way too noisy so change it to only send emails on the transition from good to bad. Signed-off-by: Daniel P. Berrangé --- jenkins/jobs/autotools.yaml| 8 jenkins/jobs/generic.yaml | 8

Re: [libvirt] [PATCH 1.5/2] virt-driver-qemu.m4: Make qemu driver optional

2019-03-14 Thread Jiri Denemark
On Thu, Mar 14, 2019 at 13:36:26 +0100, Michal Privoznik wrote: > The basic idea of our configure script is to probe for things > rather than have them enabled by default. This is even more > visible in the next commit where configure fails if qemu driver > is enabled but no yajl is found. > >

[libvirt] [PATCH] qemu: Set job statsType for external memory snapshot

2019-03-14 Thread Jiri Denemark
Any job which is able to provide statistics that can be queried via virDomainGetJob{Stats,Info} has to set an appropriate statsType. Without a proper statsType qemuDomainJobInfoToParams and qemuDomainJobInfoToInfo have no idea what statistics should be sent to the API caller.

Re: [libvirt] [PATCH] virstoragefile: identify GPFS as cluster FS

2019-03-14 Thread Michal Privoznik
On 2/27/19 3:07 PM, Diego Michelotto wrote: GPFS is 'IBM General Parallel File System', also called 'IBM Spectrum Scale', stalls when a process issues a lot of fsyncs in a short timeframe. It is better if the VM I/O is not synchronous. It is racommended to use writeback caching policy. Using

Re: [libvirt] [PATCH 03/21] tests: qemuxml2argv: add va_arg enum handling

2019-03-14 Thread Eric Blake
On 3/14/19 9:43 AM, Cole Robinson wrote: > This establishes a pattern that will allow us to make test macros > more general purpose, by taking optional arguments. The general > format will be: > > DO_TEST_FULL(... > ARG_FOO, , > ARG_BAR, ) > > ARG_X are just enum values

Re: [libvirt] [PATCH 00/21] tests: qemuxml2argv: support optional arguments

2019-03-14 Thread Eric Blake
On 3/14/19 9:43 AM, Cole Robinson wrote: > Right now in qemuxml2argv we have a proliferation of DO_*TEST* macros. > They essentially fill in data in the testInfo struct and invoke the > test function. > > There's several bits of data that we want to specify for a small > subset of tests: flags,

Re: [libvirt] [PATCH v2 3/5] qemuMonitorJSONDelDevice: Return -2 on DeviceNotFound error

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 15:16:56 +0100, Peter Krempa wrote: > On Thu, Mar 14, 2019 at 14:56:49 +0100, Michal Privoznik wrote: > > On 3/14/19 2:06 PM, Peter Krempa wrote: > > > On Thu, Mar 14, 2019 at 13:22:37 +0100, Michal Privoznik wrote: > > [...] > > > > Callers need to be fixed that in case

Re: [libvirt] [Qemu-devel] [PATCH 1/2] numa: deprecate 'mem' parameter of '-numa node' option

2019-03-14 Thread Igor Mammedov
On Sun, 10 Mar 2019 11:16:33 +0100 Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Mar 06, 2019 at 08:03:48PM +0100, Igor Mammedov wrote: > >> On Mon, 4 Mar 2019 16:35:16 + > >> Daniel P. Berrangé wrote: > >> > >> > On Mon, Mar 04, 2019 at 05:20:13PM +0100, Michal

Re: [libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 15:31:48 +0100, Michal Privoznik wrote: > On 3/14/19 3:14 PM, Peter Krempa wrote: > > On Thu, Mar 14, 2019 at 14:56:48 +0100, Michal Privoznik wrote: > > > On 3/14/19 2:18 PM, Peter Krempa wrote: > > > > On Thu, Mar 14, 2019 at 13:22:38 +0100, Michal Privoznik wrote: > > >

[libvirt] [PATCH 21/21] tests: qemuxml2argv: add TEST_INTERNAL

2019-03-14 Thread Cole Robinson
Base macro to unify the actual testCompareXMLToArgv test calls Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 29 +++-- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt] [PATCH 20/21] tests: qemuxml2argv: move DO_CAPS_TEST* qemuCaps init

2019-03-14 Thread Cole Robinson
Move DO_CAPS_TEST* qemuCaps init and all the associated setup into testInfoSetArgs, adding ARG_CAPS_ARCH and ARG_CAPS_VER options and using those to build the capsfile path locally Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 68 +++- 1 file

[libvirt] [PATCH 19/21] tests: qemuxml2argv: move DO_TEST qemuCaps init

2019-03-14 Thread Cole Robinson
Move DO_TEST* qemuCaps init into testInfoSetArgs. This is a step towards unifying the different test macro implementations Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git

[libvirt] [PATCH 18/21] tests: qemuxml2argv: add testInfoClear

2019-03-14 Thread Cole Robinson
This is closer to the pattern of qemuxml2xml tests, and will make things easier if we extend testInfo to contain more freeable data Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/qemuxml2argvtest.c

[libvirt] [PATCH 12/21] tests: qemuxml2argv: add a comment separating DO_TEST* macros

2019-03-14 Thread Cole Robinson
Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 130ab29d6e..b555166e82 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -832,6 +832,9 @@ mymain(void)

[libvirt] [PATCH 17/21] tests: qemuxml2argv: build capsfile in DO_TEST_CAPS_INTERNAL

2019-03-14 Thread Cole Robinson
Rather than make callers do it. The operative info is just arch and ver which we are passing in already. Fold in stripmachinealiases too since it is just dependent on ver value Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 23 +++ 1 file changed, 11

[libvirt] [PATCH 16/21] tests: qemuxml2argv: centralize CAPS suffix building

2019-03-14 Thread Cole Robinson
Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b1c18c6c09..4b34bbcb63 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@

[libvirt] [PATCH 15/21] tests: qemuxml2argv: remove full testInfo initialization

2019-03-14 Thread Cole Robinson
Only initialize the fields that are passed in Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 176e4eff3e..b1c18c6c09 100644 ---

[libvirt] [PATCH 14/21] tests: qemuxml2argv: use varargs for CAPS flags

2019-03-14 Thread Cole Robinson
Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7708e8db70..176e4eff3e 100644 --- a/tests/qemuxml2argvtest.c +++

[libvirt] [PATCH 01/21] qemu: add virQEMUCapsSetVList

2019-03-14 Thread Cole Robinson
It will be used in future patches Signed-off-by: Cole Robinson --- src/qemu/qemu_capabilities.c | 14 +++--- src/qemu/qemu_capabilities.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt] [PATCH 10/21] tests: qemuxml2argv: remove DO_TEST_PARSE_FLAGS_ERROR

2019-03-14 Thread Cole Robinson
It only has one caller. Just use DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 070f7f0a05..1ce8bade48 100644 ---

[libvirt] [PATCH 07/21] tests: qemuxml2argv: handle migrate* with varargs

2019-03-14 Thread Cole Robinson
This allows us to drop migrateFrom and migrateFd from DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 46 ++-- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt] [PATCH 09/21] tests: qemuxml2argv: handle parseFlags with varargs

2019-03-14 Thread Cole Robinson
This allows us to drop parseFlags from DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index bb3d53070f..070f7f0a05

[libvirt] [PATCH 00/21] tests: qemuxml2argv: support optional arguments

2019-03-14 Thread Cole Robinson
Right now in qemuxml2argv we have a proliferation of DO_*TEST* macros. They essentially fill in data in the testInfo struct and invoke the test function. There's several bits of data that we want to specify for a small subset of tests: flags, parseFlags, migrateFrom/migrateFd, gic. The base

[libvirt] [PATCH 13/21] tests: qemuxml2argv: remove unused CAPS migrateFrom

2019-03-14 Thread Cole Robinson
Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b555166e82..7708e8db70 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -786,11

[libvirt] [PATCH 08/21] tests: qemuxml2argv: handle flags with varargs

2019-03-14 Thread Cole Robinson
This allows us to drop flags from DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 37 ++--- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c6bd240c54..bb3d53070f

[libvirt] [PATCH 06/21] tests: qemuxml2argv: handle gic with vaargs

2019-03-14 Thread Cole Robinson
This allows us to drop stub gic values from DO_TEST_FULL calls Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

[libvirt] [PATCH 05/21] tests: qemuxml2argv: break apart testInitQEMUCaps

2019-03-14 Thread Cole Robinson
Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 393d2399fa..06a28178d0 100644 --- a/tests/qemuxml2argvtest.c +++

[libvirt] [PATCH 11/21] tests: qemuxml2argv: remove unused DO_TEST_CAPS* macros

2019-03-14 Thread Cole Robinson
They are potentially useful at the moment, but we will be making things much more flexible Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1ce8bade48..130ab29d6e

[libvirt] [PATCH 04/21] tests: qemuxml2argv: push ARG_QEMU_CAPS to callers

2019-03-14 Thread Cole Robinson
This is necessary before we can start adding more optional parameter implementations to DO_TEST_FULL Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/qemuxml2argvtest.c

[libvirt] [PATCH 03/21] tests: qemuxml2argv: add va_arg enum handling

2019-03-14 Thread Cole Robinson
This establishes a pattern that will allow us to make test macros more general purpose, by taking optional arguments. The general format will be: DO_TEST_FULL(... ARG_FOO, , ARG_BAR, ) ARG_X are just enum values that we look for in the va_args and know how to interpret.

[libvirt] [PATCH 02/21] tests: qemuxml2argv: add testInfoSetArgs

2019-03-14 Thread Cole Robinson
For now it just fills in the qemuCaps list. We will expand it in future patches Signed-off-by: Cole Robinson --- tests/qemuxml2argvtest.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index

Re: [libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Michal Privoznik
On 3/14/19 3:14 PM, Peter Krempa wrote: On Thu, Mar 14, 2019 at 14:56:48 +0100, Michal Privoznik wrote: On 3/14/19 2:18 PM, Peter Krempa wrote: On Thu, Mar 14, 2019 at 13:22:38 +0100, Michal Privoznik wrote: [...] How can this be considered success? Also this introduces a possible

Re: [libvirt] [PATCH v2 3/5] qemuMonitorJSONDelDevice: Return -2 on DeviceNotFound error

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 14:56:49 +0100, Michal Privoznik wrote: > On 3/14/19 2:06 PM, Peter Krempa wrote: > > On Thu, Mar 14, 2019 at 13:22:37 +0100, Michal Privoznik wrote: [...] > > Callers need to be fixed that in case when they choose not to ignore the > > error they report some error. > >

Re: [libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 14:56:48 +0100, Michal Privoznik wrote: > On 3/14/19 2:18 PM, Peter Krempa wrote: > > On Thu, Mar 14, 2019 at 13:22:38 +0100, Michal Privoznik wrote: [...] > > > > How can this be considered success? Also this introduces a possible > > regression. The DEVICE_DELETED

Re: [libvirt] [PATCH v2 1/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

2019-03-14 Thread Michal Privoznik
On 3/14/19 2:04 PM, Peter Krempa wrote: On Thu, Mar 14, 2019 at 13:22:35 +0100, Michal Privoznik wrote: The aim of this function will be to fix return value of qemuMonitorDelDevice() in one specific case. But that is yet to come. Right now this is nothing but a plain substitution.

Re: [libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Michal Privoznik
On 3/14/19 2:18 PM, Peter Krempa wrote: On Thu, Mar 14, 2019 at 13:22:38 +0100, Michal Privoznik wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1623389 If a device is detached twice from the same domain the following race condition may happen: 1) The first DetachDevice() call will issue

Re: [libvirt] [PATCH v2 3/5] qemuMonitorJSONDelDevice: Return -2 on DeviceNotFound error

2019-03-14 Thread Michal Privoznik
On 3/14/19 2:06 PM, Peter Krempa wrote: On Thu, Mar 14, 2019 at 13:22:37 +0100, Michal Privoznik wrote: A caller might be interested in differentiating the cause for error, especially if DeviceNotFound error occurred. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 10

Re: [libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 13:22:38 +0100, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1623389 > > If a device is detached twice from the same domain the following > race condition may happen: > > 1) The first DetachDevice() call will issue "device_del" on qemu > monitor,

Re: [libvirt] [PATCH v2 3/5] qemuMonitorJSONDelDevice: Return -2 on DeviceNotFound error

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 13:22:37 +0100, Michal Privoznik wrote: > A caller might be interested in differentiating the cause for > error, especially if DeviceNotFound error occurred. > > Signed-off-by: Michal Privoznik > --- > src/qemu/qemu_monitor.c | 10 ++ >

Re: [libvirt] [PATCH v2 1/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

2019-03-14 Thread Peter Krempa
On Thu, Mar 14, 2019 at 13:22:35 +0100, Michal Privoznik wrote: > The aim of this function will be to fix return value of > qemuMonitorDelDevice() in one specific case. But that is yet to > come. Right now this is nothing but a plain substitution. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v2 0/2] Facilitate running libvirt builds via docker containers

2019-03-14 Thread Andrea Bolognani
On Thu, 2019-03-14 at 12:16 +, Daniel P. Berrangé wrote: > ping I have this marked for review, but got sidetracked by other stuff... I'll try to get to it by the end of the week. -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 8/8] Don't define abs_* variables ourselves

2019-03-14 Thread Eric Blake
On 3/13/19 11:51 AM, Andrea Bolognani wrote: > Apparently this was necessary in the past because old versions > of autoconf/automake didn't make them available, but these > days all of the platforms we target include recent enough > autotools - as evidenced by the fact that, for example, we >

[libvirt] [PATCH 1.5/2] virt-driver-qemu.m4: Make qemu driver optional

2019-03-14 Thread Michal Privoznik
The basic idea of our configure script is to probe for things rather than have them enabled by default. This is even more visible in the next commit where configure fails if qemu driver is enabled but no yajl is found. Signed-off-by: Michal Privoznik --- m4/virt-driver-qemu.m4 | 2 +- 1 file

Re: [libvirt] [PATCH] docs: rng: make newly introduced features in domcaps optional

2019-03-14 Thread John Ferlan
On 3/14/19 4:21 AM, Nikolay Shirokovskiy wrote: > was introduced in 24f17f55 and have only gic child element > at the time. Thus from backcompat POV the other children are optional. > > Signed-off-by: Nikolay Shirokovskiy > --- > docs/schemas/domaincaps.rng | 12 +--- > 1 file

[libvirt] [PATCH v2 1/5] qemu_hotplug: Introduce and use qemuDomainDeleteDevice

2019-03-14 Thread Michal Privoznik
The aim of this function will be to fix return value of qemuMonitorDelDevice() in one specific case. But that is yet to come. Right now this is nothing but a plain substitution. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 278 +++- 1 file

[libvirt] [PATCH v2 5/5] DO NOT APPLY: Revert simple reproducer

2019-03-14 Thread Michal Privoznik
This reverts previous commit. Signed-off-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 5 - 1 file changed, 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 6b5b37bda5..576bf1db26 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[libvirt] [PATCH v2 2/5] DO NOT APPLY: Simple reproducer

2019-03-14 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1623389 Steps to reproduce: 1) cat shmem.xml 4 2) virsh attach-device vm1 shmem.xml 3) virsh detach-device-alias vm1 ua-123; virsh detach-device vm1 shmem.xml 4) observe that the device is still in the domain: virsh

[libvirt] [PATCH v2 3/5] qemuMonitorJSONDelDevice: Return -2 on DeviceNotFound error

2019-03-14 Thread Michal Privoznik
A caller might be interested in differentiating the cause for error, especially if DeviceNotFound error occurred. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 10 ++ src/qemu/qemu_monitor_json.c | 5 + 2 files changed, 15 insertions(+) diff --git

[libvirt] [PATCH v2 4/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1623389 If a device is detached twice from the same domain the following race condition may happen: 1) The first DetachDevice() call will issue "device_del" on qemu monitor, but since the DEVICE_DELETED event did not arrive in time, the API ends

[libvirt] [PATCH v2 0/5] qemu_hotplug: Fix a rare race condition when detaching a device twice

2019-03-14 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2019-March/msg00753.html diff to v1: - qemuDomainDeleteDevice now can do enter/exit monitor - qemuMonitorDelDevice doesn't report error on DeviceNotFound - On DeviceNotFound the caller is made wait for event, if none came Michal Prívozník (5):

Re: [libvirt] [PATCH v2 0/2] Facilitate running libvirt builds via docker containers

2019-03-14 Thread Daniel P . Berrangé
ping On Wed, Mar 06, 2019 at 09:34:22AM +, Daniel P. Berrangé wrote: > For a while QEMU has provided simple make rules for building QEMU inside > standard docker container environments. This provides an equivalent > mechanism for libvirt inspired by QEMU's. > > QEMU actually builds the

Re: [libvirt] Seccomp profile for swtpm as default

2019-03-14 Thread Stefan Berger
On 3/14/19 5:59 AM, Daniel P. Berrangé wrote: On Wed, Mar 13, 2019 at 03:43:13PM -0400, Stefan Berger wrote: Hello!  If you have some feedback regarding a seccomp profile extension for swtpm for v0.2, please let me know. I created this github issue here:

[libvirt] Seccomp profile for swtpm as default

2019-03-14 Thread Stefan Berger
Hello!  If you have some feedback regarding a seccomp profile extension for swtpm for v0.2, please let me know. I created this github issue here: https://github.com/stefanberger/swtpm/issues/115 Basically the choice is whether to make the creation of the seccomp profile a default behavior

[libvirt] [PATCH 2/3] Drop Upstart support

2019-03-14 Thread Andrea Bolognani
Not a single one of the platforms we target still uses Upstart, and the Upstart project itself has been abandoned for several years now. Signed-off-by: Andrea Bolognani --- m4/virt-init-script.m4 | 7 +- src/Makefile.am | 29 ---

[libvirt] [PATCH 1/3] travis: Use 'redhat' init script on CentOS 7

2019-03-14 Thread Andrea Bolognani
We're gonna drop Upstart support soon, and we don't want Travis CI builds to break when we do. Signed-off-by: Andrea Bolognani --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 55ba340a34..e80f1d367f 100644 --- a/.travis.yml +++

[libvirt] [PATCH 0/3] Drop Upstart support

2019-03-14 Thread Andrea Bolognani
Andrea Bolognani (3): travis: Use 'redhat' init script on CentOS 7 Drop Upstart support news: Document Upstart support being dropped .travis.yml | 2 +- docs/news.xml | 11 + m4/virt-init-script.m4 | 7 +- src/Makefile.am | 29

[libvirt] [PATCH 3/3] news: Document Upstart support being dropped

2019-03-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- docs/news.xml | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 896700fa97..5c15940178 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -83,6 +83,17 @@ + + + +

Re: [libvirt] [PATCH 2/2] virt-driver-qemu.m4: Require YAJL

2019-03-14 Thread Daniel P . Berrangé
On Thu, Mar 14, 2019 at 11:41:31AM +0100, Ján Tomko wrote: > On Wed, Mar 13, 2019 at 04:50:38PM +0100, Michal Privoznik wrote: > > There is not way that qemu driver can work without being able to > > s/not/no/ > > > format/parse JSON. > > > > Signed-off-by: Michal Privoznik > > --- > >

Re: [libvirt] [PATCH 2/2] virt-driver-qemu.m4: Require YAJL

2019-03-14 Thread Ján Tomko
On Wed, Mar 13, 2019 at 04:50:38PM +0100, Michal Privoznik wrote: There is not way that qemu driver can work without being able to s/not/no/ format/parse JSON. Signed-off-by: Michal Privoznik --- m4/virt-driver-qemu.m4 | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [libvirt] [PATCH 1/2] virt-yajl.m4: Drop useless check for qemu

2019-03-14 Thread Ján Tomko
On Wed, Mar 13, 2019 at 04:50:37PM +0100, Michal Privoznik wrote: Firstly, this code is lacking AC_REQUIRE() therefore it may happen that this code is executed before LIBVIRT_DRIVER_CHECK_QEMU is evaluated. Irrelevant. LIBVIRT_DRIVER_CHECK_QEMU does not actually change the with_qemu variable.

Re: [libvirt] Seccomp profile for swtpm as default

2019-03-14 Thread Daniel P . Berrangé
On Wed, Mar 13, 2019 at 03:43:13PM -0400, Stefan Berger wrote: > Hello! > >  If you have some feedback regarding a seccomp profile extension for swtpm > for v0.2, please let me know. I created this github issue here: > > > https://github.com/stefanberger/swtpm/issues/115 > > > Basically the

Re: [libvirt] [PULL 04/14] audio: -audiodev command line option basic implementation

2019-03-14 Thread Peter Maydell
On Tue, 12 Mar 2019 at 07:13, Gerd Hoffmann wrote: > > From: Kővágó, Zoltán > > Audio drivers now get an Audiodev * as config paramters, instead of the > global audio_option structs. There is some code in audio/audio_legacy.c > that converts the old environment variables to audiodev options

[libvirt] [PATCH] run: Don't export unnecessary paths

2019-03-14 Thread Andrea Bolognani
We're using virFileFindResourceFull() to locate resources nowadays, which makes exporting these information in the environment unnecessary: see virDriverLoadModule() for LIBVIRT_DRIVER_DIR virLockManagerPluginNew() for LIBVIRT_LOCK_MANAGER_PLUGIN_DIR virLockManagerLockDaemonConnectionNew()

Re: [libvirt] [PATCH] conf: Introduce virDomainDefCputuneValidate helper

2019-03-14 Thread Erik Skultety
On Wed, Mar 13, 2019 at 09:54:31PM -0600, Suyang Chen wrote: > move all the def->cputune 'period must be in range' > and 'quota must be in range' errors into two macros > and called in virDomainDefCputuneValidate function > and have it called from virDomainDefValidateInternal function I'll

Re: [libvirt] [PATCH 8/8] Don't define abs_* variables ourselves

2019-03-14 Thread Andrea Bolognani
On Thu, 2019-03-14 at 09:45 +0100, Martin Kletzander wrote: > On Wed, Mar 13, 2019 at 05:51:23PM +0100, Andrea Bolognani wrote: > > Apparently this was necessary in the past because old versions > > of autoconf/automake didn't make them available, but these > > days all of the platforms we target

Re: [libvirt] [PATCH 2/2] docs: hacking: Add 'Code coverage reports' section

2019-03-14 Thread Martin Kletzander
On Wed, Mar 13, 2019 at 01:11:32PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson --- docs/hacking.html.in | 29 + 1 file changed, 29 insertions(+) diff --git a/docs/hacking.html.in b/docs/hacking.html.in index f99d143b7b..56608fbc9e 100644 ---

Re: [libvirt] [PATCH] news: Document recent snapshot topological flag

2019-03-14 Thread Martin Kletzander
On Wed, Mar 13, 2019 at 08:10:04PM -0500, Eric Blake wrote: A new API flag is news-worthy. Signed-off-by: Eric Blake --- I'll probably push this one as trivial in 24 hours, if it does not get a review sooner. docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git

Re: [libvirt] [PATCH 1/2] configure: Remove --enable-test-coverage

2019-03-14 Thread Martin Kletzander
On Wed, Mar 13, 2019 at 01:11:31PM -0400, Cole Robinson wrote: We provide a custom configure option --enable-test-coverage and 'make cov' target to generate code coverage reports. However gnulib already provides a 'make coverage' which 'just works' and doesn't require a special configure option.

Re: [libvirt] [PATCH 0/8] Remove some unnecessary compatibility stuff

2019-03-14 Thread Martin Kletzander
On Wed, Mar 13, 2019 at 05:51:15PM +0100, Andrea Bolognani wrote: Andrea Bolognani (8): tests: Drop CONFIG_HEADER from TESTS_ENVIRONMENT tests: Drop LIBVIRT_DRIVER_DIR from TESTS_ENVIRONMENT tests: Don't use TEST_DRIVER_DIR in virTestCaptureProgramExecChild() tests: Don't define

Re: [libvirt] [PATCH 8/8] Don't define abs_* variables ourselves

2019-03-14 Thread Martin Kletzander
On Wed, Mar 13, 2019 at 05:51:23PM +0100, Andrea Bolognani wrote: Apparently this was necessary in the past because old versions of autoconf/automake didn't make them available, but these days all of the platforms we target include recent enough autotools - as evidenced by the fact that, for

[libvirt] [PATCH] docs: rng: make newly introduced features in domcaps optional

2019-03-14 Thread Nikolay Shirokovskiy
was introduced in 24f17f55 and have only gic child element at the time. Thus from backcompat POV the other children are optional. Signed-off-by: Nikolay Shirokovskiy --- docs/schemas/domaincaps.rng | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git