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

2018-04-16 Thread Julio Faracco
The 'domrename' command needs to check if the new domain name contains the slash character. This character is not accepted by libvirt XML definition because it is an invalid char (see Cole's commit b1fc6a7b7). This commit enhace the 'domrename' command adding this check. Resolves:

Re: [libvirt] [PATCH 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-16 Thread Collin Walling
On 04/16/2018 02:06 AM, Chris Venteicher wrote: > Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP > query-cpu-model-baseline transaction with QEMU. > > QEMU determines a baseline CPU Model from two input CPU Models to > complete the query-cpu-model-baseline transaction. >

Re: [libvirt] [PATCH 0/3] query-cpu-model-baseline QMP command

2018-04-16 Thread Collin Walling
On 04/16/2018 02:06 AM, Chris Venteicher wrote: > Implementation of libvirt functions to support the > QEMU query-cpu-model-baseline QMP command. > > This is part of resolution of: > https://bugzilla.redhat.com/show_bug.cgi?id=1511999 > > Signed-off-by: Chris Venteicher >

[libvirt] [PATCH v1 3/4] qemu: implement query-cpu-model-comparison via qemu

2018-04-16 Thread Collin Walling
Interfaces with QEMU to compare two CPU models. The command takes two CPU models, A and B, that are given a model name and an optional list of CPU features. Through the query-cpu-model-comparison command sent to QEMU via QMP, a third CPU model, C, is returned that contains the comparison result

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

2018-04-16 Thread Collin Walling
[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 cpu-compare (ensure you are running the virsh in your build dir) and pass it an xml file describing a cpu definition. You can copy

[libvirt] [PATCH v1 4/4] qemu: hook up cpu-comparison to qemu driver

2018-04-16 Thread Collin Walling
The virsh cpu-compare command accepts an xml file that describes a cpu definition and compares it to a master xml file containing the host CPU. Not all architectures follow this procedure, and instead compare CPU's via QEMU. Let's hook up this capability to the QEMU driver and, if the capabilitiy

[libvirt] [PATCH v1 1/4] qemu: place qemuCaps host cpu model in virCaps

2018-04-16 Thread Collin Walling
Some architectures retrieve their host CPU model data from QEMU via qmp-query-cpu-model-expansion and stores it in the QEMU cache files. Let's take this data and also store it in virCaps so we can easily retrieve the host CPU model for later use. We should also take care to ensure that we always

[libvirt] [PATCH v1 2/4] cpu_conf: xml to cpu definition parse helper

2018-04-16 Thread Collin Walling
Implement an xml to virCPUDefPtr helper that handles the ctxt prerequisite for virCPUDefParseXML. Signed-off-by: Collin Walling --- src/conf/cpu_conf.c | 30 ++ src/conf/cpu_conf.h | 6 ++ src/cpu/cpu.c| 14

Re: [libvirt] [PATCH 1/2] lxc: s/subtreee/subtree/

2018-04-16 Thread Ján Tomko
On Sun, Apr 15, 2018 at 04:30:10PM +0100, Radostin Stoyanov wrote: Signed-off-by: Radostin Stoyanov --- src/lxc/lxc_container.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko And pushed. Jano signature.asc

Re: [libvirt] [PATCH v2 73/73] qemuxml2xmltest: Add status XML tests for migration params

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:42:03PM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- .../migration-in-params-in.xml| 400 + .../migration-in-params-out.xml | 1 + .../migration-out-params-in.xml | 414

Re: [libvirt] [PATCH v2 71/73] qemu: Store API flags for async jobs in status XML

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:42:01PM +0200, Jiri Denemark wrote: This will help us decide what to do when libvirtd is restarted while an async job is running. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 8 + .../migration-out-nbd-out.xml

Re: [libvirt] [PATCH v2 72/73] qemu: Don't delete TLS objects unless TLS migration was requested

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:42:02PM +0200, Jiri Denemark wrote: Trying to delete the non-existent TLS objects results in ugly error messages in the log, which could easily confuse users. Let's avoid this confusion by not trying to delete the objects if we were not asked to enable TLS migration

Re: [libvirt] [PATCH v2 70/73] qemu: Drop priv->job.postcopyEnabled bool

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:42:00PM +0200, Jiri Denemark wrote: We store the flags passed to the API which started the migration. Let's use them instead of a separate bool to check if post-copy migration was requested. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c

Re: [libvirt] [PATCH v2 69/73] qemu: Drop priv->job.dump_memory_only bool

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:59PM +0200, Jiri Denemark wrote: We store the flags passed to the API which started QEMU_ASYNC_JOB_DUMP and we can use them to check whether a memory-only dump is running. There's no need for a specific bool flag. Signed-off-by: Jiri Denemark

Re: [libvirt] [PATCH v2 68/73] qemu: Properly avoid cancelling memory-only dump

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:58PM +0200, Jiri Denemark wrote: migrate_cancel QMP command cannot be used for cancelling memory-only dumps and priv->job.dump_memory_only is used for reporting an error if someone calls virDomainAbortJob when memory-only dump job is running. Since commit

Re: [libvirt] [PATCH v2 67/73] qemu: Store API flags for async jobs in qemuDomainJobObj

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:57PM +0200, Jiri Denemark wrote: When an async job is running, we sometimes need to know how it was started to distinguish between several types of the job, e.g., post-copy vs. normal migration. So far we added a specific bool item to qemuDomainJobObj for such

[libvirt] [jenkins-ci PATCH 1/4] guests: Add libvirt-glib+mingw project

2018-04-16 Thread Andrea Bolognani
Just like libvirt+mingw, we want to keep the native toolchain and the MinGW one separate. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-fedora-rawhide/main.yml | 1 + guests/vars/projects/{libvirt-glib.yml => libvirt-glib+mingw.yml} | 2 --

[libvirt] [jenkins-ci PATCH 4/4] guests: Rename gtk-vnc mapping to gtk-vnc2

2018-04-16 Thread Andrea Bolognani
Both gtk-vnc and gtk-vnc2 exist: the former is based on GTK+ 2 and is considered deprecated, the latter uses GTK+ 3 and it's actively developed. We need the GTK+ 3-based version for our builds: make that more explicit by renaming the mapping. The MinGW variant of the mapping already does this.

[libvirt] [jenkins-ci PATCH 2/4] guests: Add virt-viewer+mingw project

2018-04-16 Thread Andrea Bolognani
Just like libvirt+mingw and libvirt-glib+mingw, we want to keep the native toolchain and the MinGW one separate. Signed-off-by: Andrea Bolognani --- guests/host_vars/libvirt-fedora-rawhide/main.yml | 1 + .../{virt-viewer.yml => virt-viewer+mingw.yml} | 6 --

[libvirt] [jenkins-ci PATCH 0/4] MinGW builds tweaks and fixes

2018-04-16 Thread Andrea Bolognani
Foreshadowed in https://www.redhat.com/archives/libvir-list/2018-April/msg01162.html Andrea Bolognani (4): guests: Add libvirt-glib+mingw project guests: Add virt-viewer+mingw project guests: Add icoutils dependency to virt-viewer+mingw guests: Rename gtk-vnc mapping to gtk-vnc2

[libvirt] [jenkins-ci PATCH 3/4] guests: Add icoutils dependency to virt-viewer+mingw

2018-04-16 Thread Andrea Bolognani
The package is not needed for native builds, but MinGW builds require it to be installed. Signed-off-by: Andrea Bolognani --- guests/vars/mappings.yml | 4 guests/vars/projects/virt-viewer+mingw.yml | 1 + 2 files changed, 5 insertions(+) diff --git

Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Michal Privoznik
On 04/16/2018 11:52 AM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: >> So far we are repeating the following lines over and over: >> >> virClassNew(virClassForObject(), >> "virSomeObject", >> sizeof(virSomeObject), >>

Re: [libvirt] [PATCH 3/9] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-16 Thread Michal Privoznik
On 04/16/2018 01:53 PM, John Ferlan wrote: > > > On 04/13/2018 10:47 AM, Michal Privoznik wrote: >> In next patches this name will be needed for a different memeber. > > s/memeber/member > >> Also, it makes sense to rename the variable because it does not >> contain reference to parent device,

Re: [libvirt] [PATCH 2/9] util: Make structs follow our naming convention

2018-04-16 Thread Michal Privoznik
On 04/16/2018 09:55 AM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:09PM +0200, Michal Privoznik wrote: >> There are two structs virMacMap and virFDStreamData that don't >> have the underscore prefix. Put it there so that they follow the >> rest of the code. >> >> Signed-off-by: Michal

Re: [libvirt] [PATCH 3/9] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-16 Thread Michal Privoznik
On 04/16/2018 09:26 AM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:10PM +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

Re: [libvirt] [PATCH 8/9] virobject: Check if @parent is the first member in class

2018-04-16 Thread Michal Privoznik
On 04/16/2018 02:30 PM, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:15PM +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. > > If a class

[libvirt] [PATCH] virsh: Clear vsh last error during virshCommandOptVolBy

2018-04-16 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1529256 If one of the virStorageVolLookupBy{Key|Name|Path} succeeds and we have a @vol, then clear the last libvirt error; otherwise, a subsequent "other" failure may cause vshReportError to erroneously report the wrong error as well as a reported

[libvirt] [PATCH] qemu_domain: Don't leak @paths in qemuDomainNamespaceSetupDisk

2018-04-16 Thread Michal Privoznik
Introduced in d3db304d2e4. Instead of returning immediately we need to jump onto cleanup label where @paths is freed. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [libvirt] [libvirt PATCH v2 29/44] Deprecate QEMU_CAPS_DRIVE_CACHE_UNSAFE

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c > index 07f7630655..9534eb6fae 100644 > --- a/tests/qemuxml2argvtest.c > +++ b/tests/qemuxml2argvtest.c > @@ -954,8 +954,7 @@ mymain(void) > DO_TEST("disk-drive-cache-v2-wb",

Re: [libvirt] [libvirt PATCH v2 28/44] Deprecate QEMU_CAPS_NO_SHUTDOWN

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index c6cfd05216..d175b196ea 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -7486,17 +7486,10 @@ qemuProcessReconnect(void *opaque) > /* We

Re: [libvirt] [PATCH v2 65/73] qemumigparamstest: Add basic test data

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:55PM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/qemumigparamsdata/basic.json | 9 + tests/qemumigparamsdata/basic.reply | 12 tests/qemumigparamsdata/basic.xml | 11 +++

Re: [libvirt] [PATCH v2 66/73] qemumigparamstest: Add test data for TLS parameters

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:56PM +0200, Jiri Denemark wrote: Signed-off-by: Jiri Denemark --- tests/qemumigparamsdata/tls-enabled.json | 11 +++ tests/qemumigparamsdata/tls-enabled.reply | 14 ++ tests/qemumigparamsdata/tls-enabled.xml| 13

Re: [libvirt] [PATCH v2 64/73] tests: Add tests for QEMU migration parameters

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:54PM +0200, Jiri Denemark wrote: This is an enhanced replacement for the original test from qemumonitorjsontest which was dropped earlier in this series. More data files with some real data will be added in the following patches. Signed-off-by: Jiri Denemark

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

2018-04-16 Thread Michal Privoznik
On 04/14/2018 05:14 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> If we are the last one to use pr-manager object we need to remove >> it and also kill the qemu-pr-helper process. >> >> Signed-off-by: Michal Privoznik >> --- >>

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

2018-04-16 Thread Michal Privoznik
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 under certain circumstances. Therefore we >> have to allow it in cgroups. > > Perhaps the two patches should

Re: [libvirt] [PATCH v4 09/14] qemu: Introduce pr_helper to qemu.conf

2018-04-16 Thread Michal Privoznik
On 04/14/2018 03:35 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> Just like we allow users overriding path to bridge-helper >> detected at compile time we can allow them to override path to >> qemu-pr-helper. >> >> Signed-off-by: Michal Privoznik

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

2018-04-16 Thread Michal Privoznik
On 04/14/2018 03:04 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> This is the easier part. All we need to do here is put -object >> pr-manager-helper,id=$alias,path=$socketPath and then just >> reference the object in -drive file.pr-manager=$alias. >> >>

Re: [libvirt] [PATCH v4 10/14] qemu: Start PR daemon on domain startup

2018-04-16 Thread Michal Privoznik
On 04/14/2018 04:56 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> Before we exec() qemu we have to spawn pr-helper processes for >> all managed reservations (well, technically there can only one). > > Don't mince words - what have to spawn the qemu-pr-helper

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

2018-04-16 Thread Michal Privoznik
On 04/14/2018 05:14 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> When attaching a disk that requires pr-manager we might need to >> plug the pr-manager object too. >> >> Signed-off-by: Michal Privoznik >> --- >> src/qemu/qemu_hotplug.c |

Re: [libvirt] [PATCH v4 06/14] qemu_ns: Allow /dev/mapper/control for PR

2018-04-16 Thread Michal Privoznik
On 04/14/2018 02:15 PM, John Ferlan wrote: > > > On 04/10/2018 10:58 AM, Michal Privoznik wrote: >> If qemu-pr-helper is compiled with multipath support the first >> thing it does is opening /dev/mapper/control. Since we're going > > s/opening/open > >> to be running it inside qemu namespace

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

2018-04-16 Thread Michal Privoznik
On 04/14/2018 05:18 PM, John Ferlan wrote: > [...] > >> * >> @@ -411,13 +434,16 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver, >> bool driveAdded = false; >> bool secobjAdded = false; >> bool encobjAdded = false; >> +bool prmgrAdded = false; >> bool prdStarted =

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

2018-04-16 Thread Michal Privoznik
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), we can generate the alias for pr-manager. >> A domain can have up to one managed pr-manager (in which case >>

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

2018-04-16 Thread Michal Privoznik
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 that they are preserved across daemon restarts. >> >> Signed-off-by: Michal Privoznik >>

Re: [libvirt] [libvirt PATCH v2 27/44] Deprecate QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH v2 63/73] qemu: Properly reset migration params when libvirtd restarts

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:53PM +0200, Jiri Denemark wrote: To be able to restore all migration parameters when libvirtd is restarting during an active migration job, we need to store the original values of all parameters (stored in priv->job.migParams) in the status XML. Signed-off-by: Jiri

Re: [libvirt] [libvirt PATCH v2 26/44] Deprecate QEMU_CAPS_DEVICE_SPICEVMC

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > The (now assumed) QEMU_CAPS_CHARDEV_SPICEVMC is preferred. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 4 -- > src/qemu/qemu_capabilities.h | 2 +- >

Re: [libvirt] [PATCH v2 62/73] qemu: Set migration parameters automatically

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 04:41:52PM +0200, Jiri Denemark wrote: Most QEMU migration parameters directly correspond to VIR_MIGRATE_PARAM_* typed parameters and qemuMigrationParamsFromFlags can automatically set them according to a static mapping between libvirt and QEMU parameters. Signed-off-by:

Re: [libvirt] [libvirt PATCH v2 25/44] Deprecate QEMU_CAPS_CHARDEV_SPICEVMC

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > @@ -1346,7 +1342,7 @@ mymain(void) > QEMU_CAPS_DEVICE_CIRRUS_VGA); > DO_TEST("channel-virtio-default", > QEMU_CAPS_SPICE, > -QEMU_CAPS_CHARDEV_SPICEVMC); > +NONE); Don't add NONE here. >

Re: [libvirt] [libvirt PATCH v2 24/44] Deprecate QEMU_CAPS_DRIVE_AIO

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c > index 4b463c33cb..d39b816ec9 100644 > --- a/tests/qemuxml2argvtest.c > +++ b/tests/qemuxml2argvtest.c > @@ -841,7 +841,6 @@ mymain(void) > QEMU_CAPS_KVM, >

Re: [libvirt] [libvirt PATCH v2 23/44] Deprecate QEMU_CAPS_VGA_NONE

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Last use was removed by commit 0586cf98 deprecating > QEMU_CAPS_DEVICE. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h |

Re: [libvirt] [libvirt PATCH v2 22/44] Deprecate QEMU_CAPS_SMBIOS_TYPE

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH 3/3] qemu: don't retry connect() if doing FD passing

2018-04-16 Thread Daniel P . Berrangé
On Mon, Mar 26, 2018 at 09:10:04AM -0400, John Ferlan wrote: > > > On 03/14/2018 01:33 PM, Daniel P. Berrangé wrote: > > Since libvirt called bind() and listen() on the UNIX socket, it is > > guaranteed that connect() will immediately succeed, if QEMU is running > > normally. It will only fail

Re: [libvirt] [libvirt PATCH v2 21/44] Deprecate QEMU_CAPS_NAME_PROCESS

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c

Re: [libvirt] [libvirt PATCH v2 20/44] Deprecate QEMU_CAPS_FSDEV

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c

Re: [libvirt] [libvirt PATCH v2 19/44] Deprecate QEMU_CAPS_BOOT_MENU

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c > index 11f4b86610..7fce1e9b59 100644 > --- a/tests/qemuxml2argvtest.c > +++ b/tests/qemuxml2argvtest.c > @@ -766,24 +766,21 @@ mymain(void) > QEMU_CAPS_ICH9_AHCI); >

Re: [libvirt] [libvirt PATCH v2 18/44] Deprecate QEMU_CAPS_NODEFCONFIG

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > @@ -1349,156 +1305,133 @@ mymain(void) > driver.config->chardevTLS = 0; > VIR_FREE(driver.config->chardevTLSx509certdir); > DO_TEST("serial-many-chardev", > -QEMU_CAPS_DEVICE_ISA_SERIAL, > -

Re: [libvirt] [PATCH 8/9] virobject: Check if @parent is the first member in class

2018-04-16 Thread Daniel P . Berrangé
On Mon, Apr 16, 2018 at 02:30:40PM +0200, Erik Skultety wrote: > On Fri, Apr 13, 2018 at 04:47:15PM +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

Re: [libvirt] [libvirt PATCH v2 17/44] Deprecate QEMU_CAPS_VHOST_NET

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.c | 1 - > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c

Re: [libvirt] [PATCH 8/9] virobject: Check if @parent is the first member in class

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:15PM +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. If a class is missing 'parent' memeber, it's a bug in the

Re: [libvirt] [PATCHv2 4/4] qemu: deny privilege elevation and spawn in seccomp

2018-04-16 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 04:49:42PM +0200, Ján Tomko wrote: > If QEMU uses a seccomp blacklist (since 2.11), -sandbox on > no longer tries to whitelist all the calls, but uses sets > of blacklists: > default (always blacklisted with -sandbox on) > obsolete (defaults to deny) > elevateprivileges

Re: [libvirt] [PATCHv2 3/4] Refactor qemuBuildSeccompSandboxCommandLine

2018-04-16 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 04:49:41PM +0200, Ján Tomko wrote: > Exit early if possible to simplify the logic. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_command.c | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) Reviewed-by: Daniel P. Berrangé

Re: [libvirt] [PATCHv2 2/4] Introduce qemuBuildSeccompSandboxCommandLine

2018-04-16 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 04:49:40PM +0200, Ján Tomko wrote: > Move the building of -sandbox command line into a separate function. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_command.c | 30 +- > 1 file changed, 21 insertions(+), 9

Re: [libvirt] [PATCHv2 1/4] Introduce QEMU_CAPS_SECCOMP_BLACKLIST

2018-04-16 Thread Daniel P . Berrangé
On Tue, Apr 10, 2018 at 04:49:39PM +0200, Ján Tomko wrote: > QEMU commit 1bd6152 changed the default behavior from whitelist > to blacklist and introduced a few sets of system calls. > > Use the 'elevateprivileges' parameter of -sandbox as a witness > of this change. > >

Re: [libvirt] [PATCH 2/2] openvz: Clean up openvzDomainGetHostname

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 12:57:08PM -0400, John Ferlan wrote: Remove the unnecessary goto error followed by goto cleanup processing. Signed-off-by: John Ferlan --- src/openvz/openvz_driver.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Ján

Re: [libvirt] [PATCH 1/2] openvz: Remove unnecessary Unref in openvzLoadDomains

2018-04-16 Thread Ján Tomko
On Wed, Apr 11, 2018 at 12:57:07PM -0400, John Ferlan wrote: Since there is no way to get to cleanup without dom being NULL, this is a unnecessary Unref. Actually, if we could get there it would be a bug, because virDomainObjListAdd does not give us an extra reference, it just leaves the

Re: [libvirt] [PATCH 3/9] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-16 Thread Erik Skultety
On Mon, Apr 16, 2018 at 07:53:42AM -0400, John Ferlan wrote: > > > On 04/13/2018 10:47 AM, Michal Privoznik wrote: > > In next patches this name will be needed for a different memeber. > > s/memeber/member > > > Also, it makes sense to rename the variable because it does not > > contain reference

Re: [libvirt] [PATCH 3/9] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-16 Thread John Ferlan
On 04/13/2018 10:47 AM, Michal Privoznik wrote: > In next patches this name will be needed for a different memeber. s/memeber/member > 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] [libvirt PATCH v2 16/44] Deprecate QEMU_CAPS_RTC_TD_HACK

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 0.12.0. > > Deprecated by QEMU commit 1ed2fc1 included in 0.12.0. > > Signed-off-by: Ján Tomko > --- > src/qemu/qemu_capabilities.h | 2 +- > src/qemu/qemu_command.c | 21 + >

Re: [libvirt] [libvirt PATCH v2 15/44] Deprecate QEMU_CAPS_RTC

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-09 at 17:20 +0200, Ján Tomko wrote: > Implied by QEMU >= 1.2.0. > > Signed-off-by: Ján Tomko Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/2] lxc: Clean up /.oldroot

2018-04-16 Thread Radostin Stoyanov
On 16/04/18 10:33, Daniel P. Berrangé wrote: > On Sun, Apr 15, 2018 at 04:30:11PM +0100, Radostin Stoyanov wrote: >> Remove the /.oldroot directory after it has been unmounted (at the end >> of lxcContainerSetupPivotRoot). Ignore errors silently. >> >> Signed-off-by: Radostin Stoyanov

Re: [libvirt] [dbus PATCH] maint: rename test directory to tests

2018-04-16 Thread Pavel Hrdina
On Mon, Apr 16, 2018 at 01:10:22PM +0200, Pavel Hrdina wrote: > Our ci.centos.org expects the project uses 'tests' name. > > Signed-off-by: Pavel Hrdina > --- I forgot to mention that it's pushed. Pavel signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH 2/8] qemu: introduce vfio-ccw capability

2018-04-16 Thread Shalini Chellathurai Saroja
On 04/12/2018 10:44 AM, Cornelia Huck wrote: On Wed, 11 Apr 2018 17:49:53 +0200 Shalini Chellathurai Saroja wrote: Let us introduce the capability vfio-ccw for supporting the basic channel I/O passthrough, which have been introduced in QEMU 2.10. The current

[libvirt] [dbus PATCH] maint: rename test directory to tests

2018-04-16 Thread Pavel Hrdina
Our ci.centos.org expects the project uses 'tests' name. Signed-off-by: Pavel Hrdina --- .travis.yml | 2 +- Makefile.am | 2 +- configure.ac| 2 +- {test => tests}/Makefile.am | 0 {test => tests}/conftest.py

Re: [libvirt] [RFC v2] external (pull) backup API

2018-04-16 Thread Vladimir Sementsov-Ogievskiy
13.04.2018 23:02, John Snow wrote: On 04/12/2018 10:08 AM, Vladimir Sementsov-Ogievskiy wrote: It's not easier, as we'll have to implement either separate of bitmaps concept of checkpoints, which will be based on bitmaps, and we'll have to negotiate and implement storing these objects to qcow2

Re: [libvirt] [PATCH 6/9] Introduce virNetSASLContextDispose

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:13PM +0200, Michal Privoznik wrote: > Strictly speaking this is not needed right now. However, next > commits will require dispose function to exist. > > Signed-off-by: Michal Privoznik > --- ... > src/rpc/virnetsaslcontext.c | 8 +++- > 1

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

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:16PM +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 > --- > cfg.mk | 8 > 1 file changed, 8

Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: > So far we are repeating the following lines over and over: > > virClassNew(virClassForObject(), > "virSomeObject", > sizeof(virSomeObject), > virSomeObjectDispose); > > While this works,

Re: [libvirt] [PATCH 6/9] Introduce virNetSASLContextDispose

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:13PM +0200, Michal Privoznik wrote: > Strictly speaking this is not needed right now. However, next The first sentence only makes sense in the context of the patch series review, that will not be the case for someone looking at it in the future - plain "Future

Re: [libvirt] [PATCH 7/9] virobject: Introduce VIR_CLASS_NEW() macro

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:14PM +0200, Michal Privoznik wrote: > So far we are repeating the following lines over and over: > > virClassNew(virClassForObject(), > "virSomeObject", > sizeof(virSomeObject), > virSomeObjectDispose); > > While this works,

Re: [libvirt] [PATCH 2/2] lxc: Clean up /.oldroot

2018-04-16 Thread Daniel P . Berrangé
On Sun, Apr 15, 2018 at 04:30:11PM +0100, Radostin Stoyanov wrote: > Remove the /.oldroot directory after it has been unmounted (at the end > of lxcContainerSetupPivotRoot). Ignore errors silently. > > Signed-off-by: Radostin Stoyanov > --- > src/lxc/lxc_container.c | 3

Re: [libvirt] [jenkins-ci PATCH] guests: Only attempt to fix intltool-update if it exists

2018-04-16 Thread Pavel Hrdina
On Mon, Apr 16, 2018 at 10:56:02AM +0200, Andrea Bolognani wrote: > On Mon, 2018-04-16 at 10:43 +0200, Andrea Bolognani wrote: > > On Mon, 2018-04-16 at 10:29 +0200, Pavel Hrdina wrote: > > > We need to probably split kludges task into two separate tasks where > > > one will be executed before

Re: [libvirt] [jenkins-ci PATCH] guests: Only attempt to fix intltool-update if it exists

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-16 at 10:43 +0200, Andrea Bolognani wrote: > On Mon, 2018-04-16 at 10:29 +0200, Pavel Hrdina wrote: > > We need to probably split kludges task into two separate tasks where > > one will be executed before installing project dependencies to fix > > base-os issues and second one

Re: [libvirt] [jenkins-ci PATCH] guests: Add icoutils dependency to virt-viewer project

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-16 at 10:31 +0200, Pavel Hrdina wrote: > On Fri, Apr 13, 2018 at 02:10:08PM +0200, Andrea Bolognani wrote: > > The icotool command is used to manipulate Windows icon files. > > > > Signed-off-by: Andrea Bolognani > > --- > > guests/vars/mappings.yml

Re: [libvirt] [jenkins-ci PATCH] guests: Only attempt to fix intltool-update if it exists

2018-04-16 Thread Andrea Bolognani
On Mon, 2018-04-16 at 10:29 +0200, Pavel Hrdina wrote: > How this will work to fix the FreeBSD installation for the > freshly-provisioned guest? This would require running > './lcitool prepare $guest' and again './lcitool update $guest'. Correct. > We need to probably split kludges task into two

Re: [libvirt] [PATCH 5/9] src: Unify dispose function names

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:12PM +0200, Michal Privoznik wrote: > If a function is disposing virSomething it should be called > virSomethingDispose(). There are two offenders: > virCapabilitiesDispose(virCapsPtr) and > virDomainXMLOptionClassDispose(virDomainXMLOptionPtr). > > Signed-off-by:

Re: [libvirt] [jenkins-ci PATCH] guests: Add icoutils dependency to virt-viewer project

2018-04-16 Thread Pavel Hrdina
On Fri, Apr 13, 2018 at 02:10:08PM +0200, Andrea Bolognani wrote: > The icotool command is used to manipulate Windows icon files. > > Signed-off-by: Andrea Bolognani > --- > guests/vars/mappings.yml | 4 > guests/vars/projects/virt-viewer.yml | 1 + > 2

Re: [libvirt] [jenkins-ci PATCH] guests: Only attempt to fix intltool-update if it exists

2018-04-16 Thread Pavel Hrdina
On Fri, Apr 13, 2018 at 06:52:20PM +0200, Andrea Bolognani wrote: > If we're running against a freshly-provisioned FreeBSD guest, > intltool won't have been installed yet and attempts to fix it > will fail. Make sure the file exists. > > Signed-off-by: Andrea Bolognani > ---

Re: [libvirt] [jenkins-ci PATCH] guests: Set remote_user at the playbook level

2018-04-16 Thread Pavel Hrdina
On Wed, Apr 11, 2018 at 02:36:15PM +0200, Andrea Bolognani wrote: > This is very convenient for developers using the 'test' flavor, > because it ensures > > $ ./lcitool update all > > still works by logging in as root, but at the same time ad-hoc > invocations such as > > $ ansible all -m

Re: [libvirt] [jenkins-ci PATCH v2] guests: Clean up packages after update

2018-04-16 Thread Pavel Hrdina
On Thu, Apr 12, 2018 at 12:13:23PM +0200, Andrea Bolognani wrote: > The package cache can grow to eat up a lot of disk space, and > not removing unused packages can lead to upgrade issues down > the line for fast moving distributions such as Fedora Rawhide. > > Signed-off-by: Andrea Bolognani

Re: [libvirt] [PATCH 1/9] domain_event: s/MetadataCange/MetadataChange/g

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:08PM +0200, Michal Privoznik wrote: > There's a typo in struct name. > > Signed-off-by: Michal Privoznik > --- > src/conf/domain_event.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Erik Skultety

Re: [libvirt] [PATCH 4/9] src: Unify virObject member name

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:11PM +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] [jenkins-ci PATCH] guests: Introduce libvirt+mingw project

2018-04-16 Thread Pavel Hrdina
On Thu, Apr 12, 2018 at 06:06:30PM +0200, Andrea Bolognani wrote: > Instead of cramming the dependencies that we need for a MinGW > build of libvirt along with those we need for a native build, > create a new project for the former. > > Signed-off-by: Andrea Bolognani > ---

Re: [libvirt] [PATCH 2/3] qemu_monitor_json: Build Json CPU Model Info

2018-04-16 Thread Erik Skultety
On Mon, Apr 16, 2018 at 01:06:57AM -0500, Chris Venteicher wrote: > Function qemuMonitorJSONBuildCPUModelInfoJSON builds Json of form > {"model": {"name": "IvyBridge", "props": {}}} > from pointer to qemuMonitorCPUModelInfo. > --- > src/qemu/qemu_monitor_json.c | 49 >

Re: [libvirt] [PATCH 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-16 Thread Erik Skultety
On Mon, Apr 16, 2018 at 01:06:56AM -0500, Chris Venteicher wrote: > New function qemuMonitorJSONBuildCPUModelInfo created by extracting code > from existing function qemuMonitorJSONGetCPUModelExpansion to create a > reusable function for extracting cpu model info from json. > --- >

Re: [libvirt] [PATCH 3/3] qemu_monitor: query-cpu-model-baseline QMP command

2018-04-16 Thread Ján Tomko
On Mon, Apr 16, 2018 at 01:06:58AM -0500, Chris Venteicher wrote: Function qemuMonitorGetCPUModelBaseline exposed to carry out a QMP query-cpu-model-baseline transaction with QEMU. QEMU determines a baseline CPU Model from two input CPU Models to complete the query-cpu-model-baseline

Re: [libvirt] [PATCH 2/9] util: Make structs follow our naming convention

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:09PM +0200, Michal Privoznik wrote: > There are two structs virMacMap and virFDStreamData that don't > have the underscore prefix. Put it there so that they follow the > rest of the code. > > Signed-off-by: Michal Privoznik > --- >

Re: [libvirt] [PATCH 1/3] qemu_monitor_json: Populate CPUModelInfo struct from json

2018-04-16 Thread Ján Tomko
On Mon, Apr 16, 2018 at 01:06:56AM -0500, Chris Venteicher wrote: New function qemuMonitorJSONBuildCPUModelInfo created by extracting code from existing function qemuMonitorJSONGetCPUModelExpansion to create a reusable function for extracting cpu model info from json. ---

Re: [libvirt] [dbus PATCH] tests: Avoid hidding TimeoutError in main loop

2018-04-16 Thread Ján Tomko
On Mon, Apr 16, 2018 at 09:20:30AM +0200, Katerina Koukiou wrote: Currently the error was not propagated from the timeout handler properly, and we had PASSED tests even with timeouts. Signed-off-by: Katerina Koukiou --- test/libvirttest.py | 5 - 1 file changed, 4

Re: [libvirt] [PATCH 3/9] datatypes: Rename @parent to @parentName in virNodeDevice

2018-04-16 Thread Erik Skultety
On Fri, Apr 13, 2018 at 04:47:10PM +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] [PATCHv3 3/6] tests: add qemumonitorjson tests for query-cpus-fast

2018-04-16 Thread Viktor VM Mihajlovski
On 12.04.2018 17:52, John Ferlan wrote: > > > On 04/04/2018 10:45 AM, Viktor Mihajlovski wrote: >> Extended the json monitor test program with support for query-cpus-fast >> and added a sample file set for x86 data obtained using the it. >> Also extend the test program to recognize the halted

  1   2   >