Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-10-23 Thread Claudio Fontana
On 10/11/23 17:29, Daniel P. Berrangé wrote: > On Wed, Oct 11, 2023 at 04:56:12PM +0200, Claudio Fontana wrote: >> >> On 10/11/23 16:05, Daniel P. Berrangé wrote: >>> >>> Instead of using 'getfd' though we have to use 'add-fd'. >>&g

Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-10-11 Thread Claudio Fontana
Hi Daniel, thanks for your answer, On 10/11/23 16:05, Daniel P. Berrangé wrote: > On Wed, Oct 11, 2023 at 03:46:59PM +0200, Claudio Fontana wrote: >> In terms of our use case, we would need to trigger these migrations from >> virsh save, restore, managedsave / start. >>

Re: [libvirt RFCv11 00/33] multifd save restore prototype

2023-10-11 Thread Claudio Fontana
think I remember that we plan to write from libvirt normally (without O_DIRECT) and then set the flag later, but should libvirt or QEMU set the O_DIRECT flag? This likely depends on who owns the fd? Thank you for your thoughts from the libvirt side and your help in resurrecting this topic, Cla

Re: [PATCH 2/2] libvirt-guests: Add systemd odering dependency to virtproxyd

2023-08-05 Thread Claudio Fontana
On 8/1/23 01:06, Jim Fehlig wrote: > It's possible to configure a system such that libvirt-guests connects > to the legacy /run/libvirt/libvirt-sock when running modular daemons, > in which case it connects to virtproxyd. If virtproxyd is stopped before > libvirt-guests, the latter will fail to con

Re: [PATCH 01/13] tools: Fix vshControl declaration and initialization

2023-08-04 Thread Claudio Fontana
On 8/3/23 22:54, Olaf Hering wrote: > Thu, 3 Aug 2023 21:38:02 +0200 Michal Prívozník : > >> it looks like we're using { 0 } everywhere else so that's why I went with it. > > I was under the impression {} is valid. But apparently it is not, > so I learned something new today: "ISO C forbids empty

Re: [PATCH 04/13] qemu: Don't reuse variable in processSerialChangedEvent()

2023-08-03 Thread Claudio Fontana
a > separate variable for the detour code. > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/qemu/qemu_driver.c | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_

Re: [PATCH 13/13] lib: Prefer sizeof(variable) instead of sizeof(type) in memset

2023-08-03 Thread Claudio Fontana
Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/qemu/qemu_monitor_json.c | 4 ++-- > src/qemu/qemu_process.c | 2 +- > src/remote/remote_driver.c | 2 +- > src/storage/storage_driver.c | 2 +- > src/test/test_driver.c | 4 ++-- > 5 files c

Re: [PATCH 12/13] lib: Finish using struct zero initializer manually

