Re: [PATCH 4/4] crypto: add tracing & warning about GNUTLS countermeasures

2025-07-21 Thread Fabiano Rosas
Daniel P. Berrangé writes: > We want some visibility on stderr when the GNUTLS thread > safety countermeasures are activated, to encourage people > to get the real fix deployed (once it exists). Some trace > points will also help if we see any further wierd crash > scenario we've not anticipated.

Re: [PATCH 1/4] crypto: implement workaround for GNUTLS thread safety problems

2025-07-21 Thread Fabiano Rosas
Daniel P. Berrangé writes: > When TLS 1.3 is negotiated on a TLS session, GNUTLS will perform > automatic rekeying of the session after 16 million records. This > is done for all algorithms except CHACHA20_POLY1305 which does > not require rekeying. > > Unfortunately the rekeying breaks GNUTLS' p

Re: [PATCH 0/4] migration: workaround GNUTLS live migration crashes

2025-07-21 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Mon, Jul 21, 2025 at 11:56:09AM -0300, Fabiano Rosas wrote: >> Daniel P. Berrangé writes: >> >> > TL:DR: GNUTLS is liable to crash QEMU when live migration is run >> > with TLS enabled and a return path channel is present

Re: [PATCH 0/4] migration: workaround GNUTLS live migration crashes

2025-07-21 Thread Fabiano Rosas
Daniel P. Berrangé writes: > TL:DR: GNUTLS is liable to crash QEMU when live migration is run > with TLS enabled and a return path channel is present, if approx > 64 GB of data is transferred. This is easily triggered in a 16 GB > VM with 4 CPUs, by running 'stress-ng --vm 4 --vm-bytes 80%' to >

Re: [PATCH 4/4] crypto: add tracing & warning about GNUTLS countermeasures

2025-07-21 Thread Fabiano Rosas
7;ve not anticipated. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH 3/4] migration: activate TLS thread safety workaround

2025-07-21 Thread Fabiano Rosas
ing concurrent I/O > in order to activate the thread safety workarounds for > GNUTLS bug 1717 > > Closes: https://gitlab.com/qemu-project/qemu/-/issues/1937 > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH 2/4] io: add support for activating TLS thread safety workaround

2025-07-21 Thread Fabiano Rosas
gned-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH 1/4] crypto: implement workaround for GNUTLS thread safety problems

2025-07-21 Thread Fabiano Rosas
ration > code also won't trigger the halving of performance, since only > the outbound channel diretion needs to sustain high data rates, > the inbound direction is low volume. > > Signed-off-by: Daniel P. Berrangé Reviewed-by: Fabiano Rosas

Re: [PATCH] migration: show error message when postcopy fails

