[PATCH 15/21] migration: Add capabilities into MigrationParameters

2025-06-02 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 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-02 Thread Fabiano Rosas
assignment. Signed-off-by: Fabiano Rosas --- migration/options.c | 31 --- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/migration/options.c b/migration/options.c index dd62e726cb..0a2a3050ec 100644 --- a/migration/options.c +++ b/migration/options.c

[PATCH 16/21] qapi/migration: Mark that query/set-migrate-parameters support capabilities

2025-06-02 Thread Fabiano Rosas
Add a QAPI command feature "capabilities" that can be queried by the client to check that the parameters commands now also support capabilities. Signed-off-by: Fabiano Rosas --- qapi/migration.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --

[PATCH 21/21] tests/qtest/migration: Add a test for config passing

2025-06-02 Thread Fabiano Rosas
Pass the config directly via the migrate/incoming command. Signed-off-by: Fabiano Rosas --- tests/qtest/migration/framework.h | 2 ++ tests/qtest/migration/misc-tests.c | 39 ++ 2 files changed, 41 insertions(+) diff --git a/tests/qtest/migration/framework.h b

[PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-02 Thread Fabiano Rosas
o not regress iotest 300, which is the test that 3cba22c9ad refers to) Signed-off-by: Fabiano Rosas --- migration/migration.h | 7 +++ migration/options.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/migration/migration.h b/migration/migration.h index d53f7cad84.

[PATCH 00/21] migration: Unify capabilities and parameters

2025-06-02 Thread Fabiano Rosas
rnel.org/r/20250411191443.22565-1-faro...@suse.de Fabiano Rosas (21): migration: Normalize tls arguments migration: Remove MigrateSetParameters qapi/migration: Don't document MigrationParameter migration: Run a post update routine after setting parameters migration: Add a flag to tra

[PATCH 07/21] migration: Set block_bitmap_mapping unconditionally in query-migrate-parameters

2025-06-02 Thread Fabiano Rosas
MigrationParameters. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 36 -- migration/options.c| 10 -- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp

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

2025-06-02 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 | 285 ++ migration/options.h | 20 +-- migration

[PATCH 04/21] migration: Run a post update routine after setting parameters

2025-06-02 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 e49d584a99..f64e141394 100644 --- a/migration/options.c +++ b/migrat

[PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-02 Thread Fabiano Rosas
API-generate has_* fields. We might want to store migration parameters differently in the future. Signed-off-by: Fabiano Rosas --- migration/options.c | 74 - 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/migration/options.c b/migrat

[PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-02 Thread Fabiano Rosas
lobal cmdline > defaults (migration_properties) I.e. the config takes precedence over all, values not present in the config assume the default values. The (debug) -global command line option allows the defaults to be overridden. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 5

[PATCH 06/21] migration: Remove checks for s->parameters has_* fields

2025-06-02 Thread Fabiano Rosas
ut into the temporary structure 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. Signed-off-by: Fabiano Rosas --- migration/migration.c | 2 - migration/opt

[PATCH 14/21] migration: Cleanup hmp_info_migrate_parameters

2025-06-02 Thread Fabiano Rosas
encapsulate boilerplate. - Line breaks for legibility. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 265 ++--- 1 file changed, 148 insertions(+), 117 deletions(-) diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index

[PATCH 20/21] libqtest: Add a function to check whether a QMP command supports a feature

2025-06-02 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- tests/qtest/libqtest.c | 42 ++ tests/qtest/libqtest.h | 12 2 files changed, 54 insertions(+) diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index 94526b7f9c..7ee4831841 100644 --- a/tests/qtest

[PATCH 11/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_test_apply

2025-06-02 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 | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff

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

2025-06-02 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 | 152 +--- qapi/pragma.json| 3 +- 2 files changed, 3 insertions(+), 152 deletions(-) diff --

[PATCH 12/21] migration: Use QAPI_CLONE_MEMBERS in migrate_params_apply

2025-06-02 Thread Fabiano Rosas
added. Note that s->parameters is part of MigrationState, so it doesn't require freeing, but the TLS strings do. Signed-off-by: Fabiano Rosas --- migration/options.c | 122 1 file changed, 9 insertions(+), 113 deletions(-) diff --git a/m

[PATCH 08/21] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE

2025-06-02 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 18/21] qapi/migration: Deprecate capabilities commands

2025-06-02 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 02/21] migration: Remove MigrateSetParameters

2025-06-02 Thread Fabiano Rosas
complete. I'm choosing to somewhat ignore any ambiguity between "query" and "set" because other options' docs are already ambiguous in that regard. Signed-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 4 +- migration/options.c| 6 +- qapi/m

[PATCH 01/21] migration: Normalize tls arguments

2025-06-02 Thread Fabiano Rosas
igned-off-by: Fabiano Rosas --- migration/migration-hmp-cmds.c | 8 +- migration/migration.c | 2 + migration/options.c| 149 - migration/options.h| 1 + migration/tls.c| 2 +- qapi/migration.json

[PATCH 13/21] migration: Use visitors in migrate_params_test_apply

2025-06-02 Thread Fabiano Rosas
very confusing and while the visitor code can become a bit involved, there is no need for new contributors to ever touch it. Signed-off-by: Fabiano Rosas --- migration/options.c | 143 1 file changed, 39 insertions(+), 104 deletions(-) diff --git a

Re: [PATCH 01/13] migration: Add option to set postcopy-blocktime

2025-06-02 Thread Fabiano Rosas
Peter Xu writes: > Add a global property to allow enabling postcopy-blocktime feature. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 04/13] migration/postcopy: Make all blocktime vars 64bits