2023-08-03 Thread Claudio Fontana
ed, family, pass) \ > do { \ > -virSocketAddr addr; \ > +virSocketAddr addr = { 0 }; \ > struct testParseData data = { &addr, addrstr, family, true}; \ > struct testFormatData data2 = { &addr, addrformated, pass }; \ > -memset(&a

Re: [PATCH 11/13] lib: use struct zero initializer instead of memset

2023-08-03 Thread Claudio Fontana
+ T X = { 0 }; > ... when exists > ( > - memset(&X, 0, sizeof(X)); > | > - memset(&X, 0, sizeof(T)); > ) > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/ch/ch_monitor.c| 3 +- >

Re: [PATCH 10/13] virnetdaemon.c: Use struct zero initializer instead of memset

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > Ideally, these would be fixed by coccinelle (see next commit), > but because of various reasons they aren't. Fix them manually. > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/rpc/virnetdaemon.

Re: [PATCH 09/13] virnetclient: Update comment about memset()

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > Instead of suggesting to zero structs out using memset() we > should suggest initializing structs with zero initializer. > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/rpc/virnetclient.c | 4 ++-- &g

Re: [PATCH 08/13] securityselinuxhelper: Use g_new0() instead of malloc()+memset() combo

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > Inside of securityselinuxhelper we still use malloc() + > memset(.., 0, ...) combo. Convert it to g_new0(). > > Signed-off-by: Michal Privoznik I don't think it is a good idea to mix Glib g_new, g_free etc with malloc, calloc, free. If you go with g_n

Re: [PATCH 07/13] virnetlink: Drop unused variable from virNetlinkCommand()

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > The fds variable inside of virNetlinkCommand() is not used > really. It's passed to memset() (hence compilers do not > complain), but that's about it. Drop it. > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fo

Re: [PATCH 06/13] virfirewalld: Drop useless memset() in virFirewallDApplyRule()

2023-08-03 Thread Claudio Fontana
On 8/3/23 12:36, Michal Privoznik wrote: > This is a residue of v6.8.0-rc1~100. The error variable inside of > virFirewallDApplyRule() is already initialized to NULL. There's > no need to memset() it to zero again. > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fo

Re: [PATCH 05/13] remote_driver: Drop explicit memset(&sargs) in remoteAuthSASL()

2023-08-03 Thread Claudio Fontana
y: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/remote/remote_driver.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c > index d775f65fe2..7ccf550dff 100644 > --- a/src/remote/remote_driver.c &

Re: [PATCH 02/13] virt-aa-helper: Use struct zero initializer instead of memset

2023-08-03 Thread Claudio Fontana
lain). > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/security/virt-aa-helper.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c > index 3ee59b32bb..

Re: [PATCH 01/13] tools: Fix vshControl declaration and initialization

2023-08-03 Thread Claudio Fontana
ro initializer for vshControl and > virshControl/vshAdmControl structs, > 3) drop explicit memset(.., 0, ...) ; > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > tools/virsh.c | 7 +++ > tools/virt-admin.c | 7 +++ > 2 f

Re: [PATCH 03/13] Decrease scope of some variables

2023-08-03 Thread Claudio Fontana
, use struct zero > initializer and drop explicit memset(). > > Signed-off-by: Michal Privoznik Reviewed-by: Claudio Fontana > --- > src/qemu/qemu_driver.c | 4 +--- > src/remote/remote_driver.c | 7 +++ > src/rpc/virnetsshsession.c | 5 ++--- > src/util/vir

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Claudio Fontana
On 1/30/23 12:44, Thomas Huth wrote: > Testing 32-bit host OS support takes a lot of precious time during the QEMU > contiguous integration tests, and considering that many OS vendors stopped > shipping 32-bit variants of their OS distributions and most hardware from > the past >10 years is capable

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Claudio Fontana
On 2/17/23 11:36, Markus Armbruster wrote: > I feel the discussion petered out without a conclusion. > > I don't think letting the status quo win by inertia is a good outcome > here. > > Which 32-bit hosts are still useful, and why? Hi Markus, if the question is very very general, my opinion i

Re: [PATCH 4/4] virsh: Add migrate options to set parallel compress level

2023-01-30 Thread Claudio Fontana
On 1/30/23 02:59, Jiang Jiacheng wrote: > > > On 2023/1/20 17:41, Claudio Fontana wrote: >> On 1/20/23 09:47, Jiang Jiacheng wrote: >>> Add migrate options: --compression-zlib-level >>> --compression-zstd-level >>> These option

Re: [PATCH 4/4] virsh: Add migrate options to set parallel compress level

2023-01-20 Thread Claudio Fontana
On 1/20/23 09:47, Jiang Jiacheng wrote: > Add migrate options: --compression-zlib-level > --compression-zstd-level > These options are used to set compress level for "zlib" > or "zstd" during parallel migration if the compress method > is specified. > > Signed-off-by: Jiang Ji

Re: [PATCH 1/3] Add public API for parallel compression method

2023-01-17 Thread Claudio Fontana
Hi, On 1/16/23 14:42, Jiang Jiacheng wrote: > Add public API VIR_MIGRATE_PARAM_PARALLEL_COMPRESSION, > VIR_MIGRATE_PARAM_PARALLEL_ZLIB_LEVEL, VIR_MIGRATE_PARAM_PARALLEL_ZSTD_LEVEL > for migration APIs to support set compression method > and compress level used during migration. > > Signed-off-by:

Re: [PATCH 0/3] migration: add qemu multifd migration options

2023-01-17 Thread Claudio Fontana
Hi, On 1/16/23 14:42, Jiang Jiacheng wrote: > Add qemu multifd migration options to set multifd-compression > multifd-zlib-level and multifd-zstd-level. I think what you are adding here is a new parallel compression method and parallel compression level option, and a specific implementation for

Re: [PATCH RFC 0/5] storage: Drop the sheepdog storage driver backend

2022-08-23 Thread Claudio Fontana
On 8/22/22 16:48, Peter Krempa wrote: > The sheepdog project is abandoned, with last commit in 2018. QEMU > already removed the storage backend in qemu-6.1 > > This series removes the libvirt storage driver backend. To me it looks fine as it is. Reviewed-by: Claudio Fontana > &

Re: [libvirt] [PATCH 2/2] qemu: Remove host-passthrough validation check for host-phys-bits=on

2022-08-17 Thread Claudio Fontana
On 8/17/22 10:19, Lin Ma wrote: > Besides the -cpu host, The host-phys-bits=on applies to custom or max > cpu model, So the host-passthrough validation check is unnecessary for > maxphysaddr with mode='passthrough'. > > Signed-off-by: Lin Ma > --- > src/qemu/qemu_validate.c | 7 --- > 1 file

Re: [libvirt] [PATCH 1/2] docs: Fix missing slashes in the maxphysaddr example

2022-08-17 Thread Claudio Fontana
@@ following collection of elements. :since:`Since 0.7.5` > > > > - > + > > ... > Reviewed-by: Claudio Fontana

Re: [PATCH] coding-style: Allow some use of ternary operators

2022-07-25 Thread Claudio Fontana
A common sense improvement. Reviewed-by: Claudio Fontana On 7/25/22 15:13, Michal Privoznik wrote: > While we all understand that excessive use of ternary operator > may worsen code readability (e.g. nested, multi-line expression), > there are few cases where using it actually impr

Re: [PATCH for 8.7.0 00/20] Bump minimum supported qemu version to qemu-4.2 (part 1)

2022-07-15 Thread Claudio Fontana
Hello Peter, can we retire as well support for migration_set_speed then? The "if (!bwParam)" branches with calls to qemuMonitorSetMigrationSpeed are overcomplicating qemu_migration.c and qemu_driver.c in my view. Thanks, Claudio On 7/15/22 13:44, Peter Krempa wrote: > In August Debian 10 off

Re: Some questions regarding firmware handling in the qemu driver

2022-06-10 Thread Claudio Fontana
On 6/8/22 20:22, Daniel P. Berrangé wrote: > On Wed, Jun 08, 2022 at 11:46:43AM -0600, Jim Fehlig wrote: >> On 6/8/22 10:28, Daniel P. Berrangé wrote: >>> On Wed, Jun 08, 2022 at 12:20:20PM -0400, Andrea Bolognani wrote: On Tue, Jun 07, 2022 at 02:57:17PM -0600, Jim Fehlig wrote: > Hi All,

Re: [PATCH] virsh: Check whether enough arguments was passed to iothreadset

2022-06-08 Thread Claudio Fontana
Reviewed-by: Claudio Fontana On 6/8/22 15:25, Michal Privoznik wrote: > Virsh has iothreadset command which allows setting various > attributes of IOThreads. However, when the command is called > without any arguments (besides domain and IOThread IDs), then > @params stays NULL and

Re: [libvirt RFCv11 14/33] virfile: add new API virFileDiskCopyChannel

2022-06-07 Thread Claudio Fontana
On 6/7/22 11:19, Claudio Fontana wrote: > allow interleaved parallel write to a single file, > using a record size equal to the io buffer size (1MB). > > Signed-off-by: Claudio Fontana > --- > src/util/iohelper.c | 3 + > src/

[libvirt RFCv11 14/33] virfile: add new API virFileDiskCopyChannel

