[libvirt] [PATCH 00/22] qemu: Store default CPU in domain XML

2019-10-03 Thread Jiri Denemark
://bugzilla.redhat.com/show_bug.cgi?id=1598151 https://bugzilla.redhat.com/show_bug.cgi?id=1598162 Jiri Denemark (22): conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions qemu

[libvirt] [PATCH 08/22] qemu: Flatten qemuMonitorCPUDefs.cpus

2019-10-03 Thread Jiri Denemark
Let's store qemuMonitorCPUDefInfo directly in the array of CPUs in qemuMonitorCPUDefs rather then using an array of pointers. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 8 src/qemu/qemu_monitor.c | 5 ++--- src/qemu/qemu_monitor.h | 2 +- src/qemu

[libvirt] [PATCH 05/22] qemu: Use virQEMUCapsGetCPUDefinitions more

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index dac3d3b633..255ae8e665 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src

[libvirt] [PATCH 02/22] conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd

2019-10-03 Thread Jiri Denemark
All callers use nameLen == -1 anyway. Signed-off-by: Jiri Denemark --- src/conf/domain_capabilities.c | 7 +++ src/conf/domain_capabilities.h | 1 - src/qemu/qemu_capabilities.c | 2 +- tests/cputest.c| 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git

[libvirt] [PATCH 01/22] conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/conf/domain_capabilities.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 1000d8b969..37e767d5c9 100644 --- a/src/conf/domain_capabilities.c +++ b/src

[libvirt] [PATCH 20/22] qemu: Use VIR_AUTOUNREF in qemuDomainDefPostParse

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b4175a846e..1d7772ee01 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c

[libvirt] [PATCH 15/22] conf: Drop virDomainCapsCPUModelsAddSteal

2019-10-03 Thread Jiri Denemark
Both virDomainCapsCPUModelsAdd and virDomainCapsCPUModelsAddSteal are so simple we can just squash the code in a single function. Signed-off-by: Jiri Denemark --- src/conf/domain_capabilities.c | 33 ++--- src/conf/domain_capabilities.h | 4 src

[libvirt] [PATCH 22/22] qemu: Store default CPU in domain XML

2019-10-03 Thread Jiri Denemark
://bugzilla.redhat.com/show_bug.cgi?id=1598151 https://bugzilla.redhat.com/show_bug.cgi?id=1598162 Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c| 51 +++ .../disk-cache.x86_64-latest.args | 1 + .../disk-cdrom-network.x86_64-latest.args

[libvirt] [PATCH 21/22] conf: Define VIR_AUTOPTR for virCPUDef

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/conf/cpu_conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h index 19ce816ec2..f26f29d9fc 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -151,6 +151,7 @@ virCPUDefFreeModel(virCPUDefPtr def

[libvirt] [PATCH 17/22] qemu: Probe for default CPU types

2019-10-03 Thread Jiri Denemark
QEMU 4.2.0 will report default CPU types used by each machine type and we will want to start using it. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 15 ++- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor.h

[libvirt] [PATCH 14/22] conf: Drop unused virDomainCapsCPUModelsFilter

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/conf/domain_capabilities.c | 33 - src/conf/domain_capabilities.h | 3 --- src/libvirt_private.syms | 1 - 3 files changed, 37 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c

[libvirt] [PATCH 13/22] qemu: Switch qemuCaps to use qemuMonitorCPUDefs

2019-10-03 Thread Jiri Denemark
We will need to keep some QEMU-specific data for each CPU model supported by a QEMU binary. Instead of complicating the generic virDomainCapsCPUModelsPtr, we can just directly store qemuMonitorCPUDefsPtr returned by the capabilities probing code. Signed-off-by: Jiri Denemark --- src/qemu

[libvirt] [PATCH 11/22] qemu: Use VIR_AUTOFREE in virQEMUCapsLoadCPUModels

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 58 +++- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 74920901b3..52a2594bf3 100644 --- a/src/qemu

[libvirt] [PATCH 04/22] qemu: Filter models in virQEMUCapsGetCPUDefinitions

2019-10-03 Thread Jiri Denemark
Some callers of virQEMUCapsGetCPUDefinitions will need to filter the returned list of CPU models. Let's add the filtering parameters directly to virQEMUCapsGetCPUDefinitions to avoid copying the CPU models list twice. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 11

[libvirt] [PATCH 07/22] qemu: Introduce qemuMonitorCPUDefs struct

2019-10-03 Thread Jiri Denemark
It is a container for a CPU models list (qemuMonitorCPUDefInfo) and a number of elements in this list. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 24 ++-- src/qemu/qemu_monitor.c | 39 +++-- src/qemu/qemu_monitor.h | 14

[libvirt] [PATCH 10/22] qemu: Add qemuMonitorCPUDefsCopy

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor.c | 33 + src/qemu/qemu_monitor.h | 2 ++ 2 files changed, 35 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 4442ef6cca..ebd7eaa1a9 100644 --- a/src/qemu/qemu_monitor.c

[libvirt] [PATCH 09/22] build: Export virStringListCopy internal API

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7b681fac64..b8e118db0d 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -3078,6 +3078,7

[libvirt] [PATCH 12/22] qemu: Introduce virQEMUCapsCPUDefsToModels

2019-10-03 Thread Jiri Denemark
The function translates qemuMonitorCPUDefsPtr (used by QEMU caps probing code) into virDomainCapsCPUModelsPtr used by domain capabilities. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 62 +++- 1 file changed, 39 insertions(+), 23 deletions

[libvirt] [PATCH 19/22] qemu: Drop unused virQEMUCapsGetDefaultMachine

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 12 src/qemu/qemu_capabilities.h | 1 - 2 files changed, 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9d5eaf0c1a..51de44260d 100644 --- a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 18/22] qemu: Introduce virQEMUCapsGetMachineDefaultCPU

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 36 src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 39 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 802d3f7e1a..9d5eaf0c1a 100644