2025-07-21 Thread Fabiano Rosas
rationStatus_str(info->status)); > -if (info->status == MIGRATION_STATUS_FAILED && info->error_desc) { > +if ((info->status == MIGRATION_STATUS_FAILED || > + info->status == MIGRATION_STATUS_POSTCOPY_PAUSED) && > info->error_des

Re: [PATCH v2 0/3] migration: Fix possible access out of bounds

2025-07-21 Thread Fabiano Rosas
Fabiano Rosas writes: > Fix the issue detected by Coverity in format_time_str() and move > the function into the generic utils as suggested. > > v2: > - Fix the incorrect loop condition. > - Make the array static and fix argument name in signature. > > Fabiano Rosas (3):

Re: [PATCH 1/2] migration: Fix postcopy latency distribution formatting computation

2025-07-17 Thread Fabiano Rosas
Prasad Pandit writes: > On Wed, 16 Jul 2025 at 19:06, Fabiano Rosas wrote: >> The condition should be >=. > > * I'm thinking of doing away with the loop and the string array. The > array has 3 values of which only one gets used due to conversion to > seconds. T

Re: [PATCH v4 00/23] migration: propagate vTPM errors using Error objects

2025-07-17 Thread Fabiano Rosas
Arun Menon writes: > Hi Fabiano, > > Thanks for the quick review and for catching the make check failure. > My apologies for that oversight, it's definitely an embarrassing miss on my > part. That's ok, you don't do this every day. =) > I see what happened there. I ran make check without sud

Re: [PATCH v4 00/23] migration: propagate vTPM errors using Error objects

2025-07-16 Thread Fabiano Rosas
Arun Menon writes: > Hello, > > Currently, when a migration of a VM with an encrypted vTPM > fails on the destination host (e.g., due to a mismatch in secret values), > the error message displayed on the source host is generic and unhelpful. > > For example, a typical error looks like this: > "op

[PATCH v2 2/3] migration: HMP: Fix postcopy latency distribution label

2025-07-16 Thread Fabiano Rosas
Fix the loop condition to avoid having a label with "1000 us" instead of "1 ms". Reported-by: Prasad Pandit Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration-hmp-cmds.c b

[PATCH v2 0/3] migration: Fix possible access out of bounds

2025-07-16 Thread Fabiano Rosas
Fix the issue detected by Coverity in format_time_str() and move the function into the generic utils as suggested. v2: - Fix the incorrect loop condition. - Make the array static and fix argument name in signature. Fabiano Rosas (3): migration: HMP: Fix possible out-of-bounds access

[PATCH v2 3/3] cutils: Add time_us_to_str

2025-07-16 Thread Fabiano Rosas
The migration code has a function that converts a time value (us) to a string with the proper suffix. Move it to cutils since it's generic enough that it could be reused. Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas --- include

[PATCH v2 1/3] migration: HMP: Fix possible out-of-bounds access

2025-07-16 Thread Fabiano Rosas
"migration/postcopy: Add latency distribution report for blocktime") Resolves: Coverity CID 1612248 Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 6 ++ 1 file changed, 2 insertions(+), 4 deleti

Re: [PATCH 1/2] migration: Fix postcopy latency distribution formatting computation

2025-07-16 Thread Fabiano Rosas
Prasad Pandit writes: > On Tue, 15 Jul 2025 at 18:49, Fabiano Rosas wrote: >> @@ -57,11 +57,9 @@ static const gchar *format_time_str(uint64_t us) >> const char *units[] = {"us", "ms", "sec"}; >> int index = 0; >> >>

[PATCH 2/2] cutils: Add time_us_to_str

2025-07-15 Thread Fabiano Rosas
The migration code has a function that converts a time value (us) to a string with the proper suffix. Move it to cutils since it's generic enough that it could be reused. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas --- include/qemu/cutils.h | 1 + migr

[PATCH 1/2] migration: Fix postcopy latency distribution formatting computation

2025-07-15 Thread Fabiano Rosas
"migration/postcopy: Add latency distribution report for blocktime") Resolves: Coverity CID 1612248 Suggested-by: Peter Maydell Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/migration/migration-hm

[PATCH 0/2] migration: Fix possible access out of bounds

2025-07-15 Thread Fabiano Rosas
Fix the issue detected by Coverity in format_time_str() and move the function into the generic utils as suggested. Fabiano Rosas (2): migration: Fix postcopy latency distribution formatting computation cutils: Add time_us_to_str include/qemu/cutils.h | 1 + migration/migration-hmp

Re: [PULL 25/26] migration/postcopy: Add latency distribution report for blocktime

2025-07-14 Thread Fabiano Rosas
Peter Maydell writes: > On Fri, 11 Jul 2025 at 15:20, Fabiano Rosas wrote: >> >> From: Peter Xu >> >> Add the latency distribution too for blocktime, using order-of-two buckets. >> It accounts for all the faults, from either vCPU or non-vCPU threads. With &

[PULL 25/26] migration/postcopy: Add latency distribution report for blocktime

2025-07-11 Thread Fabiano Rosas
0 [4 sec -8 sec ]: 0 [8 sec - 16 sec ]: 0 Cc: Markus Armbruster Acked-by: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-15-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fab

[PULL 26/26] migration: Rename save_live_complete_precopy_thread to save_complete_precopy_thread

2025-07-11 Thread Fabiano Rosas
amson Cc: Cédric Le Goater Signed-off-by: Juraj Marcin Link: https://lore.kernel.org/r/20250626085235.294690-1-jmar...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- docs/devel/migration/vfio.rst| 4 ++-- hw/vfio/migration-multifd.c | 4 ++-- hw/vfio/migration

[PULL 24/26] migration/postcopy: blocktime allows track / report non-vCPU faults

2025-07-11 Thread Fabiano Rosas
ault will be resolved". Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas Tested-by: Mario Casquero Link: https://lore.kernel.org/r/20250613141217.474825-14-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c