2025-06-02 Thread Fabiano Rosas
, milliseconds are simply too coarse grained. > > When at it: > > - Rename page_fault_vcpu_time to vcpu_blocktime_start. > > - Rename vcpu_blocktime to vcpu_blocktime_total. > > - Touch up the trace-events to not dump blocktime ctx pointer > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 03/13] migration/postcopy: Drop all atomic ops in blocktime feature

2025-06-02 Thread Fabiano Rosas
Peter Xu writes: > Now with the mutex protection it's not needed anymore. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 02/13] migration/postcopy: Push blocktime start/end into page req mutex

2025-06-02 Thread Fabiano Rosas
invoked after checking the receive bitmap, it's not > needed anymore. Instead, we assert. > > As another side effect, this paves way for removing all atomic ops in all > the mem accesses in blocktime layer. > > Note that we need a stub for mark_postcopy_blocktime_begin() for Windows > builds. > > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH 11/11] migration/postcopy: Avoid clearing dirty bitmap for postcopy too

2025-06-02 Thread Fabiano Rosas
ge page fault latency during > postcopy 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 > Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas

Re: [PATCH v2 3/3] tests/qtest: add qtests for STM32 DMA

2025-05-28 Thread Fabiano Rosas
Nikita Shubin writes: > From: Nikita Shubin > > Signed-off-by: Nikita Shubin Acked-by: Fabiano Rosas

Re: [RFC PATCH 12/13] [PoC] migration: Add query/set commands for MigrationConfig

2025-05-27 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Add the QMP commands query-migrate-config and migrate-set-config to >> read and write the migration configuration options. > > These supersede query-migrate-capabilities, query-migrate-parameters, > migrate-set-ca

Re: [RFC PATCH 04/13] migration: Fix parameter validation

2025-05-26 Thread Fabiano Rosas
Peter Xu writes: > On Thu, May 22, 2025 at 02:39:48PM -0300, Fabiano Rosas wrote: >> Actually, this doesn't work... >> >> The migrate-set-* commands have optional fields, so we need some form of >> checking has_* to know which fields the user is setting. Otherwis

Re: [PATCH] tests/qtest: Remove migration-helpers.c

2025-05-26 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Commit 407bc4bf90 ("qapi: Move include/qapi/qmp/ to include/qobject/") >> brought the migration-helpers.c back by mistake. This file has been >> replaced with migration/migration-qmp.c and >>

Re: [RFC PATCH 07/13] migration: Introduce new MigrationConfig structure

2025-05-23 Thread Fabiano Rosas
Markus Armbruster writes: Markus, sorry for the delay here. I had vacations and holidays, plus a pile of patches to review. > Fabiano Rosas writes: > >> Add a new migration structure to consolidate the capabilities and >> parameters. This structure will be used in place of