2022-06-07 Thread Claudio Fontana
allow interleaved parallel write to a single file, using a record size equal to the io buffer size (1MB). Signed-off-by: Claudio Fontana --- src/util/iohelper.c | 3 + src/util/virfile.c | 151 +--- src/util/virfile.h | 2 + 3 files changed, 106

[libvirt RFCv11 16/33] qemu: saveimage: update virQEMUSaveFd struct for parallel save

2022-06-07 Thread Claudio Fontana
add nchannels to the struct and adapt the APIs slightly. Add a new API virQEMUSaveFdAddChannels to set the number of channels, which might not be known at Init time. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 10 +- src/qemu/qemu_saveimage.c | 27

[libvirt RFCv11 18/33] qemu: capabilities: add multifd to the probed migration capabilities

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Ani Sinha --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + tests

[libvirt RFCv11 21/33] qemu: migration: implement qemuMigrationSrcToFilesMultiFd for save

2022-06-07 Thread Claudio Fontana
implement a function similar to qemuMigrationSrcToFile that migrates to multiple files using QEMU multifd, and use it for VIR_DOMAIN_SAVE_PARALLEL saves. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration.c | 131 +- src/qemu/qemu_migration.h | 7

[libvirt RFCv11 27/33] libvirt: add new VIR_DOMAIN_SAVE_PARAM_PARALLEL_COMPRESSION

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 0b73ee27b6..0858d02e48 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include

[libvirt RFCv11 31/33] qemu: saveimage: implement multifd-compression in parallel save

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration.c | 17 + src/qemu/qemu_migration.h | 2 +- src/qemu/qemu_saveimage.c | 15 --- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt RFCv11 33/33] tools: add parallel-compression parameter to virsh save command

2022-06-07 Thread Claudio Fontana
this completes the save side of the parallel compression support. Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 4 tools/virsh-domain.c| 12 2 files changed, 16 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 5abb03be9a

[libvirt RFCv11 17/33] qemu: saveimage: wire up saveimage code with the multifd helper

2022-06-07 Thread Claudio Fontana
prepare to use the multifd helper. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 41 ++- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 6418114d8a..8af9b92b35 100644

[libvirt RFCv11 20/33] qemu: migration_params: add APIs to set Int and Cap

2022-06-07 Thread Claudio Fontana
similarly to qemuMigrationParamsSetULL, we need to be able to set fields from qemu_saveimage. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration_params.c | 22 ++ src/qemu/qemu_migration_params.h | 9 + 2 files changed, 31 insertions(+) diff --git a/src

[libvirt RFCv11 30/33] qemu: migration: expose qemuMigrationParamsSetString

2022-06-07 Thread Claudio Fontana
change from static to external linkage, and move the function close to the other similar ones, near qemuMigrationParamsSetULL. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration_params.c | 47 +++- src/qemu/qemu_migration_params.h | 5 2 files changed

[libvirt RFCv11 24/33] tools: add parallel parameter to virsh save command

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 11 ++- tools/virsh-domain.c| 24 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 965b89c99d..9f33b0aaef 100644 --- a/docs

[libvirt RFCv11 23/33] qemu: implement qemuSaveImageLoadMultiFd for restore

2022-06-07 Thread Claudio Fontana
use multifd to restore parallel images, if VIR_DOMAIN_SAVE_PARALLEL is enabled. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 16 +- src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_migration.h | 6 ++ src/qemu/qemu_saveimage.c | 114

[libvirt RFCv11 25/33] tools: add parallel parameter to virsh restore command

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 11 +-- tools/virsh-domain.c| 10 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 9f33b0aaef..5abb03be9a 100644 --- a/docs/manpages

[libvirt RFCv11 26/33] qemu: add migration parameter multifd-compression

2022-06-07 Thread Claudio Fontana
add it to both capabilities and migration parameters Signed-off-by: Claudio Fontana --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_migration_params.c | 2 ++ src/qemu/qemu_migration_params.h

[libvirt RFCv11 19/33] qemu: saveimage: add multifd related fields to save format

