Re: [libvirt] Some questions about live migration

2019-10-18 Thread Jiri Denemark
On Fri, Oct 18, 2019 at 15:00:19 +0800, Luyao Zhong wrote: > Hi libvirt experts, > > I have some questions about live migration. I'm assuming you are not asking about post-copy migration, since it is a bit more complicated as the current state if split between the source and destination hosts

Re: [libvirt] [PATCH v4 5/5] qemu_driver: use g_strdup_printf

2019-10-17 Thread Jiri Denemark
On Thu, Oct 17, 2019 at 09:04:05 -0400, Cole Robinson wrote: > On 10/16/19 4:54 PM, Daniel Henrique Barboza wrote: > > This patch changes all virAsprintf calls to use the GLib API > > g_strdup_printf in qemu_driver.c > > > > Signed-off-by: Daniel Henrique Barboza > > --- > >

Re: [libvirt] [PATCH v2 11/31] qemu: Flatten qemuMonitorCPUDefs.cpus

2019-10-16 Thread Jiri Denemark
On Wed, Oct 16, 2019 at 13:15:19 +0200, Ján Tomko wrote: > On Tue, Oct 15, 2019 at 05:34:47PM +0200, Jiri Denemark wrote: > >Let's store qemuMonitorCPUDefInfo directly in the array of CPUs in > >qemuMonitorCPUDefs rather then using an array of pointers. > > > >S

[libvirt] [PATCH v2 30/31] qemuxml2*test: Add test cases for default CPU models on x86_64

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch ...-default-cpu-kvm-pc-4.2.x86_64-latest.args | 36 +++ .../x86_64-default-cpu-kvm-pc-4.2.xml | 24 ...default-cpu-kvm-q35-4.2.x86_64-latest.args | 41 + .../x86_64-default-cpu-kvm-q35

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

2019-10-15 Thread Jiri Denemark
When starting a domain without a CPU model specified in the domain XML, QEMU will choose a default one. Which is fine unless the domain gets migrated to another host because libvirt doesn't perform any CPU ABI checks and the virtual CPU provided by QEMU on the destination host can differ from the

[libvirt] [PATCH v2 26/31] conf: Define VIR_AUTOPTR for virCPUDef

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change 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 30904fab95..230e75f077 100644 --- a/src/conf/cpu_conf.h +++ b/src/conf/cpu_conf.h @@ -151,6 +151,7

[libvirt] [PATCH v2 29/31] qemuxml2*test: Add test cases for default CPU models on s390x

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch ...t-cpu-kvm-ccw-virtio-4.2.s390x-latest.args | 31 +++ .../s390-default-cpu-kvm-ccw-virtio-4.2.xml | 16 ++ ...t-cpu-tcg-ccw-virtio-4.2.s390x-latest.args | 31 +++ .../s390-default

[libvirt] [PATCH v2 23/31] qemu: Introduce virQEMUCapsGetMachineDefaultCPU

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - fix crash with CPUs without type 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

[libvirt] [PATCH v2 24/31] qemu: Drop unused virQEMUCapsGetDefaultMachine

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change 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 dd7ea9ae86..bd54c1751c

[libvirt] [PATCH v2 15/31] qemu: Introduce virQEMUCapsCPUDefsToModels

2019-10-15 Thread Jiri Denemark
The function translates qemuMonitorCPUDefsPtr (used by QEMU caps probing code) into virDomainCapsCPUModelsPtr used by domain capabilities. Signed-off-by: Jiri Denemark --- Notes: Version 2: - trivial rebase src/qemu/qemu_capabilities.c | 71 +--- 1 file

[libvirt] [PATCH v2 04/31] conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd

2019-10-15 Thread Jiri Denemark
All callers use nameLen == -1 anyway. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/conf/domain_capabilities.c | 7 +++ src/conf/domain_capabilities.h | 1 - src/qemu/qemu_capabilities.c | 2 +- tests/cputest.c| 4

[libvirt] [PATCH v2 14/31] qemu: Use VIR_AUTOFREE in virQEMUCapsLoadCPUModels

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change 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

[libvirt] [PATCH v2 10/31] qemu: Introduce qemuMonitorCPUDefs struct

2019-10-15 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 Reviewed-by: Ján Tomko --- Notes: Version 2: - v1 reviewed by Ján Tomko, but the patch had to be changed because of the previous patch src/qemu

[libvirt] [PATCH v2 06/31] qemu: Filter models in virQEMUCapsGetCPUDefinitions

2019-10-15 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 Reviewed-by: Ján Tomko --- Notes: Version 2

[libvirt] [PATCH v2 11/31] qemu: Flatten qemuMonitorCPUDefs.cpus