[PULL 12/26] migration: Add option to set postcopy-blocktime

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Add a global property to allow enabling postcopy-blocktime feature. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-2-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/options.c | 2 ++ 1 file changed, 2

[PULL 20/26] migration/postcopy: Initialize blocktime context only until listen

2025-07-11 Thread Fabiano Rosas
the ctx isn't created instead this time; the old "if" trick isn't needed when we're sure it will only happen once now. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-10-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Ros

[PULL 22/26] migration/postcopy: Cleanup the total blocktime accounting

2025-07-11 Thread Fabiano Rosas
cessary to have the variable at all: since nobody is touching smp_cpus_down except ourselves, we can safely do the calculation at the end before decrementing smp_cpus_down. Hopefully this makes the logic easier to read, side benefit is we drop one temp var. Reviewed-by: Fabiano Rosas L

[PULL 18/26] migration/postcopy: Add blocktime fault counts per-vcpu

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Add a field to count how many remote faults one vCPU has taken. So far it's still not used, but will be soon. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-8-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano

[PULL 19/26] migration/postcopy: Report fault latencies in blocktime

2025-07-11 Thread Fabiano Rosas
remote fault. Unwrap get_vcpu_blocktime_list() so we don't need to walk the list twice, meanwhile add the entry checks in qtests for all postcopy tests. Cc: Markus Armbruster Cc: Dr. David Alan Gilbert Reviewed-by: Fabiano Rosas Tested-by: Mario Casquero Link: https://lore.kernel.

[PULL 23/26] migration/postcopy: Optimize blocktime fault tracking with hashtable

2025-07-11 Thread Fabiano Rosas
htly more useful. One tracepoint is added when walking all the fault entries. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-13-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/postcopy-ram.c | 265 +++

[PULL 08/26] migration/ram: One less indent for ram_find_and_save_block()

2025-07-11 Thread Fabiano Rosas
From: Peter Xu The check over PAGE_DIRTY_FOUND isn't necessary. We could indent one less and assert that instead. Reviewed-by: Juraj Marcin Link: https://lore.kernel.org/r/20250613140801.474264-9-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c

[PULL 09/26] migration/ram: Add tracepoints for ram_save_complete()

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Take notes on start/end state of dirty pages for the whole system. Reviewed-by: Juraj Marcin Link: https://lore.kernel.org/r/20250613140801.474264-10-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/ram.c| 5 + migration/trace

[PULL 11/26] migration/postcopy: Avoid clearing dirty bitmap for postcopy too

2025-07-11 Thread Fabiano Rosas
copy phase with this optimization: Before: 268.00us (+-1.87%) After: 232.67us (+-2.01%) The test was done with a 16GB VM with 80 vCPUs, running a workload that busy random writes to 13GB memory. Cc: Yanfei Xu Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613140801.474

[PULL 15/26] migration/postcopy: Make all blocktime vars 64bits

2025-07-11 Thread Fabiano Rosas
e to vcpu_blocktime_start. - Rename vcpu_blocktime to vcpu_blocktime_total. - Touch up the trace-events to not dump blocktime ctx pointer Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-5-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas ---

[PULL 21/26] migration/postcopy: Cache the tid->vcpu mapping for blocktime

2025-07-11 Thread Fabiano Rosas
n thread can also access a guest page that was missing. These kind of faults are not accounted by blocktime so far. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-11-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/postcopy-ra

[PULL 06/26] migration: Rename save_live_complete_precopy to save_complete

2025-07-11 Thread Fabiano Rosas
change intended. Reviewed-by: Juraj Marcin Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613140801.474264-7-pet...@redhat.com [peterx: squash the fixup that covers a few more doc spots, per Juraj] Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- docs/devel/migration

[PULL 13/26] migration/postcopy: Push blocktime start/end into page req mutex

2025-07-11 Thread Fabiano Rosas
in blocktime layer. Note that we need a stub for mark_postcopy_blocktime_begin() for Windows builds. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-3-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/mig

[PULL 14/26] migration/postcopy: Drop all atomic ops in blocktime feature

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Now with the mutex protection it's not needed anymore. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825-4-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/postcopy-ram.c | 23 ++- 1