[PATCH] tests/qtest: Remove migration-helpers.c

2025-05-23 Thread Fabiano Rosas
quot;) Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 530 1 file changed, 530 deletions(-) delete mode 100644 tests/qtest/migration-helpers.c diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c deleted file mode 100

Re: [RFC PATCH 04/13] migration: Fix parameter validation

2025-05-22 Thread Fabiano Rosas
Fabiano Rosas writes: > Peter Xu writes: > >> On Fri, Apr 11, 2025 at 04:14:34PM -0300, Fabiano Rosas wrote: >>> The migration parameters validation involves producing a temporary >>> structure which merges the current parameter values with the new >>> p

Re: [RFC PATCH 04/13] migration: Fix parameter validation

2025-05-22 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Apr 11, 2025 at 04:14:34PM -0300, Fabiano Rosas wrote: >> The migration parameters validation involves producing a temporary >> structure which merges the current parameter values with the new >> parameters set by the user. >> &g

Re: [PATCH 2/4] qapi/migration: Deprecate migrate argument @detach

2025-05-21 Thread Fabiano Rosas
Markus Armbruster writes: > Argument @detach has always been ignored. Start the clock to get rid > of it. > > Cc: Peter Xu > Cc: Fabiano Rosas > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [RFC PATCH] migration/ram: avoid to do log clear in the last round

2025-05-20 Thread Fabiano Rosas
ration_clear_memory_region_dirty_bitmap(rb, page); > +} > > ret = test_and_clear_bit(page, rb->bmap); > if (ret) { Well, it looks ok to me and passes all my tests. Tested-by: Fabiano Rosas Reviewed-by: Fabiano Rosas

Re: [PATCH v3 00/28] Fix incorrect hash results on AST2700

2025-05-20 Thread Fabiano Rosas
> tests/qtest/aspeed-hace-utils.h | 84 + > hw/misc/aspeed_hace.c | 479 +++ > tests/qtest/aspeed-hace-utils.c | 646 > tests/qtest/aspeed_hace-test.c | 577 +--- > tests/qtest/ast2700-hace-test.c | 98 + > hw/misc/trace-events| 8 + > tests/qtest/meson.build | 13 +- > 8 files changed, 1279 insertions(+), 637 deletions(-) > create mode 100644 tests/qtest/aspeed-hace-utils.h > create mode 100644 tests/qtest/aspeed-hace-utils.c > create mode 100644 tests/qtest/ast2700-hace-test.c For qtest: Acked-by: Fabiano Rosas

Re: [PATCH V3 25/42] migration: cpr_get_fd_param helper

2025-05-19 Thread Fabiano Rosas
gt; > Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas

Re: [PATCH V2 0/5] fast qom tree get

2025-05-19 Thread Fabiano Rosas
| 112 +++ > tests/qtest/qom-test.c | 113 > > 5 files changed, 381 insertions(+), 18 deletions(-) > > base-commit: 7be29f2f1a3f5b037d27eedbd5df9f441e8c8c16 Acked-by: Fabiano Rosas

Re: [PATCH v3 04/12] qtest/e1000e|igb: assert irqs are clear before triggering an irq

2025-05-19 Thread Fabiano Rosas
hael S. Tsirkin > Cc: Marcel Apfelbaum > Cc: Dmitry Fleytman > Cc: Akihiko Odaki > Cc: Sriram Yagnaraman > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH v4 21/22] tests/qtest/xhci: Test USB Mass Storage relaxed CSW order

2025-05-19 Thread Fabiano Rosas
y: Nicholas Piggin #define CBW_SIGNATURE 0x43425355 #define CSW_SIGNATURE 0x53425355 would be nice Reviewed-by: Fabiano Rosas #define CBW_SIGNATURE 0x43425355 #define CSW_SIGNATURE 0x53425355 would be nice Reviewed-by: Fabiano Rosas

Re: [PATCH v4 07/22] tests/qtest/xhci: add a test for TR NOOP commands

2025-05-19 Thread Fabiano Rosas
Nicholas Piggin writes: > Run some TR NOOP commands through the transfer ring. > > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH v4 03/22] tests/qtest/xhci: test the qemu-xhci device