2022-06-07 Thread Claudio Fontana
add both multifd compression and number of multifd channels Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 17 + src/qemu/qemu_saveimage.h | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu

[libvirt RFCv11 32/33] qemu: saveimage: restore compressed parallel images

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index f60040ef25..d3757254a9 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src/qemu/qemu_saveimage.c @@ -708,6

[libvirt RFCv11 01/33] virfile: introduce virFileDirect APIs

2022-06-07 Thread Claudio Fontana
these functions help with allocating buffers, aligning, reading and writing files opened with O_DIRECT. Signed-off-by: Claudio Fontana --- src/libvirt_private.syms | 6 ++ src/util/virfile.c | 174 +++ src/util/virfile.h | 9 ++ 3 files

[libvirt RFCv11 13/33] qemu: add stub support for VIR_DOMAIN_SAVE_PARALLEL in restore

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 5a8d3d1309..986bbf9e58 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5869,7 +5869,8

[libvirt RFCv11 29/33] qemu: saveimage: add stub support for multifd compression parameter

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8839e0031d..52f3300c55 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2874,6 +2874,7

[libvirt RFCv11 12/33] qemu: add stub support for VIR_DOMAIN_SAVE_PARALLEL in save

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

[libvirt RFCv11 03/33] qemu: saveimage: rework image read/write to be O_DIRECT friendly

2022-06-07 Thread Claudio Fontana
: Claudio Fontana --- src/qemu/qemu_saveimage.c | 267 -- src/qemu/qemu_saveimage.h | 20 +-- 2 files changed, 182 insertions(+), 105 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 4fd4c5cfcd..276033ff6a 100644 --- a/src/qemu

[libvirt RFCv11 15/33] multifd-helper: new helper for parallel save/restore

2022-06-07 Thread Claudio Fontana
interleaved channels are used to allow reading/writing to different parts of the file depending on the channel used. Signed-off-by: Claudio Fontana --- po/POTFILES | 1 + src/util/meson.build | 16 ++ src/util/multifd-helper.c | 359 ++ 3

[libvirt RFCv11 28/33] qemu: saveimage: add parallel compression argument to ImageCreate

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 11 ++- src/qemu/qemu_saveimage.c | 1 + src/qemu/qemu_saveimage.h | 1 + src/qemu/qemu_snapshot.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt RFCv11 22/33] qemu: add parameter to qemuMigrationDstRun to skip waiting

2022-06-07 Thread Claudio Fontana
. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 8 src/qemu/qemu_migration.c | 18 ++ src/qemu/qemu_migration.h | 3 ++- src/qemu/qemu_process.c | 3 ++- src/qemu/qemu_process.h | 5 +++-- src/qemu/qemu_saveimage.c | 4 +++- src/qemu/qemu_saveimage.h

[libvirt RFCv11 06/33] qemu: saveimage: introduce virQEMUSaveFd

2022-06-07 Thread Claudio Fontana
amount of explicit cleanup required. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 115 ++ src/qemu/qemu_saveimage.h | 23 2 files changed, 138 insertions(+) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index

[libvirt RFCv11 04/33] qemu: saveimage: assume future formats will also support compression

2022-06-07 Thread Claudio Fontana
change the version check to assume even future versions of the format will continue to support compression. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c

[libvirt RFCv11 09/33] tools: prepare doSave to use parameters

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- tools/virsh-domain.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index bac4cc0fb6..120d0ef5f0 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4203,6

[libvirt RFCv11 08/33] qemu: saveimage: convert qemuSaveImageOpen to use virQEMUSaveFd

2022-06-07 Thread Claudio Fontana
all the logic to open a fd, create a wrapper etc, is boilerplate code that is best reused, so change the Open function to take an existing already initialized virQEMUSaveFd. Adapt all callers of qemuSaveImageOpen. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 101

[libvirt RFCv11 05/33] virfile: virFileDiskCopy: prepare for O_DIRECT files without wrapper