[PULL 16/26] migration/postcopy: Drop PostcopyBlocktimeContext.start_time

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Now with 64bits, the offseting using start_time is not needed anymore, because the array can always remember the whole timestamp. Then drop the unused parameter in get_low_time_offset() altogether. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613141217.474825

[PULL 10/26] migration: Rewrite the migration complete detect logic

2025-07-11 Thread Fabiano Rosas
ffernt use cases (precopy v.s. postcopy). (4) Trivial touch up on threshold_size comparision Which changes: "(!pending_size || pending_size < s->threshold_size)" into: "(pending_size <= s->threshold_size)" Reviewed-by: Juraj Marcin

[PULL 17/26] migration/postcopy: Bring blocktime layer to ns level

2025-07-11 Thread Fabiano Rosas
From: Peter Xu With 64-bit fields, it is trivial. The caution is when exposing any values in QMP, it was still declared with milliseconds (ms). Hence it's needed to do the convertion when exporting the values to existing QMP queries. Reviewed-by: Fabiano Rosas Link: https://lore.kernel.

[PULL 01/26] migration/hmp: Reorg "info migrate" once more

2025-07-11 Thread Fabiano Rosas
ted-by: Dr. David Alan Gilbert Tested-by: Li Zhijian Reviewed-by: Li Zhijian Acked-by: Dr. David Alan Gilbert Reviewed-by: Juraj Marcin Tested-by: Mario Casquero Link: https://lore.kernel.org/r/20250613140801.474264-2-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Ro

[PULL 05/26] migration: Drop save_live_complete_postcopy hook

2025-07-11 Thread Fabiano Rosas
Juraj Marcin Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613140801.474264-6-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- include/migration/register.h | 24 migration/block-dirty-bitmap.c | 1 - migration/ram.c

[PULL 04/26] migration/bg-snapshot: Do not check for SKIP in iterator

2025-07-11 Thread Fabiano Rosas
From: Peter Xu It's not possible to happen in bg-snapshot case. Reviewed-by: Juraj Marcin Link: https://lore.kernel.org/r/20250613140801.474264-5-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 5 ++--- 1 file changed, 2 insertions(

[PULL 03/26] migration/docs: Move docs for postcopy blocktime feature

2025-07-11 Thread Fabiano Rosas
https://lore.kernel.org/r/20250613140801.474264-4-pet...@redhat.com Signed-off-by: Peter Xu Signed-off-by: Fabiano Rosas --- docs/devel/migration/postcopy.rst | 36 +++ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/docs/devel/migration/postcopy.rst b/docs/

[PULL 02/26] migration/hmp: Fix postcopy-blocktime per-vCPU results

2025-07-11 Thread Fabiano Rosas
33, 37, 45, 52, 50, 38, 40, 37, 40, 49, 40, 35, 35, 35, 81, 19, 18, 19, 18, 30, 22, 3, 0, 0, 0, 0, 0, 0, 0, 0] Cc: Dr. David Alan Gilbert Cc: Alexey Perevalov Cc: Markus Armbruster Tested-by: Mario Casquero Reviewed-by: Juraj Marcin Reviewed-by: Fabiano Rosas Link: https://lore.ke

[PULL 00/26] Migration patches for 2025-07-11

2025-07-11 Thread Fabiano Rosas
The following changes since commit df6fe2abf2e990f767ce755d426bc439c7bba336: Merge tag 'pull-target-arm-20250704' of https://gitlab.com/pm215/qemu into staging (2025-07-07 09:22:41 -0400) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/migration-20250711-pul

[PULL 07/26] migration: qemu_savevm_complete*() helpers

2025-07-11 Thread Fabiano Rosas
From: Peter Xu Since we use the same save_complete() hook for both precopy and postcopy, add a set of helpers to invoke the hook() to dedup the code. Reviewed-by: Juraj Marcin Reviewed-by: Fabiano Rosas Link: https://lore.kernel.org/r/20250613140801.474264-8-pet...@redhat.com Signed-off-by

Re: [PATCH V3 3/3] tests/qtest/qom-test: unit test for qom-list-getv

2025-07-08 Thread Fabiano Rosas
Steve Sistare writes: > Add a unit test for qom-list-getv. > > Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas

Re: [PATCH v2 16/24] migration: Add capabilities into MigrationParameters