2025-05-19 Thread Fabiano Rosas
Nicholas Piggin writes: > Add support in the test code for running multiple drivers, and add > tests for the qemu-xhci device. > > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH v3 12/12] qtest/e1000e|igb: Test interrupt throttling in multiple_transfers test

2025-05-19 Thread Fabiano Rosas
s throttling adds about > 40s to the test runtime. > > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH v3 01/12] qtest/e1000e|igb: Clear interrupt-cause and msix pending bits after irq

2025-05-19 Thread Fabiano Rosas
or is masked). > > Fix this by clearing the ICR/EICR cause bits, and the msix pending > bit using the PBACLR device register. > > Cc: Michael S. Tsirkin > Cc: Marcel Apfelbaum > Cc: Dmitry Fleytman > Cc: Akihiko Odaki > Cc: Sriram Yagnaraman > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH v4 05/22] tests/qtest/xhci: Add basic USB Mass Storage tests

2025-05-19 Thread Fabiano Rosas
Nicholas Piggin writes: > Add a usb-storage device to xhci tests, enable USB Mass Storage Bulk > endpoints, and run some MSD commands through it. > > Signed-off-by: Nicholas Piggin Checkpatch doesn't like it. Reviewed-by: Fabiano Rosas

Re: [PATCH 4/4] chardev: Introduce a lock for hup_source

2025-05-19 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Thu, May 15, 2025 at 07:20:14PM -0300, Fabiano Rosas wrote: >> It's possible for the hup_source to have its reference decremented by >> remove_hup_source() while it's still being added to the context, >> leading to asserts in gli

Re: [PATCH v4 04/22] tests/qtest/xhci: Add controller and device setup and ring tests

2025-05-19 Thread Fabiano Rosas
y: Nicholas Piggin Reviewed-by: Fabiano Rosas

Re: [PATCH] migration/multifd: Don't send device state packets with zerocopy flag

2025-05-16 Thread Fabiano Rosas
e state. > > Fixes: 0525b91a0b99 ("migration/multifd: Device state transfer support - send > side") > Signed-off-by: Maciej S. Szmigiero Reviewed-by: Fabiano Rosas

[PATCH 3/4] chardev: Consolidate yank registration

2025-05-15 Thread Fabiano Rosas
There's currently five places where the yank function is being registered and they all come right before tcp_chr_new_client(). Fold them into it. Signed-off-by: Fabiano Rosas --- chardev/char-socket.c | 31 ++- 1 file changed, 6 insertions(+), 25 deletions(-)

[PATCH 4/4] chardev: Introduce a lock for hup_source

2025-05-15 Thread Fabiano Rosas
h: assertion 'g_atomic_int_get (&source->ref_count) > 0' failed Add a lock to serialize removal and creation. Signed-off-by: Fabiano Rosas --- chardev/char-socket.c | 4 chardev/char.c | 2 ++ include/chardev/char.h | 1 + 3 files changed, 7 insertions(+) diff --g

[PATCH 2/4] chardev: Don't attempt to unregister yank function more than once

2025-05-15 Thread Fabiano Rosas
omplete solution because that flag pertains to the yank instance, not to each individual function. Skip the yank_unregister_function() in case s->sioc is already NULL, which indicates the last yank function was already removed. Signed-off-by: Fabiano Rosas --- Can tcp_chr_free_connection() ra

[PATCH 1/4] chardev: Fix QIOChannel refcount

2025-05-15 Thread Fabiano Rosas
char-socket.c:1281:9 ... Fix the issue by incrementing the iochannel reference count when the IOWatchPoll takes a reference and decrementing when it is finalized. Signed-off-by: Fabiano Rosas --- chardev/char-io.c | 5 + 1 file changed, 5 insertions(+) diff --git a/chardev/char-io.c b

[PATCH 0/4] chardev: Fix issues found by vhost-user-test

2025-05-15 Thread Fabiano Rosas
e hidden due to vhost-user-test using a dedicated server thread which dies and causes timeouts in the test. Manifests as assert(s->fds_num) failing. Only on the ASAN build, after tens of iterations (quite common). Thanks Fabiano Rosas (4): chardev: Fix QIOChannel refcount char

