[PATCH v2 1/2] cpu_map: add POWER10 cpu model

2022-05-05 Thread Daniel Henrique Barboza
Add POWER10 as a supported cpu model. Signed-off-by: Daniel Henrique Barboza --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++ tests/domaincapsdata/qemu_5.0.0.ppc64.xml

[PATCH v2 2/2] cpu_ppc64: add support for host-model on POWER10

2022-05-05 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 8 ++--- .../pseries-cpu-compat-power10.args | 32 +++ .../pseries-cpu-compat-power10.err| 1 + .../pseries-cpu-compat-power10.xml| 21

[PATCH v2 0/2] ppc64: POWER10 support

2022-05-05 Thread Daniel Henrique Barboza
Changes in v2: - dropped former patch 01 since qemu ppc64 caps are up to date for 7.0.0 - v1 link: https://listman.redhat.com/archives/libvir-list/2022-May/230686.html Daniel Henrique Barboza (2): cpu_map: add POWER10 cpu model cpu_ppc64: add support for host-model on POWER10

Re: [PATCH 1/3] tests: qemucapabilities: update ppc64 qemu caps for 7.0.0 release

2022-05-05 Thread Daniel Henrique Barboza
On 5/5/22 03:59, Peter Krempa wrote: On Wed, May 04, 2022 at 14:27:16 -0300, Daniel Henrique Barboza wrote: Most significant changes happened in the ppc64-latest.args files with the removal of the '-sandbox' option. That's because you probably built qemu without seccomp support.

[libvirt PATCH 3/3] meson: Drop support for -Wl,-M

2022-05-05 Thread Andrea Bolognani
This was originally introduced in c2fb8bfee309, reportedly to support symbol versioning on Solaris; more recently, 30b301c6eaa9 ported it to meson. Up until the previous commit this has resulted in passing -M .../libvirt/build/src/libvirt.syms to the linker on macOS, but the implementation of

[libvirt PATCH 2/3] meson: Don't attempt to use version scripts on macOS

2022-05-05 Thread Andrea Bolognani
macOS libraries don't support symbol versioning, so the only result that we achieve by passing additional flags to the linker is a bunch of messages like ld: warning: ignoring file .../libvirt/build/src/libvirt.syms, building for macOS-x86_64 but attempting to link with file built for

[libvirt PATCH 1/3] meson: Refactor handling of link_args and link_depends

2022-05-05 Thread Andrea Bolognani
This ensures variable names and the overall structure of the code setting and using them is consistent. It will also make upcoming changes less disruptive. Signed-off-by: Andrea Bolognani --- src/admin/meson.build | 20 ++-- src/meson.build | 104

[libvirt PATCH 0/3] meson: Fix handling of version scripts

2022-05-05 Thread Andrea Bolognani
Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/532183411 Andrea Bolognani (3): meson: Refactor handling of link_args and link_depends meson: Don't attempt to use version scripts on macOS meson: Drop support for -Wl,-M meson.build | 5 +- src/admin/meson.build |

Re: [PATCH] Support cpu0-id of Qemu QMP query-sev-capabilities

2022-05-05 Thread Daniel P . Berrangé
On Thu, May 05, 2022 at 12:30:45PM +0200, Michal Prívozník wrote: > On 4/27/22 21:57, Niteesh Dubey wrote: > > It allows libvirt to provide the value of cpu0-id retuned by the Qemu QMP > > command query-sev-capabilities as implemented by the Qemu Patch [1] which > > is merged to Qemu master

Re: [PATCH] Support cpu0-id of Qemu QMP query-sev-capabilities

2022-05-05 Thread Niteesh Dubey
On 5/5/2022 6:30 AM, Michal Prívozník wrote: On 4/27/22 21:57, Niteesh Dubey wrote: It allows libvirt to provide the value of cpu0-id retuned by the Qemu QMP command query-sev-capabilities as implemented by the Qemu Patch [1] which is merged to Qemu master branch and should be available

