Re: [libvirt] [PATCH v7 0/9] Add setting CPU features (CPUID) with libxenlight driver.

2018-04-17 Thread Jim Fehlig
On 04/11/2018 07:03 PM, Marek Marczykowski-Górecki wrote: Add support for CPUID setting based on element. Since libxl format support only adjusting specific bits over host CPU, only mode='host-passthrough' is supported - other values are rejected (including default 'custom'). This will break

[libvirt] [PATCH] news: Xen: announce support for setting CPU features

2018-04-17 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- docs/news.xml | 12 1 file changed, 12 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a5c489151..dec3f134c 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -44,6 +44,18 @@ add this controller when

Re: [libvirt] [PATCH 2/2] storage: Check qemu-img encryption type capability

2018-04-17 Thread John Ferlan
On 04/17/2018 04:47 PM, Ján Tomko wrote: > On Tue, Apr 17, 2018 at 03:23:33PM -0400, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1526382 >> >> As of QEMU 2.9, qemu-img has enforced using the "key-secret" for >> creation of encrypted volumes. That is, LUKS encryption is now

[libvirt] [qemu RFC v2] qapi: add "firmware.json"

2018-04-17 Thread Laszlo Ersek
Add a schema that describes the different uses and properties of virtual machine firmware. Each firmware executable installed on a host system should come with at least one JSON file that conforms to this schema. Each file informs the management applications about the firmware's properties and

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Jim Fehlig
On 04/17/2018 04:22 PM, Marek Marczykowski-Górecki wrote: On Tue, Apr 17, 2018 at 04:04:01PM -0600, Jim Fehlig wrote: On 04/17/2018 02:20 PM, Marek Marczykowski-Górecki wrote: On Tue, Apr 17, 2018 at 02:00:25PM -0600, Jim Fehlig wrote: Your response in the V6 thread about "conflicting types

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Marek Marczykowski-Górecki
On Tue, Apr 17, 2018 at 04:04:01PM -0600, Jim Fehlig wrote: > On 04/17/2018 02:20 PM, Marek Marczykowski-Górecki wrote: > > On Tue, Apr 17, 2018 at 02:00:25PM -0600, Jim Fehlig wrote: > > > Your response in the V6 thread about "conflicting types (with > > > libxl_get_free_memory_0x040700)" was a

Re: [libvirt] [dbus PATCH 04/25] Implement BlockPeek metohd for Domain Interface

2018-04-17 Thread Ján Tomko
s/metohd/method/ in the commit summary On Tue, Apr 17, 2018 at 04:08:49PM +0200, Ján Tomko wrote: On Tue, Apr 17, 2018 at 02:04:23PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 9 + src/domain.c|

Re: [libvirt] [dbus PATCH 12/25] Implement CoreDumpWithFormat method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:31PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 7 +++ src/domain.c| 26 ++ 2 files changed, 33 insertions(+) diff --git

[libvirt] [PATCH v2 8/9] uml: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/uml/uml_driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index ac168ce77..56dfd7b58 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -2584,11

[libvirt] [PATCH v2 7/9] openvz: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/openvz/openvz_driver.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 9900e8bab..66e589313 100644 --- a/src/openvz/openvz_driver.c

[libvirt] [PATCH v2 2/9] qemu: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/qemu/qemu_domain.c | 5 +- src/qemu/qemu_driver.c | 271 + 2 files changed, 56 insertions(+), 220 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index

[libvirt] [PATCH v2 5/9] bhyve: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/bhyve/bhyve_driver.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 24c4a9c80..8aff0c65c 100644 --- a/src/bhyve/bhyve_driver.c +++

[libvirt] [PATCH v2 6/9] lxc: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/lxc/lxc_driver.c | 60 +--- 1 file changed, 12 insertions(+), 48 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 4097cef93..008e41bda 100644 --- a/src/lxc/lxc_driver.c

[libvirt] [PATCH v2 1/9] Add function that raises error if domain is not active

2018-04-17 Thread Clementine Hayat
Add a function named virDomainObjCheckIsActive in src/conf/domain_conf.c. It calls virDomainObjIsActive, raises error if necessary and returns. There is a lot of occurence of this pattern and it will save 3 lines on each call. Signed-off-by: Clementine Hayat ---

[libvirt] [PATCH v2 0/9] Add function that raises error if domain is not active