2025-07-04 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Markus Armbruster writes: >> >>> Fabiano Rosas writes: >>> >>>> Add capabilities to MigrationParameters. This structure will hold all >>>> migration options. Capabilities will g

Re: [PATCH v2 16/24] migration: Add capabilities into MigrationParameters

2025-07-04 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Add capabilities to MigrationParameters. This structure will hold all >> migration options. Capabilities will go away in the next patch. >> >> Also add capabilities to MigrationParameter as the enum ne

Re: [PATCH v2 03/24] migration: Normalize tls arguments

2025-07-04 Thread Fabiano Rosas
Fabiano Rosas writes: > Markus Armbruster writes: > >> Fabiano Rosas writes: >> ... >>> diff --git a/migration/options.c b/migration/options.c >>> index 384ef9e421..f7bbdba5fc 100644 >>> --- a/migration/options.c >>> +++ b/mi

Re: [PATCH v2 02/24] migration: Add a qdev property for StrOrNull

2025-07-04 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Jul 01, 2025 at 08:38:19AM +0200, Markus Armbruster wrote: >> Fabiano Rosas writes: >> >> > The MigrationState is a QOM object with TYPE_DEVICE as a parent. This >> > was done about eight years ago so the migration code could ma

Re: [PATCH v2 04/24] migration: Remove MigrateSetParameters

2025-07-03 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Now that the TLS options have been made the same between >> migrate-set-parameters and query-migrate-parameters, a single type can >> be used. Remove MigrateSetParameters. >> >> The TLS options documen

Re: [PATCH v4 48/65] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine

2025-07-02 Thread Fabiano Rosas
Philippe Mathieu-Daudé writes: > By converting to AccelOpsClass::cpu_thread_routine we can > let the common accel_create_vcpu_thread() create the thread. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson Acked-by: Fabiano Rosas

Re: [PATCH V5 38/38] vfio: doc changes for cpr

2025-07-02 Thread Fabiano Rosas
nned pages are also preserved for VFIO and > +# IOMMUFD. (since 10.1) > # > # The user starts new QEMU on the same host as old QEMU, with > # command-line arguments to create the same machine, plus the Reviewed-by: Fabiano Rosas

Re: [PATCH 2/3] vfio/migration: Add x-migration-load-config-after-iter VFIO property

2025-07-01 Thread Fabiano Rosas
nterrupt controller being loaded first. > > The property defaults to AUTO, which means ON for ARM, OFF for other > platforms. > > Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabiano Rosas

Re: [PATCH 3/3] vfio/migration: Add also max in-flight VFIO device state buffers size limit

2025-07-01 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > There's already a max in-flight VFIO device state buffers *count* limit, > add also max queued buffers *size* limit. > > Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabiano Rosas

Re: [PATCH 1/3] vfio/migration: Max in-flight VFIO device state buffer count limit

2025-07-01 Thread Fabiano Rosas
ted amounts of memory > for buffers-in-flight. > > Since this is not expected to be a realistic threat in most of VFIO live > migration use cases and the right value depends on the particular setup > disable the limit by default by setting it to UINT64_MAX. > > Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabiano Rosas

Re: [PATCH v2 10/11] migration: Rewrite the migration complete detect logic

2025-07-01 Thread Fabiano Rosas
differnt use cases (precopy v.s. postcopy). > > (4) Trivial touch up on threshold_size comparision > > Which changes: > > "(!pending_size || pending_size < s->threshold_size)" > > into: > > "(pending_size <= s->threshold_size)" > > Reviewed-by: Juraj Marcin > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH V5 20/38] migration: close kvm after cpr

2025-07-01 Thread Fabiano Rosas
ld QEMU process. Close them. > > Cc: Paolo Bonzini > Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas

Re: [PATCH v2 07/11] migration: qemu_savevm_complete*() helpers

2025-07-01 Thread Fabiano Rosas
Peter Xu writes: > Since we use the same save_complete() hook for both precopy and postcopy, > add a set of helpers to invoke the hook() to dedup the code. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 06/11] migration: Rename save_live_complete_precopy to save_complete

2025-07-01 Thread Fabiano Rosas
g (in precopy). > > No functional change intended. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 05/11] migration: Drop save_live_complete_postcopy hook

2025-07-01 Thread Fabiano Rosas
ge intended. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 02/11] migration/hmp: Fix postcopy-blocktime per-vCPU results

