RE: [RFC 00/18] vfio: Adopt iommufd

2022-04-27 Thread Tian, Kevin
> From: Alex Williamson > Sent: Wednesday, April 27, 2022 12:22 AM > > > > > > My expectation would be that libvirt uses: > > > > > > -object iommufd,id=iommufd0,fd=NNN > > > -device vfio-pci,fd=MMM,iommufd=iommufd0 > > > > > > Whereas simple QEMU command line would be: > > > > > > -object iomm

[libvirt RFCv4 14/20] qemu: capabilities: add multifd to the probed migration capabilities

2022-04-27 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 + tests/qemucapabilitiesdata/ca

[libvirt RFCv4 13/20] qemu: wire up saveimage code with the multifd helper

2022-04-27 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 1006

[libvirt RFCv4 17/20] qemu: implement qemuSaveImageLoadMultiFd

2022-04-27 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 RFCv4 01/20] iohelper: introduce new struct to carry copy operation parameters

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

[libvirt RFCv4 02/20] iohelper: refactor copy operation as a separate function

2022-04-27 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- 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 --- a/src/util/iohelper.c +++ b/src/util/iohelpe

[libvirt RFCv4 18/20] tools: add parallel parameter to virsh save command

2022-04-27 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 e8568559fa..2bce701

[libvirt RFCv4 06/20] libvirt: introduce virDomainSaveParametersFlags public API

2022-04-27 Thread Claudio Fontana
add new API in order to be able to extend parameters to the domain save operation. We will use it to fit the existing arguments of VirDomainSaveFlags, and then add parallel saves functionality. Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 45

[libvirt RFCv4 20/20] qemu: add migration parameter multifd-compression

2022-04-27 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 RFCv4 19/20] tools: add parallel parameter to virsh restore command

2022-04-27 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 2bce701057..21bfc8b16b 100644

[libvirt RFCv4 16/20] qemu: add parameter to qemuMigrationDstRun to skip waiting

2022-04-27 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. Si

[libvirt RFCv4 15/20] qemu: implement qemuMigrationSrcToFilesMultiFd

2022-04-27 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 RFCv4 05/20] multifd-helper: new helper for parallel save/restore

2022-04-27 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. Signe

[libvirt RFCv4 08/20] remote: Add RPC support for the virDomainSaveParametersFlags API

2022-04-27 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 7e

[libvirt RFCv4 09/20] remote: Add RPC support for the virDomainRestoreParametersFlags API

2022-04-27 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 1fc5d4

[libvirt RFCv4 11/20] qemu: add a stub for virDomainRestoreParametersFlags API

2022-04-27 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 59 -- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c341df5f8e..7a4e64a118 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu

[libvirt RFCv4 12/20] qemu: saveimage: introduce virQEMUSaveFd

2022-04-27 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 RFCv4 10/20] qemu: add a stub for virDomainSaveParametersFlags API

2022-04-27 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 66 --- src/qemu/qemu_saveimage.c | 1 + src/qemu/qemu_saveimage.h | 1 + src/qemu/qemu_snapshot.c | 2 +- 4 files changed, 65 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt RFCv4 07/20] libvirt: introduce virDomainRestoreParametersFlags public API

2022-04-27 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, and then add parallel restore functionality. Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 4 +++ src/driver-hyper

[libvirt RFCv4 04/20] runio: add arguments to extend use beyond just stdin and stdout

2022-04-27 Thread Claudio Fontana
add arguments to runio to allow read/write from/to arbitrary file descriptors, as opposed to just stdin and stdout. Signed-off-by: Claudio Fontana --- src/util/iohelper.c | 2 +- src/util/runio.c| 10 +- src/util/runio.h| 17 - 3 files changed, 22 insertions(+),

[libvirt RFCv4 03/20] iohelper: move runIO function to a separate module

2022-04-27 Thread Claudio Fontana
where it can be reused by other helpers. No changes other than the move. Signed-off-by: Claudio Fontana --- po/POTFILES.in | 1 + src/util/iohelper.c | 178 +-- src/util/meson.build | 2 + src/util/runio.c | 214 +

[libvirt RFCv4 00/20] multifd save restore prototype

2022-04-27 Thread Claudio Fontana
This is the multifd save prototype in semi-functional state, with both save and restore minimally functional. 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) the .pl scripts to generate the headers

Re: [libvirt RFC v3 06/19] remote: Add RPC support for the virDomainRestoreParametersFlags API

2022-04-27 Thread Claudio Fontana
On 4/27/22 1:00 AM, Jim Fehlig wrote: > On 4/26/22 10:47, Claudio Fontana wrote: >> 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 insertio

Re: [libvirt RFC v3 05/19] remote: Add RPC support for the virDomainSaveParametersFlags API

2022-04-27 Thread Claudio Fontana
On 4/27/22 12:47 AM, Jim Fehlig wrote: > On 4/26/22 10:47, Claudio Fontana wrote: >> 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 ins

Re: [libvirt RFC v3 03/19] libvirt: introduce virDomainSaveParametersFlags public API

