[PULL 01/17] tests/qtest/migration-test: Disable the analyze-migration.py test on s390x

2023-10-20 Thread Juan Quintela
read classdesc = self.section_classes[section_key] KeyError: ('s390-storage_attributes', 0) It obviously never has been adapted to s390x yet, so until this has been done, disable this test on s390x. Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <202

[PULL 11/17] tests/qtest/migration: Introduce find_common_machine_version

2023-10-20 Thread Juan Quintela
From: Fabiano Rosas When using two different QEMU binaries for migration testing, we'll need to find what is the machine version that will work with both binaries. Add a helper for that. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Signed-off-by: Fabiano Rosas Signed-off-by: Juan

[PULL 06/17] tests/qtest: Allow qtest_qemu_binary to use a custom environment variable

2023-10-20 Thread Juan Quintela
use QTEST_QEMU_BINARY as a fallback. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Signed-off-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018192741.25885-2-faro...@suse.de> --- tests/qtest/libqtest.c | 13 ++--- 1 file changed, 10 insertions(+), 3 del

[PULL 02/17] migration: simplify blockers

2023-10-20 Thread Juan Quintela
, and passing Error** will allow one Error object to be registered for multiple modes. No functional change. Signed-off-by: Steve Sistare Tested-by: Michael Galaxy Reviewed-by: Michael Galaxy Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <1697634216-84

[PULL 00/17] Migration 20231020 patches

2023-10-20 Thread Juan Quintela
The following changes since commit 0d239e513e0117e66fa739fb71a43b9383a108ff: Merge tag 'pull-lu-20231018' of https://gitlab.com/rth7680/qemu into staging (2023-10-19 10:20:57 -0700) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git

Re: [PATCH 07/13] RFC migration: icp/server is a mess

2023-10-20 Thread Juan Quintela
Greg Kurz wrote: > On Thu, 19 Oct 2023 21:08:25 +0200 > Juan Quintela wrote: > >> Current code does: >> - register pre_2_10_vmstate_dummy_icp with "icp/server" and instance >> dependinfg on cpu number >> - for newer machines, it register vmstate_icp

Re: [PATCH v2 03/13] migration: Use vmstate_register_any() for isa-ide

2023-10-20 Thread Juan Quintela
Thomas Huth wrote: > On 20/10/2023 11.07, Juan Quintela wrote: >> Otherwise qom-test fails. >> ok 4 /i386/qom/x-remote >> qemu-system-i386: savevm_state_handler_insert: Detected duplicate >> SaveStateEntry: id=isa-ide, instance_id=0x0 >> Broken pipe >>

Re: [PATCH v2 11/13] migration: Use vmstate_register_any() for audio

2023-10-23 Thread Juan Quintela
Volker Rümelin wrote: > Am 20.10.23 um 11:07 schrieb Juan Quintela: >> We can have more than one audio card. > > Hi Juan, > > I wouldn't use the term "audio card" here. In QEMU speak, Audiodev is an > "audio backend". Thanks. Changed that.

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Set the 'block_incremental' migration parameter to 'true' instead. >> >> Reviewed-by: Thomas Huth >> Acked-by: Stefan Hajnoczi >> Signed-off-by: Juan Quintela >> >> --- >> >> Imp

Re: [PATCH v5] migration: hold the BQL during setup

2023-10-16 Thread Juan Quintela
Fiona Ebner wrote: queued. > This is intended to be a semantic revert of commit 9b09503752 > ("migration: run setup callbacks out of big lock"). There have been so > many changes since that commit (e.g. a new setup callback > dirty_bitmap_save_setup() that also needs to be adapted now), it's >

[PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-16 Thread Juan Quintela
the migration data to the file before the destination can start reading. Add a new migration function specifically to handle the file migration. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20230712190742.22294-7-faro...@suse

[PULL 05/38] migration: Add the configuration vmstate to the json writer

2023-10-16 Thread Juan Quintela
Borisov Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15777-2-faro...@suse.de> --- migration/migration.c | 1 + migration/savevm.c| 20 2 files changed, 17 insertions(+), 4 deletions(-) diff

[PULL 03/38] migration: Allow user to specify available switchover bandwidth

2023-10-16 Thread Juan Quintela
Reported-by: Zhiyi Guo Reviewed-by: Joao Martins Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela Message-ID: <20231010221922.40638-1-pet...@redhat.com> --- qapi/migration.json| 34 +- migration/migration

[PULL 18/38] migration/rdma: Unfold hook_ram_load()

2023-10-16 Thread Juan Quintela
There is only one flag called with: RAM_CONTROL_BLOCK_REG. Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-6-quint...@redhat.com> --- migration/qemu-file.h | 11 --- migration/rdma.h | 3 +++ migration/qemu-file.c | 10 -- mig

[PULL 24/38] migration/rdma: Use i as for index instead of idx

2023-10-16 Thread Juan Quintela
Once there, all the uses are local to the for, so declare the variable inside the for statement. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-12-quint...@redhat.com> --- migration/rdma.

[PULL 12/38] migration: hold the BQL during setup

2023-10-16 Thread Juan Quintela
semaphore. The comment in ram_init_bitmaps() was introduced by 4987783400 ("migration: fix incorrect memory_global_dirty_log_start outside BQL") and is removed, because it referred to the qemu_mutex_lock_iothread() call. Signed-off-by: Fiona Ebner Reviewed-by: Fabiano Rosas Review

[PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2023-10-16 Thread Juan Quintela
is the most likely to know right away what the problem is. Signed-off-by: Fabiano Rosas Acked-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15777-7-faro...@suse.de> --- tests/qtest/migration-test.

[PULL 15/38] migration/rdma: Unfold ram_control_before_iterate()

2023-10-16 Thread Juan Quintela
Once there: - Remove unused data parameter - unfold it in its callers. - change all callers to call qemu_rdma_registration_start() - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() Reviewed-by: Li Zhijian Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID

[PULL 21/38] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-10-16 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-9-quint...@redhat.com> --- migration/qemu-file.h | 17 - migration/rdma.h | 16 migration/ram.c | 2 +- 3 files changed, 17 insertions(

[PULL 07/38] migration: Add capability parsing to analyze-migration.py

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The script is broken when the configuration/capabilities section is present. Add support for parsing the capabilities so we can fix it in the next patch. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15

[PULL 01/38] migration: refactor migration_completion

2023-10-16 Thread Juan Quintela
Wang Reviewed-by: Peter Xu Reviewed-by: Isaku Yamahata Reviewed-by: Juan Quintela Message-ID: <20230804093053.5037-1-wei.w.w...@intel.com> Signed-off-by: Juan Quintela --- migration/migration.c | 167 -- 1 file changed, 94 insertions(+), 73 del

[PULL 22/38] migration/rdma: Remove qemu_ prefix from exported functions

2023-10-16 Thread Juan Quintela
Functions are long enough even without this. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-10-quint...@redhat.com> --- migration/rdma.h | 12 ++-- migration/ram.c| 14 +++--- migration/

[PULL 38/38] migration/multifd: Clarify Error usage in multifd_channel_connect

2023-10-16 Thread Juan Quintela
passing the error into the function. Cc: Markus Armbruster Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231012134343.23757-4-faro...@suse.de> --- migration/multifd.c

[PULL 16/38] migration/rdma: Unfold ram_control_after_iterate()

2023-10-16 Thread Juan Quintela
Once there: - Remove unused data parameter - unfold it in its callers - change all callers to call qemu_rdma_registration_stop() - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-4-qu

[PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Juan Quintela
: Merge save_zero_page functions migration/multifd: Remove direct "socket" references migration/multifd: Unify multifd_send_thread error paths migration/multifd: Clarify Error usage in multifd_channel_connect Fiona Ebner (1): migration: hold the BQL during setup Juan Qu

[PULL 23/38] migration/rdma: Check sooner if we are in postcopy for save_page()

2023-10-16 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-11-quint...@redhat.com> --- migration/rdma.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index c147c94b08..e973

[PULL 36/38] migration/multifd: Remove direct "socket" references

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We're about to enable support for other transports in multifd, so remove direct references to sockets. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231012134343.23757-2-f

[PULL 30/38] multifd: reset next_packet_len after sending pages

2023-10-16 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184358.97349-5-elena.ufimts...@oracle.com> --- migration/multifd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/multifd.c b/migration/multifd.c index e6e0013c16..c45f5015f8

[PULL 29/38] multifd: fix counters in multifd_send_thread

2023-10-16 Thread Juan Quintela
PAGE_SIZE) that is being sent as iov[0]. The packet_len part should be added to account for the size of MultiFDPacket and the array of the offsets. Signed-off-by: Elena Ufimtseva Reviewed-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184358.97349-4

[PULL 08/38] migration: Fix analyze-migration.py when ignore-shared is used

2023-10-16 Thread Juan Quintela
hat's added when x-ignore-shared is used to fix the script. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15777-5-faro...@suse.de> --- scripts/analyze-migration.py | 5 + 1 file changed, 5 insertions(+) diff --git a/

[PULL 04/38] migration: fix RAMBlock add NULL check

2023-10-16 Thread Juan Quintela
Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231010104851.802947-1-fro...@swemel.ru> --- migration/ram.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 24d91de8b3..e8df4dc862 100644 --- a/migration/ram.c

[PULL 02/38] migration: Use g_autofree to simplify ram_dirty_bitmap_reload()

2023-10-16 Thread Juan Quintela
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011023627.86691-1-phi...@linaro.org> --- migration/ram.c | 17 ++---

[PULL 13/38] migration: Non multifd migration don't care about multifd flushes

2023-10-16 Thread Juan Quintela
RDMA was having trouble because migrate_multifd_flush_after_each_section() can only be true or false, but we don't want to send any flush when we are not in multifd migration. CC: Fabiano Rosas Reviewed-by: Li Zhijian Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID

[PULL 35/38] migration/ram: Merge save_zero_page functions

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We don't need to do this in two pieces. One single function makes it easier to grasp, specially since it removes the indirection on the return value handling. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela

[PULL 17/38] migration/rdma: Remove all uses of RAM_CONTROL_HOOK

2023-10-16 Thread Juan Quintela
Instead of going through ram_control_load_hook(), call qemu_rdma_registration_handle() directly. Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-5-quint...@redhat.com> --- migration/qemu-file.h | 1 - migration/rdma.h | 3 +++ migration

[PULL 19/38] migration/rdma: Create rdma_control_save_page()

2023-10-16 Thread Juan Quintela
The only user of ram_control_save_page() and save_page() hook was rdma. Just move the function to rdma.c, rename it to rdma_control_save_page(). Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-7-quint...@redhat.com> --- mig

[PULL 09/38] migration: Fix analyze-migration read operation signedness

2023-10-16 Thread Juan Quintela
ection_key] KeyError: ('spapr_iommu', -2147483648) Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15777-6-faro...@suse.de> --- scripts/analyze-migration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PULL 20/38] qemu-file: Remove QEMUFileHooks

2023-10-16 Thread Juan Quintela
The only user was rdma, and its use is gone. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-8-quint...@redhat.com> --- migration/qemu-file.h | 4 migration/qemu-file.c | 6 -- migration/rdma.c | 9 - 3

[PULL 28/38] migration: check for rate_limit_max for RATE_LIMIT_DISABLED

2023-10-16 Thread Juan Quintela
there. Signed-off-by: Elena Ufimtseva Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184358.97349-2-elena.ufimts...@oracle.com> --- migration/migration-stats.c | 9 + 1 file changed, 5 insertions(+), 4 del

[PULL 31/38] migration/ram: Refactor precopy ram loading code

2023-10-16 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231011184604.32364-3-faro...@suse.de> --- migration/ram.c | 146 +++- 1 file changed, 82 insertions(+), 64 deletions(-)

[PULL 25/38] migration/rdma: Declare for index variables local

2023-10-16 Thread Juan Quintela
Declare all variables that are only used inside a for loop inside the for statement. This makes clear that they are not used outside of the for loop. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-13-quint...@redhat.

[PULL 26/38] migration/rdma: Remove all "ret" variables that are used only once

2023-10-16 Thread Juan Quintela
Change code that is: int ret; ... ret = foo(); if (ret[ < 0]?) { to: if (foo()[ < 0]) { Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-14-quint...@redhat.com> --- migration/rdma.c | 29 -

[PULL 34/38] migration/ram: Move xbzrle zero page handling into save_zero_page

2023-10-16 Thread Juan Quintela
-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184604.32364-6-faro...@suse.de> --- migration/ram.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 2ec28c4507..229cad5c74

[PULL 33/38] migration/ram: Stop passing QEMUFile around in save_zero_page

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We don't need the QEMUFile when we're already passing the PageSearchStatus. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184604.32364-5-faro...@suse.de> --- migration/ram.

[PULL 14/38] migration: Create migrate_rdma()

2023-10-16 Thread Juan Quintela
Helper to say if we are doing a migration over rdma. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-2-quint...@redhat.com> --- migration/migration.h | 2 ++ migration/options.h | 1 + migration/migration.c | 1 + mig

[PULL 27/38] migration: Improve json and formatting

2023-10-16 Thread Juan Quintela
Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231013104736.31722-2-quint...@redhat.com> --- qapi/migration.json | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 360e609f66..db3df12d6c

[PULL 06/38] migration: Fix analyze-migration.py 'configuration' parsing

2023-10-16 Thread Juan Quintela
"./scripts/analyze-migration.py", line 571, in read raise Exception("Unknown section type: %d" % section_type) Exception: Unknown section type: 5 Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231009184326.15777-3-faro

[PULL 32/38] migration/ram: Remove RAMState from xbzrle_cache_zero_page

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas 'rs' is not used in that function. It's a leftover from commit 9360447d34 ("ram: Use MigrationStats for statistics"). Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184604

[PULL 37/38] migration/multifd: Unify multifd_send_thread error paths

2023-10-16 Thread Juan Quintela
Quintela Signed-off-by: Juan Quintela Message-ID: <20231012134343.23757-3-faro...@suse.de> --- migration/multifd.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index 8e9a5ee394..c92955de41 100644 --- a/migration/mul

Re: [PATCH v2 3/9] net/slirp: use different IDs for each instance

2023-10-24 Thread Juan Quintela
marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Using always 0, QEMU will end up loading the same instance, even if > multiple have been saved. > > Signed-off-by: Marc-André Lureau Similar (but different) fix on next Migration PULL request. Later, Juan. > --- > net/slirp.c |

Re: [PATCH v2 7/9] migration: set file error on subsection loading

2023-10-24 Thread Juan Quintela
ing error. > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela queued.

Re: [PATCH v2 5/9] migration: check required subsections are loaded, once

2023-10-24 Thread Juan Quintela
marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Check that required subsections have been loaded. > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela I will let other people to comment on this before merging. I can see the (pontential problem) that

Re: [PATCH v2 8/9] test-vmstate: add some subsection tests

2023-10-24 Thread Juan Quintela
marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Check subsection support, and optional handling. > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela

Re: [PATCH v2 03/13] migration: Use vmstate_register_any() for isa-ide

2023-10-24 Thread Juan Quintela
Thomas Huth wrote: > On 20/10/2023 21.42, Juan Quintela wrote: >> Thomas Huth wrote: >>> On 20/10/2023 11.07, Juan Quintela wrote: >>>> Otherwise qom-test fails. >>>> ok 4 /i386/qom/x-remote >>>> qemu-system-i386: savevm_state_handler_inser

Re: [PATCH v2 4/9] migration: rename vmstate_save_needed->vmstate_section_needed

2023-10-24 Thread Juan Quintela
marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The function is used on save at this point. The following commits will > use it on load. > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela queued.

Re: [PATCH v2 6/9] migration: check required entries are loaded, once

2023-10-24 Thread Juan Quintela
marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela > @@ -2541,6 +2572,11 @@ qemu_loadvm_section_start_full(QEMUFile *f, > MigrationIncomingState *mis) > idstr, instance_id);

Re: [PATCH v2 9/9] docs/migration: reflect the changes about needed subsections

2023-10-24 Thread Juan Quintela
r QEMU that didn't send > -the subsection. > +don't understand, we just fail the migration. If we understand all the > +subsections, then we load the state with success. There's no check > +that an optional subsection is loaded, so a newer QEMU that knows > +about a subsection can (wi

Re: [PATCH v8 1/5] qemu-iotests: Filter warnings about block migration being deprecated

2023-10-24 Thread Juan Quintela
Hanna Czenczek wrote: > On 18.10.23 13:55, Juan Quintela wrote: >> Create a new filter that removes the two warnings for test 183. >> >> Signed-off-by: Juan Quintela >> --- >> tests/qemu-iotests/183 | 2 +- >> tests/qemu-iotests/common.fil

Re: [PATCH v2 9/9] docs/migration: reflect the changes about needed subsections

2023-10-24 Thread Juan Quintela
Marc-André Lureau wrote: > Hi > > On Tue, Oct 24, 2023 at 2:47 PM Juan Quintela wrote: >> >> marcandre.lur...@redhat.com wrote: >> > From: Marc-André Lureau >> > >> > Signed-off-by: Marc-André Lureau >> > --- >> > docs/

[PULL 02/39] migration/doc: Add documentation for backwards compatiblity

2023-10-24 Thread Juan Quintela
State what are the requeriments to get migration working between qemu versions. And once there explain how one is supposed to implement a new feature/default value and not break migration. Reviewed-by: Vladimir Sementsov-Ogievskiy Acked-by: Peter Xu Signed-off-by: Juan Quintela Message-ID

[PULL 04/39] migration/doc: We broke backwards compatibility

2023-10-24 Thread Juan Quintela
oes a hard reboot. Acked-by: Peter Xu Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018112827.1325-5-quint...@redhat.com> --- docs/devel/migration.rst | 202 +++ 1 file changed, 202 insertions(+) diff --git a/docs/devel/migr

[PULL 03/39] migration/doc: How to migrate when hosts have different features

2023-10-24 Thread Juan Quintela
Sometimes devices have different features depending of things outside of qemu. For instance the kernel. Document how to handle that cases. Acked-by: Peter Xu Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018112827.1325-4-quint...@redhat.com> --- docs

[PULL 13/39] migration: Create compress_update_rates()

2023-10-24 Thread Juan Quintela
So we can move more compression_counters stuff to ram-compress.c. Create compression_counters struct to add the stuff that was on MigrationState. Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-8-quint...@redhat.

[PULL 06/39] migration: Rename ram_handle_compressed() to ram_handle_zero()

2023-10-24 Thread Juan Quintela
Now that we know it only handles zero, we can remove the ch parameter. Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID: <20231019085259.13307-3-quint...@redhat.com> --- migration/ram.h | 2 +- migration/ram.c | 10 +- migration/rdma.

[PULL 10/39] migration: Make compress_data_with_multithreads return bool

2023-10-24 Thread Juan Quintela
Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-5-quint...@redhat.com> --- migration/ram-compress.h | 4 ++-- migration/ram-compress.c | 17 ++--- migration/ram.c | 3 +-- 3 files changed, 13 inse

[PULL 00/39] Migration 20231024 patches

2023-10-24 Thread Juan Quintela
registration fixes (thomas, juan) - start merging vmstate_section_needed changes (marc) - migration depreactions (juan) - migration documentation for backwards compatibility (juan) Please apply. Juan Quintela (31): migration/doc: Add

[PULL 08/39] migration: Give one error if trying to set COMPRESSION and XBZRLE

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-3-quint...@redhat.com> --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index b8c3c3218d..37fa1cfe74 100644 --- a/mig

[PULL 16/39] migration: Merge flush_compressed_data() and compress_flush_data()

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-11-quint...@redhat.com> --- migration/ram-compress.h | 1 - migration/ram-compress.c | 17 ++--- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/migration/ram-compre

[PULL 12/39] migration: Move busy++ to migrate_with_multithread

2023-10-24 Thread Juan Quintela
And now we can simplify save_compress_page(). Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-7-quint...@redhat.com> --- migration/ram-compress.c | 1 + migration/ram.c | 8 ++-- 2 files changed, 3 inse

[PULL 29/39] migration: Hack to maintain backwards compatibility for ppc

2023-10-24 Thread Juan Quintela
k_for_ppc() with warnings left and right that it is a hack. CC: Cedric Le Goater CC: Daniel Henrique Barboza CC: David Gibson CC: Greg Kurz Reviewed-by: Nicholas Piggin Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-8-quint...@redhat.com> --- include/migration/vmstat

[PULL 18/39] hw/ipmi: Don't call vmstate_register() from instance_init() functions

2023-10-24 Thread Juan Quintela
From: Thomas Huth instance_init() can be called multiple times, e.g. during introspection of the device. We should not install the vmstate handlers here. Do it in the realize() function instead. Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela Acked-by: Corey Minyard Signed-off-by: Juan

[PULL 15/39] migration: Move ram_flush_compressed_data() to ram-compress.c

2023-10-24 Thread Juan Quintela
As we export it, rename it compress_flush_data(). Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-10-quint...@redhat.com> --- migration/ram-compress.h | 1 + migration/ram-compress.c | 9 + migration/ram.c | 17 --

[PULL 05/39] migration: Receiving a zero page non zero is an error

2023-10-24 Thread Juan Quintela
a1febc4950f2c6232c002f401d7cd409f6fa6a88 Author: Richard Henderson Date: Mon Aug 29 11:46:14 2016 -0700 cutils: Export only buffer_is_zero Reviewed-by: Fabiano Rosas Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID: <20231019085259.13307-2-quint...@redhat.com> --- migration

[PULL 20/39] hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled" property

2023-10-24 Thread Juan Quintela
From: Thomas Huth There's no need for dedicated handlers here if they don't do anything special. Acked-by: David Hildenbrand Reviewed-by: Eric Farman Acked-by: Juan Quintela Signed-off-by: Thomas Huth Signed-off-by: Juan Quintela Message-ID: <20231020150554.664422-3-th...@redhat.

[PULL 23/39] migration: rename vmstate_save_needed->vmstate_section_needed

2023-10-24 Thread Juan Quintela
From: Marc-André Lureau The function is used on save at this point. The following commits will use it on load. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231024084043.2926316-5-marcandre.lur...@redhat.com> --- include/mig

[PULL 25/39] migration: Create vmstate_register_any()

2023-10-24 Thread Juan Quintela
-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-2-quint...@redhat.com> --- include/migration/vmstate.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 1af181877c..1ea9

[PULL 33/39] migration: Use vmstate_register_any() for eeprom93xx

2023-10-24 Thread Juan Quintela
We can have more than one eeprom93xx. For instance: e100_nic_realize() -> eeprom93xx_new() Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-13-quint...@redhat.com> --- hw/nvram/eeprom93xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PULL 09/39] migration: Remove save_page_use_compression()

2023-10-24 Thread Juan Quintela
After previous patch, we disable the posiblity that we use compression together with xbzrle. So we can use directly migrate_compress(). Once there, now we don't need the rs parameter, so remove it. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.1532

[PULL 22/39] migration/ram: Fix compilation with -Wshadow=local

2023-10-24 Thread Juan Quintela
From: Thomas Huth Rename the variable here to avoid that it shadows a variable from the beginning of the function scope. With this change the code now successfully compiles with -Wshadow=local. Signed-off-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID

[PULL 34/39] migration: Use vmstate_register_any() for vmware_vga

2023-10-24 Thread Juan Quintela
I have no idea if we can have more than one vmware_vga device, so play it safe. Reviewed-by: Stefan Berger Reviewed-by: Thomas Huth Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-14-quint...@redhat.com> --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1 insertion

[PULL 38/39] migration: Deprecate block migration

2023-10-24 Thread Juan Quintela
It is obsolete. It is better to use driver-mirror with NBD instead. CC: Kevin Wolf CC: Eric Blake CC: Stefan Hajnoczi CC: Hanna Czenczek Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-5-quint...@redhat.com> ---

[PULL 32/39] migration: Use vmstate_register_any() for audio

2023-10-24 Thread Juan Quintela
We can have more than one audio backend. void audio_init_audiodevs(void) { AudiodevListEntry *e; QSIMPLEQ_FOREACH(e, , next) { audio_init(e->dev, _fatal); } } Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-12-quint...@redh

[PULL 37/39] migration: migrate 'blk' command option is deprecated.

2023-10-24 Thread Juan Quintela
Use blocked-mirror with NBD instead. Acked-by: Stefan Hajnoczi Reviewed-by: Thomas Huth Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-4-quint...@redhat.com> --- docs/about/deprecated.rst | 9 + qapi/migration.json

[PULL 36/39] migration: migrate 'inc' command option is deprecated.

2023-10-24 Thread Juan Quintela
Use blockdev-mirror with NBD instead. Reviewed-by: Thomas Huth Acked-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-3-quint...@redhat.com> --- docs/about/deprecated.rst | 8 qapi/migration.json

[PULL 24/39] migration: set file error on subsection loading

2023-10-24 Thread Juan Quintela
From: Marc-André Lureau commit 13cde50889237 ("vmstate: Return error in case of error") sets QemuFile error to stop reading from it and report to the caller (checked by unit tests). We should do the same on subsection loading error. Signed-off-by: Marc-André Lureau Reviewed-by: Jua

[PULL 11/39] migration: Simplify compress_page_with_multithread()

2023-10-24 Thread Juan Quintela
Move the goto to a while true. Reviewed-by: Lukas Straub Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-6-quint...@redhat.com> --- migration/ram-compress.c | 48 1 file changed, 24 insertions(+), 24 del

[PULL 01/39] migration/doc: Add contents

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231018112827.1325-2-quint...@redhat.com> --- docs/devel/migration.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index c3e1400c0c..4d6a98ae58 100644 ---

[PULL 19/39] hw/s390x/s390-skeys: Don't call register_savevm_live() during instance_init()

2023-10-24 Thread Juan Quintela
quite a bit. Acked-by: David Hildenbrand Reviewed-by: Eric Farman Acked-by: Juan Quintela Signed-off-by: Thomas Huth Signed-off-by: Juan Quintela Message-ID: <20231020150554.664422-2-th...@redhat.com> --- hw/s390x/s390-skeys.c | 35 --- 1 file ch

[PULL 30/39] migration: Check in savevm_state_handler_insert for dups

2023-10-24 Thread Juan Quintela
Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-10-quint...@redhat.com> --- migration/savevm.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/migration/savevm.c b/migratio

[PULL 07/39] migration: Give one error if trying to set MULTIFD and XBZRLE

2023-10-24 Thread Juan Quintela
Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-2-quint...@redhat.com> --- migration/options.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/migration/options.c b/migration/options.c index 42fb818956..b8c3c3218d 100644 --- a/mig

[PULL 14/39] migration: Export send_queued_data()

2023-10-24 Thread Juan Quintela
This function is only used for compression. So we rename it as compress_send_queued_data(). We put it on ram-compress.h because we are moving it later to ram-compress.c. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-9-quint...@redhat.

[PULL 26/39] migration: Use vmstate_register_any()

2023-10-24 Thread Juan Quintela
This are the easiest cases, where we were already using VMSTATE_INSTANCE_ID_ANY. Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-3-quint...@redhat.com> --- backends/dbus-vmstate.c | 3 +-- backends/tpm/tpm_emulator.c | 3 +-- hw/i2c/

[PULL 35/39] qemu-iotests: Filter warnings about block migration being deprecated

2023-10-24 Thread Juan Quintela
Create a new filter that removes the two warnings for test 183. Reviewed-by: Hanna Czenczek Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-2-quint...@redhat.com> --- tests/qemu-iotests/183 | 2 +- tests/qemu-iotests/common.filter | 7 +++ 2 files chan

[PULL 21/39] hw/s390x/s390-stattrib: Don't call register_savevm_live() during instance_init()

2023-10-24 Thread Juan Quintela
From: Thomas Huth We must not call register_savevm_live() from an instance_init() function (since this could be called multiple times during device introspection). Move this to the realize() function instead. Acked-by: David Hildenbrand Reviewed-by: Eric Farman Signed-off-by: Juan Quintela

[PULL 17/39] migration: Rename ram_compressed_pages() to compress_ram_pages()

2023-10-24 Thread Juan Quintela
We are moving to have all functions exported from ram-compress.c to start with compress_. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231019110724.15324-12-quint...@redhat.com> --- migration/ram-compress.h | 2 +- migration/ram-compress.c | 2 +- migration

[PULL 28/39] migration: Use VMSTATE_INSTANCE_ID_ANY for slirp

2023-10-24 Thread Juan Quintela
/qtest/libqtest.c:195: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) Aborted (core dumped) Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-6-quint...@redhat.com> --- net/slirp.c | 5 +++-- 1 file chan

[PULL 39/39] migration: Deprecate old compression method

2023-10-24 Thread Juan Quintela
Acked-by: Stefan Hajnoczi Acked-by: Peter Xu Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231018115513.2163-6-quint...@redhat.com> --- docs/about/deprecated.rst | 8 + qapi/migration.json | 63 ++- mig

[PULL 31/39] migration: Improve example and documentation of vmstate_register()

2023-10-24 Thread Juan Quintela
Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-11-quint...@redhat.com> --- docs/devel/migration.rst | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index be91

[PULL 27/39] migration: Use vmstate_register_any() for isa-ide

2023-10-24 Thread Juan Quintela
exit status 1 (expected 0) Aborted (core dumped) $ Reviewed-by: Stefan Berger Signed-off-by: Juan Quintela Message-ID: <20231020090731.28701-4-quint...@redhat.com> --- hw/ide/isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 9505

[PATCH 01/12] qemu-file: We only call qemu_file_transferred_* on the sending side

2023-10-24 Thread Juan Quintela
Remove the increase in qemu_file_fill_buffer() and add asserts to qemu_file_transferred* functions. Signed-off-by: Juan Quintela --- migration/qemu-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 3fb25148d1

<    1   2   3   4   5   6   7   8   9   10   >