2025-07-01 Thread Fabiano Rosas
Postcopy vCPU Blocktime (ms): >[15, 0, 0, 43, 29, 34, 36, 29, 37, 41, > 33, 37, 45, 52, 50, 38, 40, 37, 40, 49, > 40, 35, 35, 35, 81, 19, 18, 19, 18, 30, > 22, 3, 0, 0, 0, 0, 0, 0, 0, 0] > > Cc: Dr. David Alan Gilbert > Cc: Alexey Perevalov > Cc: Markus Armbruster > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 03/24] migration: Normalize tls arguments

2025-07-01 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> The migration parameters tls_creds, tls_authz and tls_hostname >> currently have a non-uniform handling. When used as arguments to >> migrate-set-parameters, their type is StrOrNull and when used as >> r

[PATCH v2 22/24] tests/qtest/migration: Adapt the capabilities helper to take a config

2025-06-30 Thread Fabiano Rosas
Allow migrate_start_set_capabilities() to set the config object instead of setting the capabilities via calls to migrate-set-capabilities. Signed-off-by: Fabiano Rosas --- tests/qtest/migration/framework.c | 31 +++ tests/qtest/migration/framework.h | 1 + 2 files

[PATCH v2 24/24] tests/qtest/migration: Pass the migration config to file tests

2025-06-30 Thread Fabiano Rosas
Use the existing file tests to test the new way of passing parameters to the migration via the config argument to qmp_migrate*. Signed-off-by: Fabiano Rosas --- tests/qtest/migration/file-tests.c| 68 +++ tests/qtest/migration/framework.c | 9 ++-- tests/qtest

[PATCH v2 23/24] tests/qtest/migration: Adapt convergence routines to config

2025-06-30 Thread Fabiano Rosas
Adapt the convergence routines migrate_ensure_[non_]converge to receive a config argument and set the convergence parameters in it instead of using migrate-set-parameters. Signed-off-by: Fabiano Rosas --- tests/qtest/migration/framework.c | 10 +- tests/qtest/migration/migration

[PATCH v2 21/24] tests/qtest/migration: Take reference when passing %p to qtest_qmp

2025-06-30 Thread Fabiano Rosas
The documentation of qobject_from_jsonv() states that it takes ownership of any %p arguments passed in. Next patches will add config-passing to the tests, so take an extra reference in the migrate_qmp* functions to ensure the config is not freed from under us. Signed-off-by: Fabiano Rosas

[PATCH v2 14/24] migration: Use visitors in migrate_params_test_apply

2025-06-30 Thread Fabiano Rosas
d. An extra call to migrate_mark_all_params_present() is now needed because the visitors update the has_ field for non-present fields, but we actually want them all set so migrate_params_apply() can copy all of them. Signed-off-by: Fabiano Rosas --- migration/options.c | 157 +++

[PATCH v2 12/24] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply

2025-06-30 Thread Fabiano Rosas
Use QAPI_CLONE_MEMBERS instead of making an assignment. The QAPI method makes the handling of the TLS strings more intuitive because it clones them as well. Signed-off-by: Fabiano Rosas --- migration/options.c | 25 + 1 file changed, 13 insertions(+), 12 deletions

[PATCH v2 09/24] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE

2025-06-30 Thread Fabiano Rosas
The QERR_INVALID_PARAMETER_VALUE macro is documented as not to be used in new code. Remove the usage from migration/options.c. Signed-off-by: Fabiano Rosas --- migration/migration.c | 3 +-- migration/options.c| 56 +++--- migration/page_cache.c | 6

[PATCH v2 05/24] qapi/migration: Don't document MigrationParameter

2025-06-30 Thread Fabiano Rosas
tween MigrationParameter and MigrationParameters. Add an exception to QAPIs pragma.json and stop documenting it. Signed-off-by: Fabiano Rosas --- qapi/migration.json | 153 +--- qapi/pragma.json| 1 + 2 files changed, 3 insertions(+), 151 deletions(-) diff --git a

[PATCH v2 10/24] migration: Extract code to mark all parameters as present

2025-06-30 Thread Fabiano Rosas
x27;s output if it has never been set. CC: Kevin Wolf Signed-off-by: Fabiano Rosas --- migration/options.c | 87 - 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/migration/options.c b/migration/options.c index 7a6a7d4ee5..df9f0bd812 1

