[libvirt] [PATCH v3 51/52] qemuxml2*test: Add test cases for default CPU models on x86_64

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - no change ...-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

[libvirt] [PATCH v3 49/52] qemuxml2*test: Add test cases for default CPU models on ppc64

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - no change ...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

[libvirt] [PATCH v3 06/52] qemu: Filter models in virQEMUCapsGetCPUDefinitions

2019-11-05 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 v3 40/52] qemu: Introduce virQEMUCapsCopyMachineTypes

2019-11-05 Thread Jiri Denemark
The function copies machine type data from one QEMU caps structure to another. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH v3 14/52] qemu: Use virDomainCapsCPUUsable in qemuMonitorCPUDefInfo

2019-11-05 Thread Jiri Denemark
While virDomainCapsCPUModel structure contains 'usable' field with virDomainCapsCPUUsable type, the lower level structure specific to QEMU driver used virTriStateBool for the same thing and we had to translate between them. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch

[libvirt] [PATCH v3 36/52] qemu: Refactor virQEMUCapsFormatCache a bit

2019-11-05 Thread Jiri Denemark
All the code for formatting machine type data was moved to a standalone virQEMUCapsFormatMachines function. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 37 ++-- 1 file changed, 23 insertions(+), 14

[libvirt] [PATCH v3 42/52] qemu: Probe machine types for both KVM and TCG

2019-11-05 Thread Jiri Denemark
Almost all TCG query-machines replies match KVM. The only exceptions are 4.2.0 replies on s390x which differ in the reported default CPU type. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 3 +- .../caps_1.5.3.x86_64

[libvirt] [PATCH v3 15/52] qemu: Introduce virQEMUCapsCPUDefsToModels

2019-11-05 Thread Jiri Denemark
The function translates qemuMonitorCPUDefsPtr (used by QEMU caps probing code) into virDomainCapsCPUModelsPtr used by domain capabilities. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - trivial rebase Version 3: - g_autoptr, g_steal_pointer

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

2019-11-05 Thread Jiri Denemark
res and starts happily. https://bugzilla.redhat.com/show_bug.cgi?id=1598151 https://bugzilla.redhat.com/show_bug.cgi?id=1598162 Signed-off-by: Jiri Denemark --- Notes: Version 2: - new test cases Version 3: - enable default CPU for KVM on s390 and ppc64 - handle &

[libvirt] [PATCH v3 46/52] conf: Define g_autoptr cleanup function for virCPUDef

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - G_DEFINE_AUTOPTR_CLEANUP_FUNC 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..892ed08653

[libvirt] [PATCH v3 37/52] qemu: Pass virDomainVirtType to APIs dealing with machine types

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 64 +--- src/qemu/qemu_capabilities.h | 8 - src/qemu/qemu_domain.c | 8 +++-- tests/domaincapstest.c | 10 -- 4 files changed, 59

[libvirt] [PATCH v3 43/52] qemu: Probe for default CPU types

2019-11-05 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 Reviewed-by: Ján Tomko --- Notes: Version 2: - no change except for updated test results Version 3: - TCG and KVM are probed separately now

[libvirt] [PATCH v3 44/52] qemu: Introduce virQEMUCapsGetMachineDefaultCPU

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - fix crash with CPUs without type Version 3: - no change src/qemu/qemu_capabilities.c | 32 src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 35 insertions

[libvirt] [PATCH v3 28/52] qemu: Drop virQEMUCapsGetHostCPUData

2019-11-05 Thread Jiri Denemark
It was very similar to virQEMUCapsGetAccel. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 25 ++--- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH v3 45/52] qemu: Use g_autoptr in qemuDomainDefPostParse

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - g_autoptr src/qemu/qemu_domain.c | 28 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu

[libvirt] [PATCH v3 11/52] qemu: Flatten qemuMonitorCPUDefs.cpus

2019-11-05 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 Version 3: - minor change caused by g_new0 introduced

[libvirt] [PATCH v3 33/52] qemu: Make virQEMUCapsGetMachineTypesCaps static

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 150 ++- src/qemu/qemu_capabilities.h | 3 - 2 files changed, 76 insertions(+), 77 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH v3 12/52] qemu: Add qemuMonitorCPUDefsCopy

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 2: - no change Version 3: - more glib functions - the function now returns the pointer to the copy rather than int as it can never fail src/qemu/qemu_monitor.c | 23 +++ src/qemu/qemu_monitor.h

[libvirt] [PATCH v3 25/52] qemu: Introduce virQEMUCapsAccelCopy

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c6a2f65239..92041190eb 100644