[libvirt] [PATCH 03/22] qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions

2019-10-03 Thread Jiri Denemark
will change significantly in the following patches. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c | 23 ++- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 7 +-- tests/cputest.c | 1 - 4 files changed, 24 insertions

Re: [libvirt] [PATCH v5 00/15] CPU Model Baseline and Comparison for s390x

2019-10-02 Thread Jiri Denemark
On Thu, Sep 19, 2019 at 16:24:51 -0400, Collin Walling wrote: > Note: since I've made some changes to a lot of these patches / split > up some patches, I've decided to hold off on adding any r-b's in case > there is a specific change that someone does not agree with. > > Changelog: > > -

Re: [libvirt] [PATCH v5 15/15] qemu_driver: improve comparison/baseline error reporting

2019-10-02 Thread Jiri Denemark
On Thu, Sep 19, 2019 at 16:25:06 -0400, Collin Walling wrote: > Providing an erroneous CPU definition in the XML file provided to the > hypervisor-cpu-compare/baseline command will result in a verbose > internal error. Let's add some sanity checking before executing the QMP > commands to provide a

Re: [libvirt] [PATCH v5 10/15] qemu_driver: expand cpu features after baseline

2019-10-02 Thread Jiri Denemark
; 1 file changed, 14 insertions(+), 1 deletion(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 11/15] qemu_monitor: implement query-cpu-model-comparison

2019-10-02 Thread Jiri Denemark
nrique Barboza > --- > src/qemu/qemu_monitor.c | 14 ++ > src/qemu/qemu_monitor.h | 5 + > src/qemu/qemu_monitor_json.c | 42 ++ > src/qemu/qemu_monitor_json.h | 6 ++ > 4 files changed, 67 insertions(+) Revie

Re: [libvirt] [PATCH v5 14/15] qemu_driver: hook up query-cpu-model-comparison