[PATCH v2 17/24] migration: Remove s->capabilities

2025-06-30 Thread Fabiano Rosas
in the last patch to do validation of capabilities found on the migration stream. Signed-off-by: Fabiano Rosas --- migration/migration.c | 22 +--- migration/migration.h | 1 - migration/options.c | 284 ++ migration/options.h | 19 +-- migration

[PATCH v2 16/24] migration: Add capabilities into MigrationParameters

2025-06-30 Thread Fabiano Rosas
ery-migrate-capabilities, migrate-set-capabilities) will soon be deprecated. Add a set of helpers to convert between the old MigrationCapability representation and the new representation as members of MigrationParameters. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c |

[PATCH v2 20/24] migration: Allow migrate commands to provide the migration config

2025-06-30 Thread Fabiano Rosas
bal migration cmdline > migrate-set-parameters > defaults (migration_properties) I.e. the config takes precedence over all, values not present in the config assume the default values. The -global migration command line option allows the defaults to be overridden for debug. Signed-of

[PATCH v2 04/24] migration: Remove MigrateSetParameters

2025-06-30 Thread Fabiano Rosas
complete. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 4 +- migration/options.c| 6 +- qapi/migration.json| 232 +++-- 3 files changed, 24 insertions(+), 218 deletions(-) diff --git a/migration/migration-hmp-cmds.c b

[PATCH v2 07/24] migration: Add a flag to track block-bitmap-mapping input

2025-06-30 Thread Fabiano Rosas
. (this was verified to not regress iotest 300, which is the test that 3cba22c9ad refers to) CC: Kevin Wolf Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 3 ++- migration/migration.h | 7 +++ migration/options.c| 6 +++--- 3 files changed, 12 in

[PATCH v2 13/24] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply

2025-06-30 Thread Fabiano Rosas
added. Signed-off-by: Fabiano Rosas --- migration/options.c | 123 +++- 1 file changed, 7 insertions(+), 116 deletions(-) diff --git a/migration/options.c b/migration/options.c index 4564db77f2..6619b5f21a 100644 --- a/migration/options.c +++ b/migration

[PATCH v2 19/24] migration: Store the initial values used for s->parameters

2025-06-30 Thread Fabiano Rosas
not changed by accident. Some functions take two MigrationParameters pointers and it's easy to confuse them. Signed-off-by: Fabiano Rosas --- migration/migration.c | 3 +++ migration/migration.h | 6 ++ migration/options.c | 21 + migration/options.h | 7 ++

[PATCH v2 18/24] qapi/migration: Deprecate capabilities commands

2025-06-30 Thread Fabiano Rosas
The concept of capabilities is being merged into the concept of parameters. From now on, the commands that handle capabilities are deprecated in favor of the commands that handle parameters. Affected commands: - migrate-set-capabilities - query-migrate-capabilities Signed-off-by: Fabiano Rosas

[PATCH v2 03/24] migration: Normalize tls arguments

2025-06-30 Thread Fabiano Rosas
n the next patches. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 7 +- migration/options.c| 156 - migration/options.h| 1 + migration/tls.c| 2 +- qapi/migration.json| 6 +- 5 fi

[PATCH v2 08/24] migration: Remove checks for s->parameters has_* fields

2025-06-30 Thread Fabiano Rosas
ructure for validation still needs to look at the has_* fields, otherwise any parameters not set by the user (i.e. 0) would override the corresponding value in s->parameters. The empty migrate_params_init() will be kept because subsequent patches will add code to it. Signed-off-by:

[PATCH v2 11/24] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-30 Thread Fabiano Rosas
set beforehand, so move migrate_mark_all_params_present() to the init routine. Signed-off-by: Fabiano Rosas --- migration/options.c | 41 +++-- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/migration/options.c b/migration/options.c index df9f0bd

[PATCH v2 15/24] migration: Cleanup hmp_info_migrate_parameters

2025-06-30 Thread Fabiano Rosas
never returns NULL. - Add a macro to encapsulate boilerplate. - Line breaks for legibility. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 277 ++--- 1 file changed, 155 insertions(+), 122 deletions(-) diff --git a/migration/migration-hmp-cmds.c b

[PATCH v2 06/24] migration: Run a post update routine after setting parameters