2022-06-07 Thread Claudio Fontana
we will allow to use already open fds that are not empty for both read and write, as long as they are properly aligned. Adapt the truncation to take into account the initial offset. Signed-off-by: Claudio Fontana --- src/util/virfile.c | 44 +++- 1 file

[libvirt RFCv11 02/33] virfile: use virFileDirect API in runIOCopy

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/virfile.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index e8500704e5..770649108f 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4776,20

[libvirt RFCv11 07/33] qemu: saveimage: convert qemuSaveImageCreate to use virQEMUSaveFd

2022-06-07 Thread Claudio Fontana
now that we introduced virQEMUSaveFd, use it in the creation of a new save image. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 54 +++ 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu

[libvirt RFCv11 11/33] libvirt: add new VIR_DOMAIN_SAVE_PARALLEL flag and parameter

2022-06-07 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 | 13 + 1 file changed, 13 insertions(+) diff --git a/include

[libvirt RFCv11 00/33] multifd save restore prototype

2022-06-07 Thread Claudio Fontana
* fixed the multifd-helper to work in both directions, assuming the need to listen for save, and connect for restore. * fixed a large number of bugs, and probably introduced some :-) --- Claudio Fontana (33): virfile: introduce virFileDirect APIs virfile: use virFileDirect API in run

[libvirt RFCv11 10/33] tools: prepare cmdRestore to use parameters

2022-06-07 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- tools/virsh-domain.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 120d0ef5f0..a3f007a1d2 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

Re: [libvirt PATCH] tools: add virt-qmp-proxy for proxying QMP clients to libvirt QEMU guests

2022-05-27 Thread Claudio Fontana
On 5/27/22 12:20 PM, Peter Krempa wrote: > On Fri, May 27, 2022 at 10:47:58 +0100, Daniel P. Berrangé wrote: >> Libvirt provides QMP passthrough APIs for the QEMU driver and these are >> exposed in virsh. It is not especially pleasant, however, using the raw >> QMP JSON syntax. QEMU has a tool 'qmp

Re: [PATCH 0/2] Avoid memcpy with NULL argument

2022-05-25 Thread Claudio Fontana
> > src/rpc/virkeepalive.c| 2 +- > src/rpc/virnetmessage.c | 76 ++- > src/rpc/virnetmessage.h | 2 - > src/rpc/virnetserverprogram.c | 9 + > 4 files changed, 34 insertions(+), 55 deletions(-) > Both patches seem correct to me. Reviewed-by: Claudio Fontana

[libvirt RFC 1/5] virfile: introduce virFileDirect APIs

2022-05-24 Thread Claudio Fontana
these functions help with allocating buffers, aligning, reading and writing files opened with O_DIRECT. Signed-off-by: Claudio Fontana --- src/libvirt_private.syms | 8 ++ src/util/virfile.c | 249 +++ src/util/virfile.h | 11 ++ 3 files

[libvirt RFC 5/5] virfile: virFileDiskCopy: prepare for O_DIRECT files without wrapper

2022-05-24 Thread Claudio Fontana
we will allow to use already open fds that are not empty for both read and write, as long as they are properly aligned. Adapt the truncation to take into account the initial offset. Signed-off-by: Claudio Fontana --- src/util/virfile.c | 39 +-- 1 file

[libvirt RFC 2/5] virfile: use virFileDirect API in runIOCopy

2022-05-24 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/virfile.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 03a7cdc9bf..c529598595 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4851,20

[libvirt RFC 3/5] qemu: saveimage: rework image read/write to be O_DIRECT friendly

2022-05-24 Thread Claudio Fontana
: Claudio Fontana --- src/qemu/qemu_saveimage.c | 267 -- src/qemu/qemu_saveimage.h | 20 +-- 2 files changed, 182 insertions(+), 105 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 4fd4c5cfcd..7262c598f8 100644 --- a/src/qemu

[libvirt RFC 4/5] qemu: saveimage: assume future formats will also support compression

2022-05-24 Thread Claudio Fontana
change the version check to assume even future versions of the format will continue to support compression. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c

[libvirt RFC 0/5] introduce virFileDirect API for block-friendly read/write