[libvirt RFCv6 14/27] qemu: add implementation for virDomainRestoreParams API

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 51 -- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4a74713738..e3582f62a7 100644 --- a/src/qemu/qemu_driver.c +++

[libvirt RFCv6 08/27] libvirt: introduce virDomainSaveParams public API

2022-05-05 Thread Claudio Fontana
create an alternative to virDomainSaveFlags that is more extendible via parameters. Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 26 + src/driver-hypervisor.h | 7 + src/libvirt-domain.c | 48

[libvirt RFCv6 01/27] iohelper: introduce new struct to carry copy operation parameters

2022-05-05 Thread Claudio Fontana
this is in preparation for a minor refactoring of the copy function itself out of runIO(). Signed-off-by: Claudio Fontana Reviewed-by: Daniel P. Berrangé --- src/util/iohelper.c | 95 + 1 file changed, 53 insertions(+), 42 deletions(-) diff --git

[libvirt RFCv6 12/27] remote: Add RPC support for the virDomainRestoreParams API

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 14 +- src/remote_protocol-structs | 8 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index

[libvirt RFCv6 02/27] iohelper: refactor copy operation as a separate function

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Daniel P. Berrangé --- src/util/iohelper.c | 131 +--- 1 file changed, 75 insertions(+), 56 deletions(-) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index c13746a547..1584321839 100644 ---

[libvirt RFCv6 20/27] qemu: capabilities: add multifd to the probed migration capabilities

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_capabilities.c | 4 src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +

[libvirt RFCv6 09/27] libvirt: introduce virDomainRestoreParams public API

2022-05-05 Thread Claudio Fontana
add new API in order to be able to extend parameters to the domain restore operation. We will use it to fit the existing arguments of VirDomainRestoreFlags for now. Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hypervisor.h | 7 +

[libvirt RFCv6 24/27] tools: add parallel parameter to virsh save command

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 23 ++- tools/virsh-domain.c| 49 + 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index

[libvirt RFCv6 11/27] gendispatch: add DomainRestoreParams as requiring conn argument

2022-05-05 Thread Claudio Fontana
in preparation for the addition of DomainRestoreParams, add it to the list of methods requiring a conn first argument. Signed-off-by: Claudio Fontana --- src/rpc/gendispatch.pl | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rpc/gendispatch.pl

[libvirt RFCv6 04/27] virfile: rename runIO to virFileDiskCopy

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/iohelper.c | 2 +- src/util/virfile.c | 2 +- src/util/virfile.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index b3aaf82b9f..ce10ccb905 100644 --- a/src/util/iohelper.c +++

[libvirt RFCv6 17/27] qemu: add stub support for VIR_DOMAIN_SAVE_PARALLEL in restore

2022-05-05 Thread Claudio Fontana
and its companion param VIR_SAVE_PARAM_PARALLEL_CONNECTIONS. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e276a66815..ff2be6ffe9 100644 ---

[libvirt RFCv6 16/27] qemu: add stub support for VIR_DOMAIN_SAVE_PARALLEL in save

2022-05-05 Thread Claudio Fontana
and its companion param VIR_SAVE_PARAM_PARALLEL_CONNECTIONS Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 17 +++-- src/qemu/qemu_saveimage.c | 1 + src/qemu/qemu_saveimage.h | 1 + src/qemu/qemu_snapshot.c | 2 +- 4 files changed, 14 insertions(+), 7

[libvirt RFCv6 23/27] qemu: implement qemuSaveImageLoadMultiFd

2022-05-05 Thread Claudio Fontana
use multifd to restore parallel saves. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 12 +++-- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_migration.h | 6 +++ src/qemu/qemu_saveimage.c | 111 +- src/qemu/qemu_saveimage.h | 9 +++-

[libvirt RFCv6 03/27] iohelper: move runIO function to virfile.c

2022-05-05 Thread Claudio Fontana
where it can be reused by other helpers. No changes other than the move. Note that this makes iohelper now dependent on -lutil, because unused (for iohelper) parts of virfile.c contain calls to openpty(3). Signed-off-by: Claudio Fontana --- src/util/iohelper.c | 175