[PATCH v2 0/3] migration, ci: Tweaks to migration-compat jobs

2025-05-13 Thread Fabiano Rosas
- changed migration-compat job to also check VERSION [peterx] v1: https://lore.kernel.org/r/20250507155835.31074-1-faro...@suse.de A couple of cleanups to the migration jobs, plus a fix for an issue that may happen during the QEMU release. Fabiano Rosas (3): ci: Re-enable python subtests in

[PATCH v2 1/3] ci: Re-enable python subtests in qtest migration suite

2025-05-13 Thread Fabiano Rosas
ever since, so this commit should not expose any new bug. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 8 1 file changed, 8 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 248aaed137..fbad34138c 100644 --- a

[PATCH v2 2/3] ci: Fix build-previous-qemu when the version tag is absent

2025-05-13 Thread Fabiano Rosas
e build and the test jobs because allow_failure would mask any real error in the jobs. It also avoids having an orange ! on every release pipeline. Reported-by: Stefan Hajnoczi Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 8 1 file changed, 8

[PATCH v2 3/3] ci: Reduce the size of artifacts for build-previous-qemu

2025-05-13 Thread Fabiano Rosas
The build-previous-qemu job is intented to produce a build of the previous QEMU release for consumption by the migration-compat-* jobs. Keep only the pieces of the build that are necessary. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 11 +-- 1

Re: [PATCH v4 00/22] usb/xhci and usb/msd improvements and tests

2025-05-12 Thread Fabiano Rosas
Peter Maydell writes: > On Mon, 5 May 2025 at 10:03, Kevin Wolf wrote: >> >> Am 05.05.2025 um 04:03 hat Nicholas Piggin geschrieben: >> > I would like to get this series merged, but I realize the mass storage >> > change to relax packet ordering of a command particularly is quite >> > complicate

Re: [PATCH] s390x: Fix leak in machine_set_loadparm

2025-05-12 Thread Fabiano Rosas
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 string in machine_set_loadparm(): > > What about ccw_device_set_loadparm() in hw/s390x/ccw-device.c? > Yep, that one

Re: [PATCH v11 1/3] migration: write zero pages when postcopy enabled

2025-05-12 Thread Fabiano Rosas
always write zero pages as and > when they are migrated. > > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v3 09/10] migration/postcopy: Replace QemuSemaphore with QemuEvent

2025-05-12 Thread Fabiano Rosas
Akihiko Odaki writes: > thread_sync_sem is an one-shot event so it can be converted into > QemuEvent, which is more lightweight. > > Signed-off-by: Akihiko Odaki Reviewed-by: Fabiano Rosas

Re: [PATCH v3 08/10] migration/colo: Replace QemuSemaphore with QemuEvent

2025-05-12 Thread Fabiano Rosas
Akihiko Odaki writes: > colo_exit_sem and colo_incoming_sem represent one-shot events so they > can be converted into QemuEvent, which is more lightweight. > > Signed-off-by: Akihiko Odaki Reviewed-by: Fabiano Rosas

[PULL 2/3] tests/qtest/libqos: Avoid double swapping when using modern virtio

2025-05-09 Thread Fabiano Rosas
7.610903-1-th...@redhat.com> Signed-off-by: Fabiano Rosas --- tests/qtest/libqos/virtio.c | 44 - 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c index 2e7979652f..5a709d0bc5 100644 --- a/te

[PULL 1/3] qtest: introduce qtest_init_ext

2025-05-09 Thread Fabiano Rosas
vskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Steve Sistare Reviewed-by: Fabiano Rosas Message-ID: <20250410162250.329941-1-vsement...@yandex-team.ru> Signed-off-by: Fabiano Rosas --- tests/qtest/libqtest.c| 18 +- tests/qtest/libqtest.h

[PULL 0/3] QTest patches for 2025-05-09

2025-05-09 Thread Fabiano Rosas
The following changes since commit 4b1f5b73e060971c434e70694d571adfee553027: tests/functional: Use -no-shutdown in the hppa_seabios test (2025-05-08 15:38:40 -0400) are available in the Git repository at: https://gitlab.com/farosas/qemu.git tags/qtest-20250509-pull-request for you to fetch