2019-10-02 Thread Jiri Denemark
hvCPU, cpu, failIncompatible); > } else { > virReportError(VIR_ERR_OPERATION_UNSUPPORTED, > _("comparing with the hypervisor CPU is not supported > " > @@ -13758,6 +13809,7 @@ qemuConnectCompareHypervisorCPU(virConnectPtr conn,

Re: [libvirt] [PATCH v5 13/15] cpu_conf: xml to cpu definition parse helper

2019-10-02 Thread Jiri Denemark
> Reviewed-by: Daniel Henrique Barboza > --- > src/conf/cpu_conf.c | 29 + > src/conf/cpu_conf.h | 5 + > src/cpu/cpu.c| 14 +- > src/libvirt_private.syms | 1 + > 4 files changed, 36 insertions(+), 13 deletions(

Re: [libvirt] [PATCH v5 09/15] qemu_driver: hook up query-cpu-model-baseline

2019-10-02 Thread Jiri Denemark
cleanup; > + > +} else if (ARCH_IS_S390(arch) && > + virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_BASELINE)) > { > + > +if (!(cpu = qemuConnectCPUModelBaseline(qemuCaps, cfg->libDir, > + cfg->user,

Re: [libvirt] [PATCH v5 07/15] qemu_monitor: implement query-cpu-model-baseline

2019-10-02 Thread Jiri Denemark
tor.h | 5 + > src/qemu/qemu_monitor_json.c | 42 ++ > src/qemu/qemu_monitor_json.h | 6 ++ > 4 files changed, 67 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 03/15] qemu_monitor: use cpu def instead of char for expansion

2019-10-02 Thread Jiri Denemark
mu_monitor.c | 7 +++ > src/qemu/qemu_monitor.h | 2 +- > src/qemu/qemu_monitor_json.c | 8 > src/qemu/qemu_monitor_json.h | 2 +- > tests/cputest.c | 7 ++- > 6 files changed, 22 insertions(+), 13 deletions(-) Reviewed-by: Jiri Denemark -- li

Re: [libvirt] [PATCH v5 06/15] qemu_monitor: make qemuMonitorJSONParseCPUModelData command-agnostic

2019-10-02 Thread Jiri Denemark
t; 1 file changed, 8 insertions(+), 7 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 05/15] qemu_monitor: allow cpu props to be optional

2019-10-02 Thread Jiri Denemark
test.c | 6 +- > 6 files changed, 35 insertions(+), 13 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 02/15] qemu_monitor: expansion cleanups

2019-10-02 Thread Jiri Denemark
; 1 file changed, 14 insertions(+), 23 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 04/15] qemu_monitor: add features to CPU model for QMP command

2019-10-02 Thread Jiri Denemark
+- > 1 file changed, 25 insertions(+), 5 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v5 01/15] qemu_monitor: refactor cpu model expansion

2019-10-02 Thread Jiri Denemark
l Henrique Barboza > --- > src/qemu/qemu_monitor_json.c | 143 > --- > 1 file changed, 94 insertions(+), 49 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model

2019-09-30 Thread Jiri Denemark
On Mon, Sep 30, 2019 at 17:16:27 +0200, Paolo Bonzini wrote: > On 30/09/19 16:31, Hu, Robert wrote: > >> This might be a problem if there are plans to eventually make KVM support > >> pconfig, though. Paolo, Robert, are there plans to support pconfig in KVM > >> in the > >> future? > > [Robert

Re: [libvirt] [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model

2019-09-30 Thread Jiri Denemark
On Thu, Sep 26, 2019 at 18:43:05 -0300, Eduardo Habkost wrote: > The pconfig feature never worked, and adding "pconfig=off" to the > QEMU command-line triggers a regression in QEMU 3.1.1 and 4.0.0. > > Signed-off-by: Eduardo Habkost > --- > I'm sending this as an RFC because I couldn't test it

Re: [libvirt] [PATCH 1/9] DO NOT PUSH: tests: add qemu capabilities data for qemu 4.2

2019-09-26 Thread Jiri Denemark
es > create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml Please push this (ideally with an update to domaincapstest). I need the 4.2 data for my series which I'm going to send soon. Thanks. Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https:

Re: [libvirt] [PATCH] qemu: fix operation job association when qemuCaps is NULL.

2019-09-23 Thread Jiri Denemark
On Sat, Sep 21, 2019 at 13:55:22 -0300, jcfara...@gmail.com wrote: > From: Julio Faracco > > Function qemuMigrationEatCookie() calls > qemuMigrationCookieXMLParseStr(), when qemuCaps is not set, function > assumes priv as a NULL pointer. At the end, function tries to set > job info operation to

Re: [libvirt] [PATCH 0/8] qemu: monitor: Clean up some more HMP cruft

2019-09-19 Thread Jiri Denemark
| 13 +-- > src/qemu/qemu_monitor_json.c | 104 +++- > src/qemu/qemu_monitor_json.h | 13 +-- > src/qemu/qemu_monitor_text.c | 39 +++- > tests/qemumonitortestutils.c | 6 +- > 6 files changed, 32 insertions(+), 321 deletions(-) Nice. Reviewed-by: Jiri D

Re: [libvirt] [PATCH 9/9] conf: secret: Refactor cleanup in secretXMLParseNode

2019-09-18 Thread Jiri Denemark
s(+), 20 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 8/9] conf: secret: Register VIR_AUTOPTR function for virSecretDef

2019-09-18 Thread Jiri Denemark
*xml); > virSecretDefPtr virSecretDefParseFile(const char *filename); > char *virSecretDefFormat(const virSecretDef *def); Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 7/9] conf: domain: Refactor cleanup in virDomainDefParseNode

2019-09-18 Thread Jiri Denemark
On Mon, Sep 16, 2019 at 14:17:10 +0200, Peter Krempa wrote: > Use VIR_AUTOPTR for temporary locals and get rid of the cleanup label. > > Signed-off-by: Peter Krempa > --- > src/conf/domain_conf.c | 20 +++- > 1 file changed, 7 insertions(+), 13 deletions(-)

Re: [libvirt] [PATCH 6/9] conf: domain: Register VIR_AUTOPTR function for virDomainDef

2019-09-18 Thread Jiri Denemark
On Mon, Sep 16, 2019 at 14:17:09 +0200, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > src/conf/domain_conf.h | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 5/9] conf: Use VIR_AUTOPTR for xmlDoc and xmlXPath objects