[libvirt RFCv6 13/27] qemu: add implementation for virDomainSaveParams API

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 53 ++ 1 file changed, 53 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 464c080409..4a74713738 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

[libvirt RFCv6 15/27] libvirt: add new VIR_DOMAIN_SAVE_PARALLEL flag and parameter

2022-05-05 Thread Claudio Fontana
in order to enable parallel save functionality, we will need an opportune new flag and a parameter to specify the number of extra connections to use. Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 18 ++ 1 file changed, 18 insertions(+) diff --git

[libvirt RFCv6 06/27] virfile: add comment about the use of SEEK_END in virFileDiskCopy

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/virfile.c | 4 1 file changed, 4 insertions(+) diff --git a/src/util/virfile.c b/src/util/virfile.c index 87d3e53819..64d7f6948b 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4758,6 +4758,10 @@ virFileDiskCopy(int disk_fd, const

[libvirt RFCv6 21/27] qemu: implement qemuMigrationSrcToFilesMultiFd

2022-05-05 Thread Claudio Fontana
implement a function similar to qemuMigrationSrcToFile that migrates to multiple files using QEMU multifd. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration.c| 129 --- src/qemu/qemu_migration.h| 7 ++ src/qemu/qemu_migration_params.c | 22

[libvirt RFCv6 25/27] tools: add parallel parameter to virsh restore command

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 11 +- tools/virsh-domain.c| 47 ++--- 2 files changed, 49 insertions(+), 9 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index e9012b85d1..3bf9b54806

[libvirt RFCv6 10/27] remote: Add RPC support for the virDomainSaveParams API

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/remote/remote_driver.c | 1 + src/remote/remote_protocol.x | 17 - src/remote_protocol-structs | 9 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index

[libvirt RFCv6 05/27] virfile: change virFileDiskCopy arguments to extend beyond stdin, stdout

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/iohelper.c | 17 +- src/util/virfile.c | 82 ++--- src/util/virfile.h | 2 +- 3 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/util/iohelper.c b/src/util/iohelper.c index

[libvirt RFCv6 22/27] qemu: add parameter to qemuMigrationDstRun to skip waiting

2022-05-05 Thread Claudio Fontana
The distinction on whether to wait for the migration completion or not was made on the async job type, but with the future addition of multifd migration from files, we need a way to avoid waiting, so we can prepare multifd migration parameters before starting the transfers. Adapt all callers.

[libvirt RFCv6 00/27] multifd save restore prototype

2022-05-05 Thread Claudio Fontana
This a respin of the multifd save prototype, rebased on post 8.3.0 release. There are still quite a few rough edges: KNOWN ISSUES: 1) this applies only to virsh save and virsh restore for now (no managed save etc). 2) error handling is not good yet, especially during resume, errors may

[libvirt RFCv6 27/27] qemu: add migration parameter multifd-compression

2022-05-05 Thread Claudio Fontana
use zstd which is the only really interesting one. Signed-off-by: Claudio Fontana --- src/qemu/qemu_capabilities.c | 2 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_migration.c | 6 +++ src/qemu/qemu_migration_params.c

[libvirt RFCv6 18/27] qemu: saveimage: introduce virQEMUSaveFd

2022-05-05 Thread Claudio Fontana
use this data type to encapsulate the pathname, file descriptor, wrapper, and need to unlink. Adapt qemuSaveImageCreate and qemuSaveImageOpen to use a virQEMUSaveFd instead of a plain file descriptor. This makes management of wrapper, need_unlink etc much easier. Signed-off-by: Claudio Fontana

[libvirt RFCv6 07/27] multifd-helper: new helper for parallel save/restore

2022-05-05 Thread Claudio Fontana
For the save direction, this helper listens on a unix socket which QEMU connects to for multifd migration to files. For the restore direction, this helper connects to a unix socket QEMU listens at for multifd migration from files. The file descriptors are passed as command line parameters.