[PULL 3/3] tests/qtest/cpu-plug-test: Add cpu hotplug support for LoongArch

2025-05-09 Thread Fabiano Rosas
homas Huth Message-ID: <20250314085130.4184272-1-maob...@loongson.cn> Signed-off-by: Fabiano Rosas --- tests/qtest/cpu-plug-test.c | 24 tests/qtest/meson.build | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tests/qtest/cpu-plug-test.c b/test

[PATCH] tests/qtest/ast2700-smc-test: Fix leak

2025-05-09 Thread Fabiano Rosas
-test.c:65:5 #7 0x7fe0cf7bd24c in __libc_start_main ../csu/libc-start.c:308 #8 0x55e29a9f7759 in _start ../sysdeps/x86_64/start.S:120 Signed-off-by: Fabiano Rosas --- tests/qtest/ast2700-smc-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/ast2700-smc-test.c b/tests

[PATCH] s390x: Fix leak in machine_set_loadparm

2025-05-09 Thread Fabiano Rosas
s390_ipl_update_diag308 ../hw/s390x/ipl.c:594:5 #11 0x560ffbdee132 in handle_diag_308 ../target/s390x/diag.c:147:9 #12 0x560ffbebb956 in helper_diag ../target/s390x/tcg/misc_helper.c:137:9 #13 0x7f1a3c51c730 (/memfd:tcg-jit (deleted)+0x39730) Signed-off-by: Fabiano Rosas --- hw/s390x/s390

Re: [PATCH v10 1/3] migration: enable multifd and postcopy together

2025-05-08 Thread Fabiano Rosas
tifd threads work during the initial > guest RAM transfer. When migration moves to the Postcopy > phase, the multifd threads cease to send data on multifd > channels and Postcopy threads on the destination > request/pull data from the source side. > > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v10 3/3] migration: write zero pages when postcopy enabled

2025-05-08 Thread Fabiano Rosas
Prasad Pandit writes: > From: Prasad Pandit > > During multifd migration, zero pages are are written if > they are migrated more than ones. s/ones/once/ > > This may result in a migration hang issue when Multifd > and Postcopy are enabled together. > > When Postcopy is enabled, always write ze

Re: [PATCH] tests/qtest/q35-test: Remove the obsolete test_without_smram_base test

2025-05-08 Thread Fabiano Rosas
Thomas Huth writes: > From: Thomas Huth > > With the release of QEMU 10.1, the pc-q35-4.1 machine will be older > than 6 years and thus will get disabled automatically by the > MACHINE_VER_DELETION() macro. Remove the related test to avoid > that the q35-test is failing when the machine is not a