2019-09-18 Thread Jiri Denemark
-- > 2 files changed, 12 insertions(+), 24 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 4/9] conf: Use automatic pointers for xmlXPathContext

2019-09-18 Thread Jiri Denemark
+ > 8 files changed, 35 insertions(+), 76 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/9] conf: Refactor resource cleanup in virDomainDeviceDefParse

2019-09-18 Thread Jiri Denemark
s(+), 40 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 2/9] conf: network: Use VIR_AUTOPTR in virNetworkDefUpdateSection

2019-09-18 Thread Jiri Denemark
mand, parentIndex, ctxt, > flags); > +return virNetworkDefUpdateDNSSrv(def, command, parentIndex, ctxt, > flags); > break; > default: > virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", > @@ -3698,8 +3697,5 @@ virNetworkDefUpdateSection(virNetworkDefPtr def, > break; > } > > - cleanup: > -xmlFreeDoc(doc); > -xmlXPathFreeContext(ctxt); > -return ret; > +return -1; > } Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/9] util: xml: Add wrapper for xmlXPathNewContext

2019-09-18 Thread Jiri Denemark
+ > src/qemu/qemu_capabilities.c | 4 +--- > src/util/virxml.c| 20 > src/util/virxml.h| 3 +++ > src/vbox/vbox_snapshot_conf.c| 17 - > src/vz/vz_sdk.c | 6 ++ > 18 files changed, 4

Re: [libvirt] [PATCH v4 0/2] snapshot: Store both config and live XML in the

2019-09-11 Thread Jiri Denemark
On Thu, Aug 29, 2019 at 17:55:41 -0300, Maxiwell S. Garcia wrote: > This patchset store both config and live XML in the snapshot XML. > To avoid nest 'config' XML one level deeper ('inactive/domain'), > it was necessary to create a function that has a new rootname parameter. > > V4: > - Create a

Re: [libvirt] [PATCH v4 0/8] CPU Model Baseline and Comparison for s390x

2019-09-10 Thread Jiri Denemark
On Tue, Sep 03, 2019 at 15:32:34 -0400, Collin Walling wrote: > On 8/20/19 10:06 AM, Jiri Denemark wrote: > > First, let me apologize for such a late review. I'll try my best to > > review your series earlier next time. > > > > Your review is greatly appreciated! I ha

[libvirt] [PATCH v5 2/2] snapshot: Store both config and live XML in the snapshot domain

2019-09-10 Thread Jiri Denemark
ive domain with the entry. So, the in the snapshot XML is not required to snapshot work, but it's useful to preserve the config XML of running guests. Signed-off-by: Maxiwell S. Garcia Reviewed-by: Daniel Henrique Barboza Tested-by: Daniel Henrique Barboza Reviewed-by: Jiri Denemark --- src/conf/mom