[libvirt] [PATCH v3 09/52] qemu: Change return type of virQEMUCapsFetchCPUDefinitions

2019-11-05 Thread Jiri Denemark
. Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - g_steal_pointer src/qemu/qemu_capabilities.c | 32 src/qemu/qemu_capabilities.h | 5 +++-- src/qemu/qemu_process.c | 17

[libvirt] [PATCH v3 30/52] qemu: Refactor virQEMUCapsFormatAccel

2019-11-05 Thread Jiri Denemark
And make it use virQEMUCapsGetAccel once rather than repeating the same code in all functions called from virQEMUCapsFormatAccel. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 29 +++-- 1 file changed, 11

[libvirt] [PATCH v3 26/52] qemu: Introduce virQEMUCapsAccelClear

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 92041190eb..a0b5047276 100644 --- a/src

[libvirt] [PATCH v3 31/52] qemu: Introduce virQEMUCapsProbeCPUDefinitionsTest

2019-11-05 Thread Jiri Denemark
It is a tiny wrapper around virQEMUCapsProbeQMPCPUDefinitions which will soon get private parameters and thus it cannot be exposed outside qemu_capabilities. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new ptach src/qemu/qemu_capabilities.c | 10 +- src/qemu

[libvirt] [PATCH v3 20/52] conf: Drop virDomainCapsCPUModelsAddSteal

2019-11-05 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 Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - g_steal_pointer src/conf

[libvirt] [PATCH v3 32/52] qemu: Refactor probing of accelerator dependent data

2019-11-05 Thread Jiri Denemark
To avoid duplicating code which selects the right virQEMUCapsAccel data to be filled during probing. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 51 1 file changed, 23 insertions(+), 28 deletions

[libvirt] [PATCH v3 48/52] qemuxml2*test: Add test cases for default CPU models on aarch64

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - no change ...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

[libvirt] [PATCH v3 50/52] qemuxml2*test: Add test cases for default CPU models on s390x

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - no change ...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

[libvirt] [PATCH v3 41/52] qemu: Make probed machine types depend on accelerator

2019-11-05 Thread Jiri Denemark
Some specifics of machine types may depend on the accelerator and thus the data should be moved to virQEMUCapsAccel. The TCG machine types are just copied from the ones probed for KVM to simplify the changes to qemucapabilitiestest data files. Signed-off-by: Jiri Denemark --- Notes: Version

[libvirt] [PATCH v3 10/52] qemu: Introduce qemuMonitorCPUDefs struct

2019-11-05 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

[libvirt] [PATCH v3 35/52] qemu: Refactor virQEMUCapsLoadCache a bit

2019-11-05 Thread Jiri Denemark
All the code for loading machine type data was moved to a standalone virQEMUCapsLoadMachines function. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 93 +--- 1 file changed, 55 insertions(+), 38 deletions

[libvirt] [PATCH v3 39/52] qemu: Use typedef for virQEMUCapsMachineType

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b21aadf864..0a00f2c361 100644 --- a/src/qemu

[libvirt] [PATCH v3 19/52] conf: Drop unused virDomainCapsCPUModelsFilter

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - no change src/conf/domain_capabilities.c | 33 - src/conf/domain_capabilities.h | 3 --- src/libvirt_private.syms | 1 - 3 files

[libvirt] [PATCH v3 23/52] qemu: Add virQEMUCaps{Load, Format}Accel

2019-11-05 Thread Jiri Denemark
The new functions are designed to load and format capabilities which depend on the accelerator (host CPU expansion and CPU models). Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 40 +- .../caps_2.10.0.x86_64.xml

[libvirt] [PATCH v3 34/52] qemu: Make virQEMUCapsIsMachineSupported static

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 28 ++-- src/qemu/qemu_capabilities.h | 3 --- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu

[libvirt] [PATCH v3 07/52] qemu: Use virQEMUCapsGetCPUDefinitions more

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

[libvirt] [PATCH v3 29/52] qemu: Refactor virQEMUCapsLoadAccel

2019-11-05 Thread Jiri Denemark
And make it use virQEMUCapsGetAccel once rather than repeating the same code in all functions called from virQEMUCapsLoadAccel. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 40 ++-- 1 file changed, 15

[libvirt] [PATCH v3 47/52] qemuxml2argvtest: Update host arch for DO_TEST*ARCH* tests