2019-10-15 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 Reviewed-by: Ján Tomko --- Notes: Version 2: - trivial rebase src/qemu/qemu_capabilities.c | 14 +++--- src/qemu

[libvirt] [PATCH v2 28/31] qemuxml2*test: Add test cases for default CPU models on ppc64

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch ...ault-cpu-kvm-pseries-2.7.ppc64-latest.args | 38 .../ppc64-default-cpu-kvm-pseries-2.7.xml | 22 + ...ault-cpu-kvm-pseries-3.1.ppc64-latest.args | 38 .../ppc64-default-cpu

[libvirt] [PATCH v2 19/31] conf: Drop unused virDomainCapsCPUModelsFilter

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change 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

[libvirt] [PATCH v2 27/31] qemuxml2*test: Add test cases for default CPU models on aarch64

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch ...fault-cpu-kvm-virt-4.2.aarch64-latest.args | 38 +++ .../aarch64-default-cpu-kvm-virt-4.2.xml | 20 ++ ...fault-cpu-tcg-virt-4.2.aarch64-latest.args | 38 +++ .../aarch64

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

2019-10-15 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 --- Notes: Version 2: - no change except for updated test results src/qemu/qemu_capabilities.c | 15 ++- src/qemu/qemu_monitor.c

[libvirt] [PATCH v2 08/31] qemu: Use VIR_AUTOPTR in qemuMonitorJSONGetCPUDefinitions

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/qemu/qemu_monitor_json.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index d3447dd2f3..418bdcec92 100644

[libvirt] [PATCH v2 25/31] qemu: Use VIR_AUTOUNREF in qemuDomainDefPostParse

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change 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 c638077aa8..9dcba4ef38

[libvirt] [PATCH v2 21/31] qemu: Store typename from query-cpu-definitions in qemuCaps

2019-10-15 Thread Jiri Denemark
We need to create a mapping between CPU model names and their corresponding QOM types. Signed-off-by: Jiri Denemark --- Notes: Version 2: - ignore empty typename strings src/qemu/qemu_capabilities.c | 3 + src/qemu/qemu_monitor.c | 2 + src

[libvirt] [PATCH v2 20/31] conf: Drop virDomainCapsCPUModelsAddSteal

2019-10-15 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 --- Notes: Version 2: - no change src/conf/domain_capabilities.c | 33 ++--- src/conf

[libvirt] [PATCH v2 18/31] qemu: Switch qemuCaps to use qemuMonitorCPUDefs

2019-10-15 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 --- Notes

[libvirt] [PATCH v2 07/31] qemu: Use virQEMUCapsGetCPUDefinitions more

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change 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 e6a7ee4f14

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

2019-10-15 Thread Jiri Denemark
-type Jiri Denemark (31): tests: Add capabilities for QEMU 4.2.0 on s390x domcapstest: Add test case for QEMU 4.2.0 on s390x conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions

[libvirt] [PATCH v2 13/31] qemu: Add qemuMonitorCPUDefsCopy

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change 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 87a9d06d45..8d86112f30

[libvirt] [PATCH v2 09/31] qemu: Change return type of virQEMUCapsFetchCPUDefinitions

2019-10-15 Thread Jiri Denemark
. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch src/qemu/qemu_capabilities.c | 34 +- src/qemu/qemu_capabilities.h | 5 +++-- src/qemu/qemu_process.c | 17 ++--- 3 files changed, 34 insertions(+), 22 deletions(-) diff

[libvirt] [PATCH v2 16/31] qemu: Rename virQEMUCaps{Get, Fetch}CPUDefinitions

2019-10-15 Thread Jiri Denemark
The functions return virDomainCapsCPUModelsPtr and thus they should be called *CPUModels for consistency. Functions called *CPUDefinitions will work on qemuMonitorCPUDefsPtr. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch src/qemu/qemu_capabilities.c | 28

[libvirt] [PATCH v2 17/31] qemu: Split virQEMUCapsFetchCPUModels

2019-10-15 Thread Jiri Denemark
Most of the code moved to a new virQEMUCapsFetchCPUDefinitions function and the existing virQEMUCapsFetchCPUModels just becomes a small wrapper around virQEMUCapsFetchCPUDefinitions and virQEMUCapsCPUDefsToModels. Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch src/qemu

[libvirt] [PATCH v2 01/31] tests: Add capabilities for QEMU 4.2.0 on s390x

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch .../caps_4.2.0.s390x.replies | 22414 .../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 3345 +++ 2 files changed, 25759 insertions(+) create mode 100644 tests/qemucapabilitiesdata

[libvirt] [PATCH v2 12/31] build: Export virStringListCopy internal API

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change src/libvirt_private.syms | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 7d62df8086..1af18b880b 100644 --- a/src/libvirt_private.syms +++ b/src