Re: [libvirt] [PATCH v4 2/2] snapshot: Store both config and live XML in the snapshot domain

2019-09-10 Thread Jiri Denemark
cessEndJob(driver, vm); > goto cleanup; > } > -if (config) > -virDomainObjAssignDef(vm, config, false, NULL); > +if (inactiveConfig) > + virDomainObjAssignDef(vm, inactiveConfig, false, NULL); This should be ok since we are

[libvirt] [PATCH] qemu: Don't leak domain def when RevertToSnapshot fails

2019-09-10 Thread Jiri Denemark
Once we copy the domain definition from virDomainSnapshotDef, we either need to assign it to the domain object or free it to avoid memory leaks. Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/qemu

Re: [libvirt] [PATCH v4 1/2] qemu: formatting XML from domain def choosing the root name

2019-09-10 Thread Jiri Denemark
; > +int virDomainDefFormatInternalSetRootName(virDomainDefPtr def, > + virCapsPtr caps, > + unsigned int flags, > + virBufferPtr buf, > + virDomainXMLOptionPtr xmlopt, > + const char *rootname); > > int virDomainDiskSourceFormat(virBufferPtr buf, >virStorageSourcePtr src, With the two problematic hunks removed Reviewed-by: Jiri Denemark I'll push this once the patches moving the check for "domain" root element are acked. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH 1/2] conf: Add cleanup label to virDomainDefParse

2019-09-10 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/conf/domain_conf.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 7f49c8253f..17ddebb575 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21517,16

[libvirt] [PATCH 0/2] conf: Avoid checking root element name in virDomainDefParseNode

2019-09-10 Thread Jiri Denemark
The only caller for which this check makes sense is virDomainDefParse. Thus the check should be moved there. Jiri Denemark (2): conf: Add cleanup label to virDomainDefParse conf: Avoid checking root element name in virDomainDefParseNode src/conf/domain_conf.c | 29

[libvirt] [PATCH 2/2] conf: Avoid checking root element name in virDomainDefParseNode

2019-09-10 Thread Jiri Denemark
The only caller for which this check makes sense is virDomainDefParse. Thus the check should be moved there. Signed-off-by: Jiri Denemark --- src/conf/domain_conf.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf

[libvirt] [PATCH] qemu: Fix qemuDomainObjTaint with virtlogd

2019-09-05 Thread Jiri Denemark
: virNetClientProgramDispatchError:172 : Cannot open log file: '/var/log/libvirt/qemu/blaf.log': Device or resource busy The fix is easy, we just need to use the right API for appending a message to QEMU log file instead of creating a new log context. Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 30

[libvirt] [PATCH 1/2] virsh: Rename --precopy-bandwidth migration option

2019-09-02 Thread Jiri Denemark
The (pre-copy) bandwidth was historically the only bandwidth we supported and thus it is called just "bandwidth" in all other places. E.g., virsh migrate-setspeed or in the migration typed parameter name. Let's make the new option for virsh migrate consistent. Signed-off-by: Jir

[libvirt] [PATCH 2/2] news: Rename --precopy-bandwidth migration option

2019-09-02 Thread Jiri Denemark
The (pre-copy) bandwidth was historically the only bandwidth we supported and thus it is called just "bandwidth" in all other places. E.g., virsh migrate-setspeed or in the migration typed parameter name. Let's make the new option for virsh migrate consistent. Signed-off-by: Jir

[libvirt] [PATCH for 5.7.0 0/2] virsh: Rename --precopy-bandwidth migration option

2019-09-02 Thread Jiri Denemark
The (pre-copy) bandwidth was historically the only bandwidth we supported and thus it is called just "bandwidth" in all other places. E.g., virsh migrate-setspeed or in the migration typed parameter name. Let's make the new option for virsh migrate consistent. Jiri Denemark (2): vir

Re: [libvirt] [PATCH v3 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Jiri Denemark
; > Signed-off-by: Michal Privoznik > --- > > diff to v2: > - Jirka's suggestions worked in. > > src/security/security_util.c| 194 +++- > tests/qemusecuritymock.c| 12 ++ > tools/libvirt_recover_xattrs.sh | 2 +- > 3 f

Re: [libvirt] [PATCH v2 1/2] util: Introduce virhostuptime

2019-08-22 Thread Jiri Denemark
src/util/virhostuptime.c | 81 > src/util/virhostuptime.h | 27 ++ > 5 files changed, 115 insertions(+) > create mode 100644 src/util/virhostuptime.c > create mode 100644 src/util/virhostuptime.h Reviewed-by: Jiri Denemark --

Re: [libvirt] [PATCH v2 2/2] security_util: Remove stale XATTRs

2019-08-22 Thread Jiri Denemark
On Thu, Aug 22, 2019 at 13:15:33 +0200, Michal Privoznik wrote: > It may happen that we leave some XATTRs behind. For instance, on > a sudden power loss, the host just shuts down without calling > restore on domain paths. This creates a problem, because when the > host starts up again, the XATTRs

Re: [libvirt] [PATCH 5/5] security_util: Remove stale XATTRs

2019-08-21 Thread Jiri Denemark
On Wed, Aug 14, 2019 at 16:33:23 +0200, Michal Privoznik wrote: > It may happen that we leave some XATTRs behind. For instance, on > a sudden power loss, the host just shuts down without calling > restore on domain paths. This creates a problem, because when the > host starts up again, the XATTRs

Re: [libvirt] [PATCH 4/5] util: Introduce virhostuptime

2019-08-21 Thread Jiri Denemark
On Wed, Aug 14, 2019 at 16:33:22 +0200, Michal Privoznik wrote: > This module contains function to get host boot time. > > Signed-off-by: Michal Privoznik > --- > src/libvirt_private.syms | 4 +++ > src/util/Makefile.inc.am | 2 ++ > src/util/virhostuptime.c | 61

Re: [libvirt] [PATCH 3/5] security_util: Document virSecurityMoveRememberedLabel

2019-08-21 Thread Jiri Denemark
On Wed, Aug 14, 2019 at 16:33:21 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/security/security_util.c | 13 + > 1 file changed, 13 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://ww

Re: [libvirt] [PATCH 2/5] security_util: Use more VIR_AUTOFREE()

2019-08-21 Thread Jiri Denemark
On Wed, Aug 14, 2019 at 16:33:20 +0200, Michal Privoznik wrote: > Signed-off-by: Michal Privoznik > --- > src/security/security_util.c | 78 +++- > 1 file changed, 32 insertions(+), 46 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing

Re: [libvirt] [PATCH 1/5] virUUIDFormat: s/VIR_UUID_RAW_LEN/VIR_UUID_BUFLEN/ in comment

2019-08-21 Thread Jiri Denemark
re the raw UUID > * @uuidstr: array of VIR_UUID_STRING_BUFLEN bytes to store the > * string representation of the UUID in. The resulting string > * will be NULL terminated. Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v3 1/2] qemu: formatting XML from domain def choosing the root name

2019-08-21 Thread Jiri Denemark
On Wed, Aug 14, 2019 at 11:47:21 -0300, Maxiwell S. Garcia wrote: > The function virDomainDefFormatInternal() has the predefined root name > "domain" to format the XML. But to save both active and inactive domain > in the snapshot XML, the new root name "inactiveDomain" was created. > So, this

Re: [libvirt] [PATCH] xml: namespaces: use uri instead of href

2019-08-21 Thread Jiri Denemark
On Wed, Aug 21, 2019 at 10:37:33 +0200, Ján Tomko wrote: > Store the namespace URI as const char*, instead of in a function. > > Suggested-by: Jiri Denemark > Signed-off-by: Ján Tomko > --- > src/bhyve/bhyve_domain.c | 11 ++- > src/lxc/lxc_domai

Re: [libvirt] [PATCH 00/21] conf: namespaces: remove some copy'n'paste

2019-08-21 Thread Jiri Denemark
I'd like to see one more patch added to this series which would change virXMLNamespace.href from a function pointer into a const char *. And you could even call it uri instead of href :-) Nice cleanup. Jirka -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 21/21] conf: domain: use virXMLNamespaceRegister

2019-08-21 Thread Jiri Denemark
| 9 - > 5 files changed, 2 insertions(+), 34 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 20/21] conf: storage: use virXMLNamespaceRegister