Re: [PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent

2025-05-07 Thread Fabiano Rosas
Peter Xu writes: > On Wed, May 07, 2025 at 12:58:34PM -0300, Fabiano Rosas wrote: >> Stefan reports that during QEMU release, pushing a series with the >> VERSION bump commit, but not pushing the new git tag in the same >> command will cause a failure of the build-previou

[PATCH 3/3] ci: Reduce the size of artifacts for build-previous-qemu

2025-05-07 Thread Fabiano Rosas
The build-previous-qemu job is intented to produce a build of the previous QEMU release for consumption by the migration-compat-* jobs. Keep only the pieces of the build that are necessary. Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 11 +-- 1 file changed, 5

[PATCH 1/3] ci: Re-enable python subtests in qtest migration suite

2025-05-07 Thread Fabiano Rosas
ever since, so this commit should not expose any new bug. Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 8 1 file changed, 8 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 431bc07d8f..ccf69fb8dd 100644 --- a/.gitlab-ci.d

[PATCH 2/3] ci: Fix build-previous-qemu when the version tag is absent

2025-05-07 Thread Fabiano Rosas
e build and the test jobs because allow_failure would mask any real error in the jobs. It also avoids having an orange ! on every release pipeline. Reported-by: Stefan Hajnoczi Signed-off-by: Fabiano Rosas --- .gitlab-ci.d/buildtest.yml | 8 +++- 1 file changed, 7 insertions(+), 1 delet

[PATCH 0/3] migration, ci: Tweaks to migration-compat jobs

2025-05-07 Thread Fabiano Rosas
A couple of cleanups to the migration jobs, plus a fix for an issue that may happen during the QEMU release. Fabiano Rosas (3): ci: Re-enable python subtests in qtest migration suite ci: Fix build-previous-qemu when the version tag is absent ci: Reduce the size of artifacts for build

Re: [PATCH v3] tests/qtest/cpu-plug-test: Add cpu hotplug support for LoongArch

2025-05-07 Thread Fabiano Rosas
Thomas Huth writes: > On 07/05/2025 10.55, bibo mao wrote: >> Hi Thomas, >> >> Can this patch be merged since qemu 10.0 is released already? > > Hi, > > Fabiano took over the maintainership of the qtests, so I'm forwarding the > question to him. > Thank you. I'll add this to my queue.

Re: [PATCH v9 0/7] Allow to enable multifd and postcopy migration together

2025-05-06 Thread Fabiano Rosas
Prasad Pandit writes: > Hi, > > On Tue, 6 May 2025 at 00:34, Fabiano Rosas wrote: >> >> # Running /ppc64/migration/multifd+postcopy/tcp/plain/cancel >> >> # Using machine type: pseries-10.0 >> >> # starting QEMU: exec ./qemu-sys

Re: [PATCH 1/2] migration/multifd: Fix received packets tracepoint

2025-05-05 Thread Fabiano Rosas
Peter Xu writes: > On Wed, Apr 16, 2025 at 10:43:55AM -0300, Fabiano Rosas wrote: >> When qatomic_fetch_inc() started being used to count the number of >> packets sent, the printing of the number of packets received stopped >> matching the number of packets sent. >

Re: [PATCH v9 0/7] Allow to enable multifd and postcopy migration together

2025-05-05 Thread Fabiano Rosas
Prasad Pandit writes: > Hi, > >> On Thu, Apr 17, 2025 at 01:05:37PM -0300, Fabiano Rosas wrote: >> > It's not that page faults happen during multifd. The page was already >> > sent during precopy, but multifd-recv didn't write to it, it just marked >>

Re: [PATCH v9 0/7] Allow to enable multifd and postcopy migration together

2025-05-05 Thread Fabiano Rosas
Prasad Pandit writes: > On Tue, 29 Apr 2025 at 18:34, Peter Xu wrote: >> I think that's what Fabiano mentioned, but ultimately we need to verify it >> on a reproducer to know. > ... >> Looks ok, but please add some comments explain why postcopy needs to do it, >> and especially do it during prec

Re: [PATCH] tests/qtest: Add qtest for NPCM8XX PSPI module

2025-05-05 Thread Fabiano Rosas
Tim Lee writes: > - Created qtest to check initialization of registers in PSPI Module > - Implemented test into Build File > > Tested: > ./build/tests/qtest/npcm8xx-pspi_test > > Signed-off-by: Tim Lee > --- > MAINTAINERS | 1 + > tests/qtest/meson.build | 3 + >

Re: [PATCH v2] tests/qtest/libqos: Avoid double swapping when using modern virtio

2025-05-05 Thread Fabiano Rosas
Thomas Huth writes: > From: Thomas Huth > > The logic in the qvirtio_read/write function is rather a headache, > involving byte-swapping when the target is big endian, just to > maybe involve another byte-swapping in the qtest_read/write > function immediately afterwards (on the QEMU side). Let

Re: [PATCH] [for-10.1] qtest: introduce qtest_init_ext

2025-05-05 Thread Fabiano Rosas
Vladimir Sementsov-Ogievskiy writes: > Merge qtest_init_with_env_and_capabilities() and qtest_init_with_env() > into one qtest_init_ext(). > > Reasons: > > 1. qtest_init_with_env() is just wrong: it gets do_connect parameter >but always pass true to qtest_init_with_env_and_capabilities(). >

Re: Migration compatibility test broken on major version releases

2025-04-23 Thread Fabiano Rosas
Stefan Hajnoczi writes: > Hi Fabiano, > The build-previous-qemu job does not work when a new major version is > released: > https://gitlab.com/qemu-project/qemu/-/jobs/9788294494 > You might be using a slightly different workflow from Peter and Richard, I don't think this ever happened before. B

Re: [PATCH 4/4] tests/qtest: Enable spapr dma with linear iommu map

2025-04-17 Thread Fabiano Rosas
U to have > the spapr iommu provide a linear map to memory when running > qtests. > > The buggy msix checks can all be removed since the tests all work > now. > > Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas I'm off for the next two weeks, if you're in a r

Re: [PATCH v9 4/7] migration/ram: Implement save_postcopy_prepare()

2025-04-17 Thread Fabiano Rosas
Prasad Pandit writes: > From: Peter Xu > > Implement save_postcopy_prepare(), preparing for the enablement > of both multifd and postcopy. > > Signed-off-by: Peter Xu > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v9 6/7] tests/qtest/migration: consolidate set capabilities