[libvirt] [PATCH v2 05/31] qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions

2019-10-15 Thread Jiri Denemark
will change significantly in the following patches. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change src/qemu/qemu_capabilities.c | 23 ++- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 7 +-- tests

[libvirt] [PATCH v2 03/31] conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change 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 b0fdd15d6c

[libvirt] [PATCH v2 02/31] domcapstest: Add test case for QEMU 4.2.0 on s390x

2019-10-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - new patch .../domaincapsschemadata/qemu_4.2.0.s390x.xml | 202 ++ tests/domaincapstest.c| 4 + 2 files changed, 206 insertions(+) create mode 100644 tests/domaincapsschemadata/qemu_4.2.0

Re: [libvirt] Question about migration confirm phase

2019-10-14 Thread Jiri Denemark
On Fri, Oct 11, 2019 at 23:18:29 +, Jim Fehlig wrote: > I've been investigating a lockd lock ordering bug in a migration error > handling > path in the libxl driver. In the perform phase, the src calls > virDomainLockProcessPause to release the lock before sending the VM to dst. > In >

Re: [libvirt] [PATCH 0/2] tests: Add capabilities for QEMU 4.2.0 on ppc64 and aarch64

2019-10-11 Thread Jiri Denemark
plies > create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml > create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.replies > create mode 100644 tests/qemucapabilitiesdata/caps_4.2.0.ppc64.xml Could you also add corresponding test cases to domaincapstest.c? Revie

[libvirt] [PATCH 1/2] Revert "domcaps: Treat host models as case-insensitive strings"

2019-10-08 Thread Jiri Denemark
CPU model names, x86_64 QEMU does case sensitive lookup. Without reverting this patch, libvirt could happily accept CPU model names which are not supported by QEMU. Signed-off-by: Jiri Denemark --- src/conf/domain_capabilities.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[libvirt] [PATCH 0/2] Fix ppc64 CPU configuration for QEMU 2.11+

2019-10-08 Thread Jiri Denemark
. Jiri Denemark (2): Revert "domcaps: Treat host models as case-insensitive strings" qemu: Adapt to changed ppc64 CPU model names src/conf/domain_capabilities.c| 2 +- src/qemu/qemu_capabilities.c | 26 +-- src/qemu/qemu_capa

[libvirt] [PATCH 2/2] qemu: Adapt to changed ppc64 CPU model names

2019-10-08 Thread Jiri Denemark
QEMU 2.11 for ppc64 changed all CPU model names to lower case. Since libvirt can't change the model names for compatibility reasons, we need to translate the matching lower case models to the names known by libvirt. Signed-off-by: Jiri Denemark --- src/qemu/qemu_capabilities.c

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

2019-10-08 Thread Jiri Denemark
On Mon, Oct 07, 2019 at 17:24:11 +0200, Andrea Bolognani wrote: > On Thu, 2019-10-03 at 16:00 +0200, Jiri Denemark wrote: > > When starting a domain without a CPU model specified in the domain XML, > > QEMU will choose a default one. Which is fine unless the domain gets > >

Re: [libvirt] [PATCH 3/3] qemu: Adapt to changed ppc64 CPU model names

2019-10-08 Thread Jiri Denemark
Resurrecting an old forgotten series... It should fix PPC64 issues with my recent "qemu: Store default CPU in domain XML" patches. On Tue, May 22, 2018 at 16:51:44 +0200, Andrea Bolognani wrote: > On Tue, 2018-05-22 at 15:46 +0200, Jiri Denemark wrote: > > On Tue, May 22, 201

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

2019-10-07 Thread Jiri Denemark
On Wed, Oct 02, 2019 at 17:48:47 +0200, Jiri Denemark wrote: > 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 > >

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

2019-10-03 Thread Jiri Denemark
On Tue, Oct 01, 2019 at 11:20:42 +0200, Paolo Bonzini wrote: > On 30/09/19 18:16, Jiri Denemark wrote: > > 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 pla

Re: [libvirt] [PATCH 16/22] qemu: Store typename from query-cpu-definitions in qemuCaps

2019-10-03 Thread Jiri Denemark
On Thu, Oct 03, 2019 at 16:27:23 +0200, Peter Krempa wrote: > On Thu, Oct 03, 2019 at 16:00:34 +0200, Jiri Denemark wrote: > > We need to create a mapping between CPU model names and their > > corresponding QOM types. > > > > Signed-off-by: Jiri Denemark > > ---

[libvirt] [PATCH 06/22] qemu: Use VIR_AUTOPTR in qemuMonitorJSONGetCPUDefinitions

2019-10-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor_json.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index aa6074bc02..720cd78a23 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu

[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

  1   2   3   4   5   6   7   8   9   10   >