2019-08-21 Thread Jiri Denemark
s(+), 18 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 19/21] conf: network: use virXMLNamespaceRegister

2019-08-21 Thread Jiri Denemark
On Wed, Aug 21, 2019 at 01:15:41 +0200, Ján Tomko wrote: > Signed-off-by: Ján Tomko > --- > src/conf/network_conf.c | 2 ++ > src/network/bridge_driver.c | 10 -- > 2 files changed, 2 insertions(+), 10 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mail

Re: [libvirt] [PATCH 18/21] util: xml: introduce virXMLNamespaceRegister

2019-08-21 Thread Jiri Denemark
(xmlXPathRegisterNs(ctxt, > + BAD_CAST ns->prefix, > + BAD_CAST ns->href()) < 0) { > +virReportError(VIR_ERR_INTERNAL_ERROR, > + _("Failed to register xml namespace '%s'"), > + ns->href()); > +return -1; > +} > + > +return 0; > +} Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 16/21] conf: storage: use virXMLNamespaceFormatNS

2019-08-21 Thread Jiri Denemark
ot; if (def->namespaceData && def->ns.href) def->ns.format? > -virBufferAsprintf(buf, " %s", (def->ns.href)()); > +virXMLNamespaceFormatNS(buf, >ns); > virBufferAddLit(buf, ">\n"); > virBufferAdjustIndent(bu

Re: [libvirt] [PATCH 15/21] conf: network: use virXMLNamespaceFormatNS

2019-08-21 Thread Jiri Denemark
IVE) && (def->connections > 0)) > virBufferAsprintf(buf, " connections='%d'", def->connections); > if (def->ipv6nogw) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 14/21] util: introduce virXMLNamespaceFormatNS