2025-04-17 Thread Fabiano Rosas
he 'migrate_start()' function. > While simplifying the capabilities setting, it helps > to declutter the qtest sources. > > Suggested-by: Fabiano Rosas > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v9 7/7] tests/qtest/migration: add postcopy tests with multifd

2025-04-17 Thread Fabiano Rosas
Prasad Pandit writes: > From: Prasad Pandit > > Add new qtests to run postcopy migration with multifd > channels enabled. > > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v9 3/7] migration: Add save_postcopy_prepare() savevm handler

2025-04-17 Thread Fabiano Rosas
savevm > handler just for the only use case, however it's so far the cleanest. > > Signed-off-by: Peter Xu > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v9 2/7] migration: refactor channel discovery mechanism

2025-04-17 Thread Fabiano Rosas
istic to make it less > opaque and simplify the subsequent patches. > > Signed-off-by: Prasad Pandit Reviewed-by: Fabiano Rosas

Re: [PATCH v9 0/7] Allow to enable multifd and postcopy migration together

2025-04-17 Thread Fabiano Rosas
Prasad Pandit writes: > Hi, > > On Wed, 16 Apr 2025 at 18:29, Fabiano Rosas wrote: >> > The issue is that a zero page is being migrated by multifd but there's >> > an optimization in place that skips faulting the page in on the >> > destination. Later

Re: [PATCH] migration: add FEATURE_SEEKABLE to QIOChannelBlock

2025-04-17 Thread Fabiano Rosas
"Marco Cavenati" writes: > On Tuesday, April 15, 2025 15:50 CEST, Fabiano Rosas wrote: > >> > So, I see your point on performance, but I'm not fully comfortable >> > with the difference in zero page handling between mapped-ram on >> > and m

Re: [RFC PATCH 00/13] migration: Unify capabilities and parameters

2025-04-16 Thread Fabiano Rosas
Markus Armbruster writes: > Daniel P. Berrangé writes: > >> On Fri, Apr 11, 2025 at 04:14:30PM -0300, Fabiano Rosas wrote: >>> Open questions: >>> --- >>> >>> - Deprecations/compat? >>> >>> I think we should

Re: [RFC PATCH 05/13] migration: Reduce a bit of duplication in migration.json

2025-04-16 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Daniel P. Berrangé writes: >> >>> On Fri, Apr 11, 2025 at 04:14:35PM -0300, Fabiano Rosas wrote: >>>> Introduce a new MigrationConfigBase, to allow most of the duplication >>>> in migrat

[PATCH 1/2] migration/multifd: Fix received packets tracepoint

2025-04-16 Thread Fabiano Rosas
tracepoint text because "packet num" is ambiguous for the sync since the packet number of the actual sync packet will be one less than the total number of packets seen so far. Fixes: 98ea497d8b ("migration/multifd: Fix MultiFDSendParams.packet_num race") Signed-off-by: Fabiano R

[PATCH 2/2] migration: Trivial cleanups for postcopy

2025-04-16 Thread Fabiano Rosas
Some general cleanups of silly things that were left behind when refactoring code. Signed-off-by: Fabiano Rosas --- migration/migration.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PATCH 0/2] migration: A couple of cleanups

2025-04-16 Thread Fabiano Rosas
Postcopy code was moved and some if postcopy were left behind. Multifd has an accounting issue in tracepoints. Fabiano Rosas (2): migration/multifd: Fix received packets tracepoint migration: Trivial cleanups for postcopy migration/migration.c | 28 ++-- migration

  1   2   3   4   5   6   7   8   9   10   >