2025-06-30 Thread Fabiano Rosas
-by: Fabiano Rosas --- migration/options.c | 38 -- migration/ram.c | 2 +- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/migration/options.c b/migration/options.c index 295367ce92..1f8a977865 100644 --- a/migration/options.c +++ b/migrat

[PATCH v2 01/24] migration: Fix leak of block_bitmap_mapping

2025-06-30 Thread Fabiano Rosas
-commands-migration.c:214:5 #10 in do_qmp_dispatch_bh ../qapi/qmp-dispatch.c:128:5 Signed-off-by: Fabiano Rosas --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index 4098870bce..7ec60d97f9 100644 --- a/migration/migration.c

[PATCH v2 00/24] migration: Unify capabilities and parameters

2025-06-30 Thread Fabiano Rosas
fsetof. CI run: https://gitlab.com/farosas/qemu/-/pipelines/1898505234 v1: https://lore.kernel.org/r/20250603013810.4772-1-faro...@suse.de RFC: https://lore.kernel.org/r/20250411191443.22565-1-faro...@suse.de Fabiano Rosas (24): migration: Fix leak of block_bitmap_mapping migration: Add a qdev p

[PATCH v2 02/24] migration: Add a qdev property for StrOrNull

2025-06-30 Thread Fabiano Rosas
e QNULL because it was never a valid option in the previous command line, which took a string. Signed-off-by: Fabiano Rosas --- migration/options.c | 47 + 1 file changed, 47 insertions(+) diff --git a/migration/options.c b/migration/options.c i

Re: [PATCH] qtest/migration: Fix potential NPD through getenv

2025-06-27 Thread Fabiano Rosas
xjdeng writes: Hi, thanks for the interest in fixing this. However, the analysis it not quite right: > In `find_common_machine_version`, the code previously assumed that > `getenv(var1)` and `getenv(var2)` would always return non-NULL values. That's not true. qtest_qemu_binary() has: if (v

Re: [PATCH 01/21] migration: Normalize tls arguments

2025-06-27 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Markus Armbruster writes: >> >>> Fabiano Rosas writes: >>> >>>> Markus Armbruster writes: >>>> >>>>> Fabiano Rosas writes: >>>>> >>>>

Re: [PATCH 01/21] migration: Normalize tls arguments

2025-06-26 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Markus Armbruster writes: >> >>> Fabiano Rosas writes: >>> >>>> The migration parameters tls_creds, tls_authz and tls_hostname >>>> currently have a non-uniform handling. When

Re: [PATCH 03/21] qapi/migration: Don't document MigrationParameter

2025-06-25 Thread Fabiano Rosas
Markus Armbruster writes: > Markus Armbruster writes: > >> Fabiano Rosas writes: >> >>> The MigrationParameter (singular) enumeration is not part of the >>> migration QMP API, it's only used for nicely converting HMP strings >>> into Migr

Re: [PATCH 02/21] migration: Remove MigrateSetParameters

2025-06-25 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Now that the TLS options have been made the same between >> migrate-set-parameters and query-migrate-parameters, a single type can >> be used. Remove MigrateSetParameters. >> >> The TLS options documen

Re: [PATCH 01/21] migration: Normalize tls arguments

2025-06-25 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> The migration parameters tls_creds, tls_authz and tls_hostname >> currently have a non-uniform handling. When used as arguments to >> migrate-set-parameters, their type is StrOrNull and when used as >> r

Re: [PATCH] s390x: Fix leak in machine_set_loadparm

2025-06-24 Thread Fabiano Rosas
Thomas Huth writes: > On 12/05/2025 17.37, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 12/5/25 16:07, Philippe Mathieu-Daudé wrote: >>>> On 9/5/25 19:49, Fabiano Rosas wrote: >>>>> ASAN spotted a leaking s

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-13 Thread Fabiano Rosas
Peter Xu writes: > On Thu, Jun 12, 2025 at 05:58:14PM -0300, Fabiano Rosas wrote: >> Fabiano Rosas writes: >> >> > Peter Xu writes: >> > >> >> On Mon, Jun 02, 2025 at 10:37:59PM -0300, Fabiano Rosas wrote: >> >>> QAPI_CLONE_MEMBERS

  1   2   3   4   5   6   7   8   9   10   >