2018-04-17 Thread Clementine Hayat
This is my GSOC patch contribution. This change was suggested on BiteSizedTasks in the libvirt wiki[1]. in libvirt there is lots of occurences of this same pattern: if (!virDomainObjIsActive(vm)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s",

[libvirt] [PATCH v2 4/9] libxl: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/libxl/libxl_driver.c | 97 +--- 1 file changed, 21 insertions(+), 76 deletions(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 8808da8db..b66a1de5f 100644 ---

[libvirt] [PATCH v2 3/9] test: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/test/test_driver.c | 35 +++ 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index eec7a8292..43221e547 100644 --- a/src/test/test_driver.c

[libvirt] [PATCH v2 9/9] vz: start using virDomainObjCheckActive

2018-04-17 Thread Clementine Hayat
Signed-off-by: Clementine Hayat --- src/vz/vz_driver.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c index e51d968f2..3094afccb 100644 --- a/src/vz/vz_driver.c +++ b/src/vz/vz_driver.c @@ -3998,11 +3998,8 @@

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Jim Fehlig
On 04/17/2018 02:20 PM, Marek Marczykowski-Górecki wrote: On Tue, Apr 17, 2018 at 02:00:25PM -0600, Jim Fehlig wrote: Your response in the V6 thread about "conflicting types (with libxl_get_free_memory_0x040700)" was a good hint. Things work fine for me on Xen 4.4 through 4.10 with the

[libvirt] [PATCH 3/3] storage: remove qemu-img help scraping

2018-04-17 Thread Ján Tomko
We have been checking whether qemu-img supports the -o compat option by scraping the -help output. Since we require QEMU 1.5.0 now and this option was introduced in 1.1, assume we support it and ditch the help parsing code along with the extra qemu-img invocation. Signed-off-by: Ján Tomko

[libvirt] [PATCH 2/3] tests: assume FMT_COMPAT for qemu-img tests

2018-04-17 Thread Ján Tomko
No point in testing outdated command lines. Signed-off-by: Ján Tomko --- .../qcow2-nocapacity-convert-prealloc.argv | 2 +- tests/storagevolxml2argvdata/qcow2-nocapacity.argv | 2 +- tests/storagevolxml2argvtest.c | 32 +++--- 3

[libvirt] [PATCH 1/3] tests: delete most qemu-img test cases assuming FMT_OPTIONS

2018-04-17 Thread Ján Tomko
We have two leftover "capabilites" for qemu-img: QEMU_IMG_BACKING_FORMAT_OPTIONS QEMU_IMG_BACKING_FORMAT_OPTIONS_COMPAT The former says we are able to specify the backing format via -o (which has been the case for a long time now) and the second one says we can use -o compat to specify the qcow2

[libvirt] [PATCH 0/3] Ditch qemu-img help scraping

2018-04-17 Thread Ján Tomko
Ján Tomko (3): tests: delete most qemu-img test cases assuming FMT_OPTIONS tests: assume FMT_COMPAT for qemu-img tests storage: remove qemu-img help scraping src/storage/storage_util.c | 73 ++--- src/storage/storage_util.h |

Re: [libvirt] [PATCH 2/2] storage: Check qemu-img encryption type capability

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 03:23:33PM -0400, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1526382 As of QEMU 2.9, qemu-img has enforced using the "key-secret" for creation of encrypted volumes. That is, LUKS encryption is now required and the old (awful) qcow[2] encryption

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Marek Marczykowski-Górecki
On Tue, Apr 17, 2018 at 02:00:25PM -0600, Jim Fehlig wrote: > Your response in the V6 thread about "conflicting types (with > libxl_get_free_memory_0x040700)" was a good hint. Things work fine for me on > Xen 4.4 through 4.10 with the following squashed in > > diff --git a/tests/Makefile.am

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Jim Fehlig
On 04/11/2018 07:03 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.

[libvirt] [PATCH 1/2] storage: Separate out the qemu-img help output generation

2018-04-17 Thread John Ferlan
Separate out and return the output string for future comparison. Going to need to add new checks shortly. Signed-off-by: John Ferlan --- src/storage/storage_util.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH 2/2] storage: Check qemu-img encryption type capability

2018-04-17 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1526382 As of QEMU 2.9, qemu-img has enforced using the "key-secret" for creation of encrypted volumes. That is, LUKS encryption is now required and the old (awful) qcow[2] encryption methodolgy is no longer supported. In order to check for this, we

[libvirt] [PATCH 0/2] Disallow qemu-img creation of qcow[2] encryption type

2018-04-17 Thread John Ferlan
Details in the patches. John Ferlan (2): storage: Separate out the qemu-img help output generation storage: Check qemu-img encryption type capability src/storage/storage_util.c | 63 +++--- 1 file changed, 48 insertions(+), 15 deletions(-) -- 2.13.6

Re: [libvirt] [PATCH v4 0/5] qemu: add virQEMUBuildBufferEscapeComma in qemu_command.c

2018-04-17 Thread Cole Robinson
On 04/17/2018 01:33 PM, John Ferlan wrote: > > > On 04/16/2018 06:56 PM, Sukrit Bhatnagar wrote: >> Changes in v4: >> Changes made in v2 anbd v3 to qemu_command.c are discarded. >> Some changes introduced in v2 are used to create new smaller patches. >> virQEMUBuildBufferEscapeComma was applied

[libvirt] [PATCH 1/3] conf: format/parse as tristate

2018-04-17 Thread Cole Robinson
is a bare boolean XML property. We don't really use this format anymore and instead prefer tristate since it's required for modeling on/off/default. If for example future qemu started enabling vmcoreinfo by default we wouldn't have any way for the user to turn this off. Convert it to tristate.

[libvirt] [PATCH 2/3] conf: Add a comment warning about boolean feature XML

2018-04-17 Thread Cole Robinson
This is the old style and we really shouldn't be adding any more examples like this. Add a comment to warn devs away Signed-off-by: Cole Robinson --- docs/schemas/domaincommon.rng | 6 +- src/conf/domain_conf.c| 2 ++ 2 files changed, 7 insertions(+), 1

[libvirt] [PATCH 3/3] domain_capabilities: Report support

2018-04-17 Thread Cole Robinson
Report domaincaps if the guest config accepts Signed-off-by: Cole Robinson --- This bucks the domaincapabilities trend of always having a child enum if supported='yes'. Following that trend we would give us this XML when vmcoreinfo is supported: on off

[libvirt] [PATCH 0/3] conf: tweaks

2018-04-17 Thread Cole Robinson
Patch #1 changes the vmcoreinfo XML schema slightly to be more future proof, this is technically an API break but I'm not sure it matters, see the patch for more details. Patch #3 adds vmcoreinfo reporting to domain capabilities. The schema doesn't follow the typical pattern so if anyone has

Re: [libvirt] [dbus PATCH 10/25] Implement BlockRebase method for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 07:26:15PM +0200, Pavel Hrdina wrote: > On Tue, Apr 17, 2018 at 02:04:29PM +0200, Katerina Koukiou wrote: > > Signed-off-by: Katerina Koukiou > > --- > > data/org.libvirt.Domain.xml | 8 > > src/domain.c| 29

Re: [libvirt] [PATCH v4 0/5] qemu: add virQEMUBuildBufferEscapeComma in qemu_command.c

2018-04-17 Thread John Ferlan
On 04/16/2018 06:56 PM, Sukrit Bhatnagar wrote: > Changes in v4: > Changes made in v2 anbd v3 to qemu_command.c are discarded. > Some changes introduced in v2 are used to create new smaller patches. > virQEMUBuildBufferEscapeComma was applied to: > - info->romfile in qemuBuildRomStr > -

Re: [libvirt] [dbus PATCH 10/25] Implement BlockRebase method for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 02:04:29PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 8 > src/domain.c| 29 + > 2 files changed, 37 insertions(+) > > diff --git

Re: [libvirt] [dbus PATCH 08/25] Implement BlockJobAbort method for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 02:04:27PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 6 ++ > src/domain.c| 25 + > 2 files changed, 31 insertions(+) > > diff --git

Re: [libvirt] [dbus PATCH 05/25] Implement MemoryPeek method for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 02:04:24PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 8 > src/domain.c| 38 ++ > 2 files changed, 46 insertions(+) > > diff

Re: [libvirt] [PATCH v2 0/2] Fix vmware driver for VMware Fusion 10

2018-04-17 Thread John Ferlan
On 04/14/2018 05:25 AM, Rainer Müller wrote: > These changes were required to get VMware Fusion working at all. > I tested with VMware Fusion 10.1.1 on macOS 10.12 Sierra. > > I am not sure whether calling virCapabilitiesInitCaches() makes sense at > all on macOS. This function looks highly

Re: [libvirt] [dbus PATCH 04/25] Implement BlockPeek metohd for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 02:04:23PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 9 + > src/domain.c| 39 +++ > 2 files changed, 48 insertions(+) > > diff

Re: [libvirt] [dbus PATCH 02/25] Implement SendKey method for Domain Interface

2018-04-17 Thread Pavel Hrdina
On Tue, Apr 17, 2018 at 02:04:21PM +0200, Katerina Koukiou wrote: > Signed-off-by: Katerina Koukiou > --- > data/org.libvirt.Domain.xml | 8 > src/domain.c| 46 > + > 2 files changed, 54 insertions(+) >

Re: [libvirt] [PATCH v3 5/5] cfg.mk: Introduce syntax-check rule to prefer VIR_CLASS_NEW

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:01:06PM +0200, Michal Privoznik wrote: > Now that we have macro that does some checks lets forbid raw > usage of virClassNew() in favor of VIR_CLASS_NEW(). > > Signed-off-by: Michal Privoznik > Reviewed-by: Erik Skultety > ---

Re: [libvirt] [PATCH v3 4/5] virobject: Check if @parent is the first member in class

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:01:05PM +0200, Michal Privoznik wrote: > Our virObject code relies heavily on the fact that the first > member of the class struct is type of virObject (or some > derivation of if). Let's check for that. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH v3 2/5] src: Unify virObject member name

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:01:03PM +0200, Michal Privoznik wrote: > Whenever we declare a new object the first member of the struct > has to be virObject (or any other member of that family). Now, up > until now we did not care about the name of the struct member. > But lets unify it so that we

Re: [libvirt] [PATCH v3 3/5] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:01:04PM +0200, Michal Privoznik wrote: > So far we are repeating the following lines over and over: > > if (!(virSomeObjectClass = virClassNew(virClassForObject(), > "virSomeObject", > sizeof(virSomeObject), >

Re: [libvirt] [PATCH v3 1/5] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:01:02PM +0200, Michal Privoznik wrote: > In next patches this name will be needed for a different memeber. > Also, it makes sense to rename the variable because it does not > contain reference to parent device, just its name. > > Signed-off-by: Michal Privoznik

Re: [libvirt] [jenkins-ci PATCH v3 3/3] projects: Add libvirt-master-build-website job

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:20:46PM +0200, Andrea Bolognani wrote: > This will ensure libvirt maintains the minimum amount of > compatibility with CentOS 6 that running its website on that > platform requires. > > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt] [jenkins-ci PATCH v3 1/3] jobs: Introduce machine groups

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 06:20:44PM +0200, Andrea Bolognani wrote: > We're running most of the jobs on all machines, with the major > notable exceptions being the various *-rpm jobs, which of course > only make sense for RPM-based distributions, and the MinGW jobs, > which we only run on Fedora

Re: [libvirt] [jenkins-ci PATCH 3/3] jobs: Drop autotools-mingw-job

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 05:43:12PM +0200, Andrea Bolognani wrote: > Now that we have variants and we've removed all uses of custom > environment variables, we can convert all jobs that use the > autotools-mingw-job template to the autotools-build-job plus > a few overrides. > > As a consequence

Re: [libvirt] [jenkins-ci PATCH 1/3] jobs: Introduce variants

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 05:43:10PM +0200, Andrea Bolognani wrote: > This optional feature will allow us to reuse existing job > templates for things like MinGW or website builds. > > Signed-off-by: Andrea Bolognani > --- > jobs/autotools.yaml| 20

Re: [libvirt] [jenkins-ci PATCH 2/3] jobs: Tweak autotools-mingw-job template

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 05:43:11PM +0200, Andrea Bolognani wrote: > Make it more similar to the autotools-build-job by dropping the > custom $PREFIX variable and redefining the standard $VIRT_PREFIX > instead, which also makes $PKG_CONFIG_PATH shorter, and moving > all environment variables

[libvirt] [PATCH 7/7] qemu: Check for missing 'return' in qemuMonitorJSONCheckReply

2018-04-17 Thread John Ferlan
If the "return" is not in the reply, then the subsequent virJSONValueGetType will not be happy. Found by Coverity Signed-off-by: John Ferlan --- src/qemu/qemu_monitor_json.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 6/7] qemu: Fix possible memory leak in migration param processing

2018-04-17 Thread John Ferlan
If virJSONValueArraySize(caps) <= 0, then we will still need to virJSONValueFree(caps) because qemuMonitorSetMigrationCapabilities won't consume it. Found by Coverity Signed-off-by: John Ferlan --- src/qemu/qemu_migration_params.c | 1 + 1 file changed, 1 insertion(+) diff

[libvirt] [PATCH 2/7] remote: Fix usage of ATTRIBUTE_FALLTHROUGH

2018-04-17 Thread John Ferlan
Move to within the #if since the #else portion ends with a goto and that raised concern by Coverity. Signed-off-by: John Ferlan --- src/remote/remote_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c

[libvirt] [PATCH 5/7] tests: Add checks for possible errors

2018-04-17 Thread John Ferlan
If virJSONValueObjectGetArray fails to find "members" in @localroot, then using @rootmembers in subsequent calls which assume that it was successful will not go well. So add a check that it was successfully fetched and an error if not. Similarly virJSONValueArraySize returns an 'ssize_t', so the

[libvirt] [PATCH 4/7] tests: Don't call virNetServerClientClose without valid client

2018-04-17 Thread John Ferlan
If @client hasn't been opened, then don't call virNetServerClientClose since that'll cause certain failure. Found by Coverity Signed-off-by: John Ferlan --- tests/virnetserverclienttest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH 3/7] tests: Return failure if log not fopen'd

2018-04-17 Thread John Ferlan
If @log is not fopen'd then, going to cleanup and calling fclose will make for an unhappy caller. So just fail immediately instead since there's nothing to clean up. Found by Coverity Signed-off-by: John Ferlan --- tests/commandhelper.c | 2 +- 1 file changed, 1

[libvirt] [PATCH 1/7] conf: Add error checking to virDomainSnapshotDiskDefFormat

2018-04-17 Thread John Ferlan
Commit id '43f2ccdc' called virDomainDiskSourceDefFormatInternal rather than formatting the the disk source inline. However, it did not handle the case where the helper failed. Over time the helper has been renamed to virDomainDiskSourceFormat. Similar to other consumers, if

[libvirt] [PATCH 0/7] Addressing some Coverity complaints...

2018-04-17 Thread John Ferlan
My current pile is 48 patches - most of those are known false positives or have been posted before and either rejected or ignored. In any case, the following is a list of more recent adjustments from my coverity tree. Seems we've largely moved away from resource leaks and into return value

[libvirt] [jenkins-ci PATCH v3 3/3] projects: Add libvirt-master-build-website job

2018-04-17 Thread Andrea Bolognani
This will ensure libvirt maintains the minimum amount of compatibility with CentOS 6 that running its website on that platform requires. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-centos-6/main.yml | 3 +++ projects/libvirt.yaml | 11

[libvirt] [jenkins-ci PATCH v3 2/3] guests: Introduce libvirt+website project

2018-04-17 Thread Andrea Bolognani
Building the website and creating distribution tarballs requires very few dependencies compared to performing a full build of libvirt, so we introduce a separate, leaner project for the purpose. Reviewed-by: Daniel P. Berrangé Signed-off-by: Andrea Bolognani

[libvirt] [jenkins-ci PATCH v3 0/3] Mostly drop CentOS 6

2018-04-17 Thread Andrea Bolognani
This applies on top of https://www.redhat.com/archives/libvir-list/2018-April/msg01526.html Changes from [v2]: * several patches have been pushed already; * define the libvirt-master-build-website job using the newly variants-enabled generic-build-job template; * add

[libvirt] [jenkins-ci PATCH v3 1/3] jobs: Introduce machine groups

2018-04-17 Thread Andrea Bolognani
We're running most of the jobs on all machines, with the major notable exceptions being the various *-rpm jobs, which of course only make sense for RPM-based distributions, and the MinGW jobs, which we only run on Fedora Rawhide. Instead of listing machines over and over again, define two list

Re: [libvirt] [PATCH v1 0/4] CPU Model Comparsion via QEMU

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 10:18:58AM +0200, Jiri Denemark wrote: > On Mon, Apr 16, 2018 at 19:16:05 -0400, Collin Walling wrote: > > [Overview] > > > > This patch series implements an interface to "query-cpu-model-comparison" > > (available QEMU ~2.8.0) via virsh cpu-compare. > > > > [Using This

[libvirt] [PATCH v3 4/5] virobject: Check if @parent is the first member in class

2018-04-17 Thread Michal Privoznik
Our virObject code relies heavily on the fact that the first member of the class struct is type of virObject (or some derivation of if). Let's check for that. Signed-off-by: Michal Privoznik --- src/util/virobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[libvirt] [PATCH v3 0/5] virClassNew rework

2018-04-17 Thread Michal Privoznik
*** Some BLURB HERE. Too tired to write something useful. *** Michal Privoznik (5): datatypes: Rename @parent to @parentName in virNodeDevice src: Unify virObject member name virobject: Introduce VIR_CLASS_NEW() macro virobject: Check if @parent is the first member in class cfg.mk:

[libvirt] [PATCH v3 1/5] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-17 Thread Michal Privoznik
In next patches this name will be needed for a different memeber. Also, it makes sense to rename the variable because it does not contain reference to parent device, just its name. Signed-off-by: Michal Privoznik --- src/conf/virnodedeviceobj.c | 2 +-

[libvirt] [PATCH v3 5/5] cfg.mk: Introduce syntax-check rule to prefer VIR_CLASS_NEW

2018-04-17 Thread Michal Privoznik
Now that we have macro that does some checks lets forbid raw usage of virClassNew() in favor of VIR_CLASS_NEW(). Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- cfg.mk | 8 1 file changed, 8 insertions(+) diff --git a/cfg.mk

[libvirt] [PATCH v3 3/5] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-17 Thread Michal Privoznik
So far we are repeating the following lines over and over: if (!(virSomeObjectClass = virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose))) return -1; While

[libvirt] [PATCH v3 2/5] src: Unify virObject member name

2018-04-17 Thread Michal Privoznik
Whenever we declare a new object the first member of the struct has to be virObject (or any other member of that family). Now, up until now we did not care about the name of the struct member. But lets unify it so that we can do some checks at compile time later. The unified name is 'parent'.

[libvirt] [PATCH v4 4/5] qemu: Escape commas for qemuBuildGraphicsVNCCommandLine

2018-04-17 Thread Sukrit Bhatnagar
Add comma escaping for cfg->vncTLSx509certdir. Signed-off-by: Sukrit Bhatnagar --- src/qemu/qemu_command.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e903491..8f0dddf 100644 ---

[libvirt] [PATCH v4 0/5] qemu: add virQEMUBuildBufferEscapeComma in qemu_command.c

2018-04-17 Thread Sukrit Bhatnagar
Changes in v4: Changes made in v2 anbd v3 to qemu_command.c are discarded. Some changes introduced in v2 are used to create new smaller patches. virQEMUBuildBufferEscapeComma was applied to: - info->romfile in qemuBuildRomStr - disk->vendor and disk->product in qemuBuildDriveDevStr - fs->src->path

[libvirt] [PATCH v4 1/5] qemu: Escape commas for qemuBuildRomStr

2018-04-17 Thread Sukrit Bhatnagar
Add comma escaping for info->romfile. Signed-off-by: Sukrit Bhatnagar --- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f864350..e7b8aa3 100644 ---

[libvirt] [jenkins-ci PATCH 3/3] jobs: Drop autotools-mingw-job

2018-04-17 Thread Andrea Bolognani
Now that we have variants and we've removed all uses of custom environment variables, we can convert all jobs that use the autotools-mingw-job template to the autotools-build-job plus a few overrides. As a consequence of this, mingw32 and mingw64 builds will be split into separate jobs.

[libvirt] [PATCH v4 5/5] qemu: Escape commas for qemuBuildDomainLoaderCommandLine

2018-04-17 Thread Sukrit Bhatnagar
Add comma escaping for loader->path and loader->nvram. Signed-off-by: Sukrit Bhatnagar --- src/qemu/qemu_command.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8f0dddf..49dc95b

[libvirt] [PATCH v4 3/5] qemu: Escape commas for qemuBuildFSStr and qemuBuildFSDevStr

2018-04-17 Thread Sukrit Bhatnagar
Add comma escaping for fs->src->path and fs->dst. Signed-off-by: Sukrit Bhatnagar --- src/qemu/qemu_command.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b75e441..e903491 100644 ---

[libvirt] [PATCH v4 2/5] qemu: Escape commas for qemuBuildDriveDevStr

2018-04-17 Thread Sukrit Bhatnagar
Add comma escaping for disk->vendor and disk->product when being built for the command line (and not from hotplug). Signed-off-by: Sukrit Bhatnagar --- src/qemu/qemu_command.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git

[libvirt] [jenkins-ci PATCH 0/3] Introduce variants and use them for MinGW

2018-04-17 Thread Andrea Bolognani
Andrea Bolognani (3): jobs: Introduce variants jobs: Tweak autotools-mingw-job template jobs: Drop autotools-mingw-job jobs/autotools.yaml| 94 -- jobs/defaults.yaml | 17 + jobs/generic.yaml | 16

[libvirt] [jenkins-ci PATCH 1/3] jobs: Introduce variants

2018-04-17 Thread Andrea Bolognani
This optional feature will allow us to reuse existing job templates for things like MinGW or website builds. Signed-off-by: Andrea Bolognani --- jobs/autotools.yaml| 20 ++-- jobs/defaults.yaml | 1 + jobs/generic.yaml | 16

[libvirt] [jenkins-ci PATCH 2/3] jobs: Tweak autotools-mingw-job template

2018-04-17 Thread Andrea Bolognani
Make it more similar to the autotools-build-job by dropping the custom $PREFIX variable and redefining the standard $VIRT_PREFIX instead, which also makes $PKG_CONFIG_PATH shorter, and moving all environment variables together. Signed-off-by: Andrea Bolognani ---

Re: [libvirt] [PATCH v1 0/4] CPU Model Comparsion via QEMU

2018-04-17 Thread Collin Walling
On 04/17/2018 04:18 AM, Jiri Denemark wrote: > On Mon, Apr 16, 2018 at 19:16:05 -0400, Collin Walling wrote: >> [Overview] >> >> This patch series implements an interface to "query-cpu-model-comparison" >> (available QEMU ~2.8.0) via virsh cpu-compare. >> >> [Using This Feature] >> >> Run virsh

Re: [libvirt] [PATCH v4 05/14] qemu: Store pr runtime data in status XML

2018-04-17 Thread Michal Privoznik
On 04/17/2018 05:07 PM, John Ferlan wrote: > > > On 04/17/2018 10:19 AM, Michal Privoznik wrote: >> On 04/17/2018 02:00 PM, John Ferlan wrote: >>> >>> >>> On 04/16/2018 10:56 AM, Michal Privoznik wrote: On 04/13/2018 10:57 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM,

Re: [libvirt] [PATCH v2 3/5] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 05:07:41PM +0200, Michal Privoznik wrote: > On 04/17/2018 10:32 AM, Daniel P. Berrangé wrote: > > On Tue, Apr 17, 2018 at 10:20:51AM +0200, Michal Privoznik wrote: > >> So far we are repeating the following lines over and over: > >> > >> if (!(virSomeObjectClass =

Re: [libvirt] [PATCH v2 3/5] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-17 Thread Michal Privoznik
On 04/17/2018 10:32 AM, Daniel P. Berrangé wrote: > On Tue, Apr 17, 2018 at 10:20:51AM +0200, Michal Privoznik wrote: >> So far we are repeating the following lines over and over: >> >> if (!(virSomeObjectClass = virClassNew(virClassForObject(), >> "virSomeObject",

Re: [libvirt] [dbus PATCH 09/25] Implement BlockPull method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:28PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 7 +++ src/domain.c| 26 ++ 2 files changed, 33 insertions(+) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH v4 05/14] qemu: Store pr runtime data in status XML

2018-04-17 Thread John Ferlan
On 04/17/2018 10:19 AM, Michal Privoznik wrote: > On 04/17/2018 02:00 PM, John Ferlan wrote: >> >> >> On 04/16/2018 10:56 AM, Michal Privoznik wrote: >>> On 04/13/2018 10:57 PM, John Ferlan wrote: On 04/10/2018 10:58 AM, Michal Privoznik wrote: > Now that we generate

Re: [libvirt] [dbus PATCH 08/25] Implement BlockJobAbort method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:27PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 6 ++ src/domain.c| 25 + 2 files changed, 31 insertions(+) Reviewed-by: Ján Tomko

Re: [libvirt] [dbus PATCH 07/25] Implement BlockCommit method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:26PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 9 + src/domain.c| 28 2 files changed, 37 insertions(+) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCH] domain: avoid slash characters to the new domain name.

2018-04-17 Thread Julio Faracco
Hi Peter, I read the BZ comments and Cole's suggestion, but I didn't know about the requirements of the other hypervisors. Since slash is commonly used for paths. I will investigate it properly. -- Julio Cesar Faracco 2018-04-17 4:14 GMT-03:00 Peter Krempa : > > On Tue, Apr

Re: [libvirt] [dbus PATCH 06/25] Add AddIOThread method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:25PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 6 ++ src/domain.c| 25 + 2 files changed, 31 insertions(+) Reviewed-by: Ján Tomko

Re: [libvirt] [PATCHv2 0/4] qemu: enable sandbox whitelist by default

2018-04-17 Thread Ján Tomko
On Tue, Apr 10, 2018 at 04:49:38PM +0200, Ján Tomko wrote: v1: https://www.redhat.com/archives/libvir-list/2018-March/msg01965.html https://bugzilla.redhat.com/show_bug.cgi?id=1492597 v2: * also deny resource control * split out and refactor the command line building * be explicit about denying

Re: [libvirt] [PATCH v4 07/14] qemu_cgroup: Allow /dev/mapper/control for PR

2018-04-17 Thread Michal Privoznik
On 04/17/2018 02:25 PM, John Ferlan wrote: > > > On 04/16/2018 10:56 AM, Michal Privoznik wrote: >> On 04/14/2018 02:55 PM, John Ferlan wrote: >>> >>> >>> On 04/10/2018 10:58 AM, Michal Privoznik wrote: Just like in previous commit, qemu-pr-helper might want to open /dev/mapper/control

Re: [libvirt] [PATCH v4 05/14] qemu: Store pr runtime data in status XML

2018-04-17 Thread Michal Privoznik
On 04/17/2018 02:00 PM, John Ferlan wrote: > > > On 04/16/2018 10:56 AM, Michal Privoznik wrote: >> On 04/13/2018 10:57 PM, John Ferlan wrote: >>> >>> >>> On 04/10/2018 10:58 AM, Michal Privoznik wrote: Now that we generate pr-manager alias and socket path store them in status XML so

Re: [libvirt] [PATCH v4 04/14] qemu: Generate alias and socket path for pr-helper

2018-04-17 Thread Michal Privoznik
On 04/17/2018 01:49 PM, John Ferlan wrote: > > > On 04/16/2018 10:56 AM, Michal Privoznik wrote: >> On 04/13/2018 10:51 PM, John Ferlan wrote: >>> >>> >>> On 04/10/2018 10:58 AM, Michal Privoznik wrote: While we're not generating the command line just yet (look for the next commits),

Re: [libvirt] [PATCH v2 5/5] qemu: Enable memory-backend-file.discard-data whenever possible

2018-04-17 Thread Eduardo Habkost
On Tue, Apr 17, 2018 at 01:16:42PM +0200, Michal Privoznik wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1480668 > > The cases when we cannot enable this optimization are: > 1) nvdimms > 2) if memAccess='shared' The specific use case for discard-data=on uses share=on, see:

Re: [libvirt] [jenkins-ci PATCH v2 3/6] projects: Add libvirt-master-website job

2018-04-17 Thread Daniel P . Berrangé
On Tue, Apr 17, 2018 at 04:21:19PM +0200, Andrea Bolognani wrote: > On Tue, 2018-04-17 at 15:02 +0100, Daniel P. Berrangé wrote: > > On Tue, Apr 17, 2018 at 03:57:04PM +0200, Andrea Bolognani wrote: > > > We could go one further and use > > > > > > name: '{name}-{branch}-build{variant}' > > >

Re: [libvirt] [jenkins-ci PATCH v2 3/6] projects: Add libvirt-master-website job

2018-04-17 Thread Andrea Bolognani
On Tue, 2018-04-17 at 15:02 +0100, Daniel P. Berrangé wrote: > On Tue, Apr 17, 2018 at 03:57:04PM +0200, Andrea Bolognani wrote: > > We could go one further and use > > > > name: '{name}-{branch}-build{variant}' > > > > for the generic-build-job template and > > > > variant: +website > > >

Re: [libvirt] [dbus PATCH 05/25] Implement MemoryPeek method for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:24PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 8 src/domain.c| 38 ++ 2 files changed, 46 insertions(+) Reviewed-by: Ján

Re: [libvirt] [dbus PATCH 04/25] Implement BlockPeek metohd for Domain Interface

2018-04-17 Thread Ján Tomko
On Tue, Apr 17, 2018 at 02:04:23PM +0200, Katerina Koukiou wrote: Signed-off-by: Katerina Koukiou --- data/org.libvirt.Domain.xml | 9 + src/domain.c| 39 +++ 2 files changed, 48 insertions(+) diff --git

  1   2   3   >