2019-11-05 Thread Jiri Denemark
To avoid mismatch between host and QEMU capabilities. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch tests/qemuxml2argvtest.c | 4 tests/testutilsqemu.c| 6 +++--- tests/testutilsqemu.h| 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git

[libvirt] [PATCH v3 27/52] qemu: Introduce and use virQEMUCapsGetAccel

2019-11-05 Thread Jiri Denemark
The function can be used to get the pointer to all data which depend on the accelerator. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git

[libvirt] [PATCH v3 38/52] qemu: Move machine type data in capabilities cache

2019-11-05 Thread Jiri Denemark
In preparation for making machine types dependent on the accelerator, the elements are formatted between and . Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 4 +- .../caps_1.5.3.x86_64.xml | 30

[libvirt] [PATCH v3 22/52] qemu: Drop unused virQEMUCapsGetDefaultMachine

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

[libvirt] [PATCH v3 04/52] conf: Drop nameLen parameter from virDomainCapsCPUModelsAdd

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

[libvirt] [PATCH v3 24/52] qemu: Introduce virQEMUCapsAccel structure

2019-11-05 Thread Jiri Denemark
This is container for capabilities data that depend on the accelerator. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch src/qemu/qemu_capabilities.c | 66 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH v3 05/52] qemu: Copy CPU models in virQEMUCapsGetCPUDefinitions

2019-11-05 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 Version 3: - g_autoptr src/conf/domain_capabilities.h | 2 ++ src/qemu/qemu_capabilities.c | 23 ++- src/qemu

[libvirt] [PATCH v3 17/52] qemu: Split virQEMUCapsFetchCPUModels

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

[libvirt] [PATCH v3 13/52] qemu: Use g_autofree in virQEMUCapsLoadCPUModels

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - g_autofree src/qemu/qemu_capabilities.c | 58 +++- 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/src/qemu

[libvirt] [PATCH v3 08/52] qemu: Use g_autoptr in qemuMonitorJSONGetCPUDefinitions

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

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

2019-11-05 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 Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3

[libvirt] [PATCH v3 03/52] conf: Use VIR_AUTO* in virDomainCapsCPUModelsAdd

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - no change Version 3: - g_autofree src/conf/domain_capabilities.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_capabilities.c b/src/conf

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

2019-11-05 Thread Jiri Denemark
that libvirt is able to fetch different default CPU models on TCG vs. KVM --- Some patches were too large so I decided to shorten them before sending to the list. You can check the full version of this series with git fetch https://gitlab.com/jirkade/libvirt cpu-default-type Jiri Denemark (52

[libvirt] [PATCH v3 02/52] tests: Update 4.2.0 capabilities data on ppc64

2019-11-05 Thread Jiri Denemark
Generated with "spapr/kvm: Set default cpu model for all machine classes" fix for QEMU applied. Signed-off-by: Jiri Denemark --- Notes: Version 3: - new patch .../caps_4.2.0.ppc64.replies | 38 +-- .../qemucapabilitiesdata/caps_4.2.0.ppc6

[libvirt] [PATCH v3 01/52] tests: Add capabilities for QEMU 4.2.0 on s390x

2019-11-05 Thread Jiri Denemark
Signed-off-by: Jiri Denemark Reviewed-by: Ján Tomko --- Notes: Version 2: - new patch Version 3: - regenerated with the following QEMU patch applied "s390x/kvm: Set default cpu model for all machine classes" - includes domaincapsdata (previously in

Re: [libvirt] the test-file

2019-10-29 Thread Jiri Denemark
Hi. > hello,everyone: > If I want to add a new CPU model ,the test-file > x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml > and x86_64-cpuid-*.sig how to generate in the /tests/cputestdata/ ? The steps to add a new CPU data test case is to run the

Re: [libvirt] [PATCH 12/12] tests/domaincaps: Use testQemuCapsIterate()

2019-10-24 Thread Jiri Denemark
/qemucapabilitiestest followed by VIR_TEST_REGENERATE_OUTPUT=1 tests/domaincapstest For the whole series: Reviewed-by: Jiri Denemark -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] tests: Add capabilities for QEMU 4.1.0 on s390x

2019-10-22 Thread Jiri Denemark
On Tue, Oct 22, 2019 at 13:39:11 +0200, Andrea Bolognani wrote: > On Mon, 2019-10-21 at 10:55 +0200, Shalini Chellathurai Saroja wrote: > > Signed-off-by: Shalini Chellathurai Saroja > > --- > > .../domaincapsschemadata/qemu_4.1.0.s390x.xml | 221 + > > tests/domaincapstest.c

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

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