[libvirt RFCv6 19/27] qemu: wire up saveimage code with the multifd helper

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 130 -- src/qemu/qemu_saveimage.h | 11 2 files changed, 137 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 5a569fa52e..65d9a3fef5

[libvirt RFCv6 26/27] docs: update refs to virDomainSaveParams and virDomainRestoreParams

2022-05-05 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/formatsnapshot.rst | 5 +++-- include/libvirt/libvirt-domain.h | 1 + src/libvirt-domain.c | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/formatsnapshot.rst b/docs/formatsnapshot.rst index

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Daniel P . Berrangé
On Thu, May 05, 2022 at 04:58:10AM -0700, Andrea Bolognani wrote: > On Thu, May 05, 2022 at 11:40:55AM +0100, Daniel P. Berrangé wrote: > > On Thu, May 05, 2022 at 02:13:15AM -0700, Andrea Bolognani wrote: > > > On Thu, May 05, 2022 at 08:57:04AM +0100, Daniel P. Berrangé wrote: > > > > IMHO it is

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Andrea Bolognani
On Thu, May 05, 2022 at 11:40:55AM +0100, Daniel P. Berrangé wrote: > On Thu, May 05, 2022 at 02:13:15AM -0700, Andrea Bolognani wrote: > > On Thu, May 05, 2022 at 08:57:04AM +0100, Daniel P. Berrangé wrote: > > > IMHO it is pretty straightforward for apibuild.py to have a policy > > > that the

Re: [PATCH 0/2] test: Link qemuhotplugmock with test_utils_qemu and test_utils

2022-05-05 Thread Ján Tomko
On a Monday in 2022, Michal Privoznik wrote: This is an alternative version to: https://listman.redhat.com/archives/libvir-list/2022-April/230092.html Michal Prívozník (2): test: Link qemuhotplugmock with test_utils_qemu and test_utils tests: Deduplicate some WITH_* checks tests/meson.build

Re: [PATCH 0/2] virnetdev: Fix regression in setting VLAN tag

2022-05-05 Thread Ján Tomko
On a Friday in 2022, Michal Privoznik wrote: *** BLURB HERE *** Michal Prívozník (2): virNetDevSetVfMac: Fix error message on invalid args virnetdev: Fix regression in setting VLAN tag src/util/virnetdev.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Ján

Re: [PATCH 0/2] virnetdev: Fix regression in setting VLAN tag

2022-05-05 Thread Michal Prívozník
On 4/22/22 14:15, Michal Privoznik wrote: > *** BLURB HERE *** > > Michal Prívozník (2): > virNetDevSetVfMac: Fix error message on invalid args > virnetdev: Fix regression in setting VLAN tag > > src/util/virnetdev.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >

Re: [PATCH] remote_daemon: Don't run virStateCleanup() if virStateReload() is still running

2022-05-05 Thread Michal Prívozník
On 4/25/22 11:06, Michal Privoznik wrote: > When a SIGHUP is received a thread is spawned that runs > virStateReload(). However, if SIGINT is received while the former > thread is still running then we may get into problematic > situation: the cleanup code in main() sees drivers initialized > and

Re: [PATCH 0/2] test: Link qemuhotplugmock with test_utils_qemu and test_utils

2022-05-05 Thread Michal Prívozník
On 4/25/22 12:37, Michal Privoznik wrote: > This is an alternative version to: > > https://listman.redhat.com/archives/libvir-list/2022-April/230092.html > > Michal Prívozník (2): > test: Link qemuhotplugmock with test_utils_qemu and test_utils > tests: Deduplicate some WITH_* checks > >

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Daniel P . Berrangé
On Thu, May 05, 2022 at 02:13:15AM -0700, Andrea Bolognani wrote: > On Thu, May 05, 2022 at 08:57:04AM +0100, Daniel P. Berrangé wrote: > > On Thu, May 05, 2022 at 09:48:54AM +0200, Victor Toso wrote: > > > On Wed, May 04, 2022 at 07:02:48PM +0100, Daniel P. Berrangé wrote: > > > > I don't really