2019-08-21 Thread Jiri Denemark
->node = save->node; > } > + Two empty lines between functions, please. > +void > +virXMLNamespaceFormatNS(virBufferPtr buf, > +virXMLNamespace const *ns) > +{ > +virBufferAsprintf(buf, " xmlns:%s='%s'", ns->prefix, ns->hre

Re: [libvirt] [PATCH 12/21] conf: storage: store namespace prefix

2019-08-21 Thread Jiri Denemark
On Wed, Aug 21, 2019 at 01:15:34 +0200, Ján Tomko wrote: > Signed-off-by: Ján Tomko > --- > src/storage/storage_backend_fs.c | 1 + > src/storage/storage_backend_rbd.c | 1 + > 2 files changed, 2 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-

Re: [libvirt] [PATCH 11/21] conf: domain: store namespace prefix

2019-08-21 Thread Jiri Denemark
es changed, 5 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 13/21] conf: test: store namespace href

2019-08-21 Thread Jiri Denemark
c/test/test_driver.c | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 17/21] conf: domain: use virXMLNamespaceFormatNS

2019-08-21 Thread Jiri Denemark
\n"); > virBufferAdjustIndent(buf, 2); > I see the reason for the change in 3/21 now. But I think the change should be squashed in this patch as it doesn't make a lot of sense when isolated. Unless you explain that def->ns.href is never NULL there... Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 10/21] conf: network: store namespace prefix

2019-08-21 Thread Jiri Denemark
aceFormatXML, > +.prefix = "dnsmasq", > .href = networkDnsmasqDefNamespaceHref, > }; Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 04/21] conf: ns.parse: decouple call from condition

2019-08-21 Thread Jiri Denemark
.c | 7 --- > src/conf/storage_conf.c | 7 --- > 3 files changed, 12 insertions(+), 9 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 09/21] xml: virXMLNamespace: add prefix

2019-08-21 Thread Jiri Denemark
; virXMLNamespaceParse parse; > virXMLNamespaceFree free; > virXMLNamespaceFormat format; > +const char *prefix; > virXMLNamespaceHref href; > }; > typedef struct _virXMLNamespace virXMLNamespace; Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 07/21] conf: storage: use generic XML namespace types

2019-08-21 Thread Jiri Denemark
conf.h | 23 --- > src/storage/storage_backend_fs.c | 2 +- > src/storage/storage_backend_rbd.c | 2 +- > src/storage/storage_util.c| 2 +- > src/storage/storage_util.h| 2 +- > 6 files changed, 10 insertions(+), 25 deletions(-) Reviewed-by: Jiri Denemark

Re: [libvirt] [PATCH 05/21] util: introduce virXMLNamespace