2022-04-27 Thread Claudio Fontana
On 4/27/22 12:42 AM, Jim Fehlig wrote: > On 4/26/22 10:47, Claudio Fontana wrote: >> add new API in order to be able to extend parameters to the domain >> save operation. We will use it to fit the existing arguments of >> VirDomainSaveFlags, and then add parallel saves functionality. >> >> Signed-o

Re: [PATCH] NEWS: Mention bump of minimum qemu version to qemu-3.1

2022-04-27 Thread Ján Tomko
On a Wednesday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

[PATCH] NEWS: Mention bump of minimum qemu version to qemu-3.1

2022-04-27 Thread Peter Krempa
Signed-off-by: Peter Krempa --- NEWS.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 7ad8b9ec0b..c9b0ad42ed 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,11 @@ v8.3.0 (unreleased) * **Removed features** + * qemu: Remove support for QEMU < 3.1 + +

Re: [libvirt RFC v3 06/19] remote: Add RPC support for the virDomainRestoreParametersFlags API

2022-04-27 Thread Claudio Fontana
On 4/27/22 1:00 AM, Jim Fehlig wrote: > On 4/26/22 10:47, Claudio Fontana wrote: >> 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 insertio

Re: [libvirt RFC v3 03/19] libvirt: introduce virDomainSaveParametersFlags public API

2022-04-27 Thread Claudio Fontana
Thanks for looking at this, On 4/27/22 12:42 AM, Jim Fehlig wrote: > On 4/26/22 10:47, Claudio Fontana wrote: >> add new API in order to be able to extend parameters to the domain >> save operation. We will use it to fit the existing arguments of >> VirDomainSaveFlags, and then add parallel saves

Re: [PATCH 01/18] hw/audio: Remove -soundhw support

2022-04-27 Thread Paolo Bonzini
On 4/25/22 10:21, Martin Kletzander wrote: One thing I am not sure about is whether to keep the aliases of ac97 and es1370 in the qdev_alias_table. Signed-off-by: Martin Kletzander I agree that -soundhw is a bad option, but I think we should preserve something similarly easy to use. For exa

Re: [PATCH 06/18] ui/vnc: Require audiodev=

2022-04-27 Thread Daniel P . Berrangé
On Wed, Apr 27, 2022 at 11:32:41AM +0200, Paolo Bonzini wrote: > On 4/25/22 10:21, Martin Kletzander wrote: > > @@ -4188,12 +4188,15 @@ void vnc_display_open(const char *id, Error **errp) > > vd->ledstate = 0; > > audiodev = qemu_opt_get(opts, "audiodev"); > > -if (audiodev) { > > -

Re: [PATCH 06/18] ui/vnc: Require audiodev=

2022-04-27 Thread Paolo Bonzini
On 4/25/22 10:21, Martin Kletzander wrote: @@ -4188,12 +4188,15 @@ void vnc_display_open(const char *id, Error **errp) vd->ledstate = 0; audiodev = qemu_opt_get(opts, "audiodev"); -if (audiodev) { -vd->audio_state = audio_state_by_name(audiodev); -if (!vd->audi

Re: [PATCH v4 00/19] Add 'version' to other exported types

2022-04-27 Thread Andrea Bolognani
On Tue, Apr 26, 2022 at 06:26:26PM +0200, Victor Toso wrote: > On Tue, Apr 26, 2022 at 04:06:08PM +, Andrea Bolognani wrote: > > Ideas for follow-up work: > > > > * improve the generator so that multi-line comments attached to > > enum values and macros get all newlines stripped before en

Re: [PATCH] cpu: Remove pointless check

2022-04-27 Thread Martin Kletzander
On Wed, Apr 27, 2022 at 10:12:25AM +0200, Peter Krempa wrote: On Wed, Apr 27, 2022 at 09:51:34 +0200, Martin Kletzander wrote: These two pointers can never be NULL since they are initialised to a reference of a struct. This became apparent when commit 210a19539447 added a VIR_DEBUG which used b

Re: [PATCH] cpu: Remove pointless check

2022-04-27 Thread Peter Krempa
On Wed, Apr 27, 2022 at 09:51:34 +0200, Martin Kletzander wrote: > These two pointers can never be NULL since they are initialised to a reference > of a struct. This became apparent when commit 210a19539447 added a VIR_DEBUG > which used both pointers because due to the concise condition the compi

[PATCH] cpu: Remove pointless check

2022-04-27 Thread Martin Kletzander
These two pointers can never be NULL since they are initialised to a reference of a struct. This became apparent when commit 210a19539447 added a VIR_DEBUG which used both pointers because due to the concise condition the compiler saw that if the "and" part of the condition did short-circuit (and

Re: [libvirt PATCH] util: fix double destroy / missing unref of GSource

2022-04-27 Thread Michal Prívozník
On 4/26/22 16:26, Daniel P. Berrangé wrote: > A leak of the GSource was introduced in > > commit 87a43a907f0ad4897a28ad7c216bc70f37270b93 > Author: Michal Prívozník > Date: Fri Jan 28 18:42:45 2022 +0100 > > lib: Use g_clear_pointer() more > > As it mistakenly replaced the g_vir_sou