2022-05-24 Thread Claudio Fontana
O_DIRECT friendly. This series is also available at: https://gitlab.com/hw-claudio/libvirt.git "directio" Gitlab successful pipeline is at: https://gitlab.com/hw-claudio/libvirt/-/pipelines/546635704 Thank you for your feedback, Claudio Claudio Fontana (5): virfile: introduce virFileD

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-17 Thread Claudio Fontana
On 5/11/22 2:02 PM, Daniel P. Berrangé wrote: > On Wed, May 11, 2022 at 01:52:05PM +0200, Claudio Fontana wrote: >> On 5/11/22 11:51 AM, Daniel P. Berrangé wrote: >>> On Wed, May 11, 2022 at 09:26:10AM +0200, Claudio Fontana wrote: >>>> Hi Daniel, >>>> >

[libvirt RFCv10 01/32] virfile: introduce virFileDirect APIs

2022-05-15 Thread Claudio Fontana
these functions help with allocating buffers, aligning, reading and writing files opened with O_DIRECT. Signed-off-by: Claudio Fontana --- src/libvirt_private.syms | 8 ++ src/util/virfile.c | 249 +++ src/util/virfile.h | 11 ++ 3 files

[libvirt RFCv10 32/32] tools: add parallel-compression parameter to virsh save command

2022-05-15 Thread Claudio Fontana
this completes the save side of the parallel compression support. Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 4 tools/virsh-domain.c| 12 2 files changed, 16 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index dee748d870

[libvirt RFCv10 30/32] qemu: saveimage: implement multifd-compression in parallel save

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration.c | 17 + src/qemu/qemu_migration.h | 2 +- src/qemu/qemu_saveimage.c | 19 ++- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index

[libvirt RFCv10 09/32] tools: prepare doSave to use parameters

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- tools/virsh-domain.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index ba492e807e..8204d44dcd 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -4203,6

[libvirt RFCv10 27/32] qemu: saveimage: add parallel compression argument to ImageCreate

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 11 ++- src/qemu/qemu_saveimage.c | 1 + src/qemu/qemu_saveimage.h | 1 + src/qemu/qemu_snapshot.c | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c

[libvirt RFCv10 13/32] qemu: add stub support for VIR_DOMAIN_SAVE_PARALLEL in restore

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4114d8919b..d071df1c81 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5855,7 +5855,8

[libvirt RFCv10 19/32] qemu: migration_params: add APIs to set Int and Cap

2022-05-15 Thread Claudio Fontana
similarly to qemuMigrationParamsSetULL, we need to be able to set fields from qemu_saveimage. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration_params.c | 22 ++ src/qemu/qemu_migration_params.h | 9 + 2 files changed, 31 insertions(+) diff --git a/src

[libvirt RFCv10 08/32] qemu: saveimage: convert qemuSaveImageOpen to use virQEMUSaveFd

2022-05-15 Thread Claudio Fontana
all the logic to open a fd, create a wrapper etc, is boilerplate code that is best reused, so change the Open function to take an existing already initialized virQEMUSaveFd. Adapt all callers of qemuSaveImageOpen. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 101

[libvirt RFCv10 14/32] multifd-helper: new helper for parallel save/restore

2022-05-15 Thread Claudio Fontana
. Signed-off-by: Claudio Fontana --- po/POTFILES.in| 1 + src/libvirt_private.syms | 1 + src/util/meson.build | 16 +++ src/util/multifd-helper.c | 247 ++ src/util/virthread.c | 5 + src/util/virthread.h | 1 + 6 files changed

[libvirt RFCv10 24/32] tools: add parallel parameter to virsh restore command

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- docs/manpages/virsh.rst | 12 ++-- tools/virsh-domain.c| 10 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index e9012b85d1..dee748d870 100644 --- a/docs/manpages

[libvirt RFCv10 31/32] qemu: saveimage: restore compressed parallel images

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 17 + 1 file changed, 17 insertions(+) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c index 96330430e5..669e6eb97f 100644 --- a/src/qemu/qemu_saveimage.c +++ b/src/qemu/qemu_saveimage.c @@ -798,6