2019-08-21 Thread Jiri Denemark
XMLNamespace { > +virXMLNamespaceParse parse; > +virXMLNamespaceFree free; > +virXMLNamespaceFormat format; > +virXMLNamespaceHref href; > +}; > +typedef struct _virXMLNamespace virXMLNamespace; > +typedef virXMLNamespace *virXMLNamespacePtr; Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 08/21] conf: domain: use generic XML namespace types

2019-08-21 Thread Jiri Denemark
_domain.h | 2 +- > src/test/test_driver.c | 2 +- > src/vmx/vmx.c| 2 +- > 12 files changed, 14 insertions(+), 29 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 06/21] conf: network: use generic XML namespace types

2019-08-21 Thread Jiri Denemark
-- > src/network/bridge_driver.c | 2 +- > src/network/bridge_driver.h | 2 +- > 4 files changed, 7 insertions(+), 24 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 03/21] prepare: domain format if format not href

2019-08-21 Thread Jiri Denemark
On Wed, Aug 21, 2019 at 01:15:25 +0200, Ján Tomko wrote: > --- > src/conf/domain_conf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 1f2a91c710..f848483235 100644 > --- a/src/conf/domain_conf.c > +++

Re: [libvirt] [PATCH 01/21] virDomainDefNamespaceParse: remove unused attributes

2019-08-21 Thread Jiri Denemark
| 3 +-- > src/conf/domain_conf.c | 4 ++-- > src/lxc/lxc_domain.c | 4 +--- > src/qemu/qemu_domain.c | 4 +--- > src/test/test_driver.c | 4 +--- > 6 files changed, 7 insertions(+), 16 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redha

Re: [libvirt] [PATCH 02/21] virDomainDefParseXML: remove unused parameter

2019-08-21 Thread Jiri Denemark
On Wed, Aug 21, 2019 at 01:15:24 +0200, Ján Tomko wrote: > We do not need to pass the root node, since it's already > included in the XPathContext. > > Signed-off-by: Ján Tomko > --- > src/conf/domain_conf.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(

Re: [libvirt] [PATCH 0/2] cgroups v2 fixes

2019-08-20 Thread Jiri Denemark
20 +++- > 1 file changed, 11 insertions(+), 9 deletions(-) Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH v4 8/8] qemu_driver: hook up query-cpu-model-comparison

2019-08-20 Thread Jiri Denemark
On Wed, Jul 17, 2019 at 10:03:29 -0400, Collin Walling wrote: > This command is hooked into the virsh hypervisor-cpu-compare command. > As such, the CPU model XML provided to the command will be compared > to the hypervisor CPU contained in the QEMU capabilities file for the > appropriate QEMU

Re: [libvirt] [PATCH v4 7/8] cpu_conf: xml to cpu definition parse helper

2019-08-20 Thread Jiri Denemark
On Wed, Jul 17, 2019 at 10:03:28 -0400, Collin Walling wrote: > Implement an XML to virCPUDefPtr helper that handles > the ctxt prerequisite for virCPUDefParseXML. > > This does not alter any functionality. > > Signed-off-by: Collin Walling > Reviewed-by: Bjoern Walk > Reviewed-by: Daniel

Re: [libvirt] [PATCH v4 6/8] qemu_capabilities: introduce QEMU_CAPS_QUERY_CPU_MODEL_COMPARISON

2019-08-20 Thread Jiri Denemark
caps_2.8.0.s390x.xml | 1 + > tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml | 1 + > tests/qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 + > tests/qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 + > 9 files changed, 10 insertions(+) Reviewed-by: Jiri Denemark -- libvir-list mailing li

Re: [libvirt] [PATCH v4 5/8] qemu_monitor: implement query-cpu-model-comparison

2019-08-20 Thread Jiri Denemark
On Wed, Jul 17, 2019 at 10:03:26 -0400, Collin Walling wrote: > Interfaces with QEMU to compare 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 issued > via QMP, a result is

Re: [libvirt] [PATCH v4 0/8] CPU Model Baseline and Comparison for s390x

2019-08-20 Thread Jiri Denemark
First, let me apologize for such a late review. I'll try my best to review your series earlier next time. On Wed, Jul 17, 2019 at 10:03:21 -0400, Collin Walling wrote: > When baselining CPU models and the user appends the --features argument > to the command, s390x will only report back features

<    9   10   11   12   13   14   15   16   17   18   >