Re: [PATCH] Support cpu0-id of Qemu QMP query-sev-capabilities

2022-05-05 Thread Michal Prívozník
On 4/27/22 21:57, Niteesh Dubey wrote: > It allows libvirt to provide the value of cpu0-id retuned by the Qemu QMP > command query-sev-capabilities as implemented by the Qemu Patch [1] which > is merged to Qemu master branch and should be available with Qemu 7.1. > This is used to get the

Re: [libvirt PATCH 0/8] Improve heuristics for computing baseline CPU models

2022-05-05 Thread Michal Prívozník
On 5/4/22 18:54, Jiri Denemark wrote: > See 7/8 and 8/8 for details. > > https://bugzilla.redhat.com/show_bug.cgi?id=1851227 > > Jiri Denemark (8): > cpu_map: Disable cpu64-rhel* for host-model and baseline > cputest: Drop some old artificial baseline tests > cputest: Give better names to

Re: [libvirt PATCH 7/8] cpu_x86: Penalize disabled features when computing CPU model

2022-05-05 Thread Michal Prívozník
On 5/4/22 18:54, Jiri Denemark wrote: > For finding the best matching CPU model for a given set of features > while we don't know the CPU signature (i.e., when computing a baseline > CPU model) we've been using a "shortest list of features" heuristics. > This works well if new CPU models are

Re: [PATCH 1/3] tests: qemucapabilities: update ppc64 qemu caps for 7.0.0 release

2022-05-05 Thread Daniel Henrique Barboza
On 5/5/22 03:59, Peter Krempa wrote: On Wed, May 04, 2022 at 14:27:16 -0300, Daniel Henrique Barboza wrote: Most significant changes happened in the ppc64-latest.args files with the removal of the '-sandbox' option. That's because you probably built qemu without seccomp support.

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Andrea Bolognani
On Thu, May 05, 2022 at 08:57:04AM +0100, Daniel P. Berrangé wrote: > On Thu, May 05, 2022 at 09:48:54AM +0200, Victor Toso wrote: > > On Wed, May 04, 2022 at 07:02:48PM +0100, Daniel P. Berrangé wrote: > > > I don't really like the idea of adding stuff to the public API > > > to workaround

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Victor Toso
Hi, On Thu, May 05, 2022 at 08:57:04AM +0100, Daniel P. Berrangé wrote: > On Thu, May 05, 2022 at 09:48:54AM +0200, Victor Toso wrote: > > Hi, > > > > On Wed, May 04, 2022 at 07:02:48PM +0100, Daniel P. Berrangé wrote: > > > On Wed, May 04, 2022 at 07:30:08PM +0200, Andrea Bolognani wrote: > > >

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Daniel P . Berrangé
On Thu, May 05, 2022 at 09:48:54AM +0200, Victor Toso wrote: > Hi, > > On Wed, May 04, 2022 at 07:02:48PM +0100, Daniel P. Berrangé wrote: > > On Wed, May 04, 2022 at 07:30:08PM +0200, Andrea Bolognani wrote: > > > Due to hystorical reasons, it needs to be possible to pass values > > hystorical

Re: [libvirt PATCH 2/2] include: Explicitly reserve values for overlapping flag types

2022-05-05 Thread Victor Toso
Hi, On Wed, May 04, 2022 at 07:02:48PM +0100, Daniel P. Berrangé wrote: > On Wed, May 04, 2022 at 07:30:08PM +0200, Andrea Bolognani wrote: > > Due to hystorical reasons, it needs to be possible to pass values hystorical -> historical ? > > from the virTypedParameterFlags and

Re: [PATCH 1/3] tests: qemucapabilities: update ppc64 qemu caps for 7.0.0 release

2022-05-05 Thread Peter Krempa
On Wed, May 04, 2022 at 14:27:16 -0300, Daniel Henrique Barboza wrote: > Most significant changes happened in the ppc64-latest.args files with > the removal of the '-sandbox' option. That's because you probably built qemu without seccomp support. Preferrably either Andrea rebuilds these or you