[libvirt RFCv10 25/32] qemu: add migration parameter multifd-compression

2022-05-15 Thread Claudio Fontana
add it to both capabilities and migration parameters Signed-off-by: Claudio Fontana --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_migration_params.c | 2 ++ src/qemu/qemu_migration_params.h

[libvirt RFCv10 23/32] tools: add parallel parameter to virsh save command

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

[libvirt RFCv10 29/32] qemu: migration: expose qemuMigrationParamsSetString

2022-05-15 Thread Claudio Fontana
change from static to external linkage, and move the function close to the other similar ones, near qemuMigrationParamsSetULL. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration_params.c | 47 +++- src/qemu/qemu_migration_params.h | 5 2 files changed

[libvirt RFCv10 20/32] qemu: migration: implement qemuMigrationSrcToFilesMultiFd for save

2022-05-15 Thread Claudio Fontana
implement a function similar to qemuMigrationSrcToFile that migrates to multiple files using QEMU multifd, and use it for VIR_DOMAIN_SAVE_PARALLEL saves. Signed-off-by: Claudio Fontana --- src/qemu/qemu_migration.c | 131 +- src/qemu/qemu_migration.h | 7

[libvirt RFCv10 17/32] qemu: capabilities: add multifd to the probed migration capabilities

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Ani Sinha --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.0.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 + tests

[libvirt RFCv10 00/32] multifd save restore prototype

2022-05-15 Thread Claudio Fontana
ber of bugs, and probably introduced some :-) --- Claudio Fontana (32): virfile: introduce virFileDirect APIs virfile: use virFileDirect API in runIOCopy qemu: saveimage: rework image read/write to be O_DIRECT friendly qemu: saveimage: assume future formats will also support compress

[libvirt RFCv10 26/32] libvirt: add new VIR_DOMAIN_SAVE_PARAM_PARALLEL_COMPRESSION

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- include/libvirt/libvirt-domain.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h index 766e4d116e..c79a3c85e9 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include

[libvirt RFCv10 21/32] qemu: add parameter to qemuMigrationDstRun to skip waiting

2022-05-15 Thread Claudio Fontana
. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 8 src/qemu/qemu_migration.c | 18 ++ src/qemu/qemu_migration.h | 3 ++- src/qemu/qemu_process.c | 3 ++- src/qemu/qemu_process.h | 5 +++-- src/qemu/qemu_saveimage.c | 4 +++- src/qemu/qemu_saveimage.h

[libvirt RFCv10 18/32] qemu: saveimage: add multifd related fields to save format

2022-05-15 Thread Claudio Fontana
add both multifd compression and number of multifd channels Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 17 + src/qemu/qemu_saveimage.h | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu

[libvirt RFCv10 22/32] qemu: implement qemuSaveImageLoadMultiFd for restore

2022-05-15 Thread Claudio Fontana
use multifd to restore parallel images, if VIR_DOMAIN_SAVE_PARALLEL is enabled. Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c| 16 - src/qemu/qemu_migration.c | 2 +- src/qemu/qemu_migration.h | 6 ++ src/qemu/qemu_saveimage.c | 119

[libvirt RFCv10 10/32] tools: prepare cmdRestore to use parameters

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- tools/virsh-domain.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 8204d44dcd..8a3c9d53d4 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c

[libvirt RFCv10 07/32] qemu: saveimage: convert qemuSaveImageCreate to use virQEMUSaveFd

2022-05-15 Thread Claudio Fontana
now that we introduced virQEMUSaveFd, use it in the creation of a new save image. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 54 +++ 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu

[libvirt RFCv10 11/32] libvirt: add new VIR_DOMAIN_SAVE_PARALLEL flag and parameter

2022-05-15 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 a

[libvirt RFCv10 28/32] qemu: saveimage: add stub support for multifd compression parameter

2022-05-15 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/qemu/qemu_driver.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 6ea23ee187..faaa6d4243 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2865,6 +2865,7

  1   2   3   4   5   >