Re: [PULL 03/30] migration: Split save_live_pending() into state_pending_*

2023-02-09 Thread Juan Quintela
Avihai Horon wrote: > On 07/02/2023 2:56, Juan Quintela wrote: >> External email: Use caution opening links or attachments >> >> >> We split the function into to: >> >> - state_pending_estimate: We estimate the remaining state size without >>stop

Re: [PULL 28/30] multifd: Fix flush of zero copy page send request

2023-02-09 Thread Juan Quintela
"Duan, Zhenzhong" wrote: > Hi Juan, > >>-Original Message- >>From: Juan Quintela >>Sent: Tuesday, February 7, 2023 8:57 AM >>To: qemu-de...@nongnu.org >>Cc: qemu-block@nongnu.org; Stefan Berger ; >>Stefan Hajnoczi ; Halil Pasic ; &g

[PATCH 2/3] migration: Remove unused res_compatible

2023-02-08 Thread Juan Quintela
Nothing assigns to it after previous commit. Signed-off-by: Juan Quintela --- include/migration/register.h | 7 ++- migration/savevm.h | 2 -- hw/s390x/s390-stattrib.c | 1 - hw/vfio/migration.c| 3 +-- migration/block-dirty-bitmap.c | 1 - migration

[PATCH 3/3] migration: Remove _only suffix for res_postcopy/precopy

2023-02-08 Thread Juan Quintela
Once that res_compatible is removed, they don't make sense anymore. Signed-off-by: Juan Quintela --- include/migration/register.h | 18 -- migration/savevm.h | 8 hw/s390x/s390-stattrib.c | 7 +++ hw/vfio/migration.c| 10

[PATCH 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-08 Thread Juan Quintela
So remove last assignation of res_compatible. Signed-off-by: Juan Quintela --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index b966e148c2..85ccbf88ad 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3474,7 +3474,7

[PATCH 0/3] Remove res_compatible parameter

2023-02-08 Thread Juan Quintela
/precopy_only to not have the _only suffix. Please review. Juan Quintela (3): migration: In case of postcopy, the memory ends in res_postcopy_only migration: Remove unused res_compatible migration: Remove _only suffix for res_postcopy/precopy include/migration/register.h | 21

[PULL 17/30] virtio-mem: Fail if a memory backend with "prealloc=on" is specified

2023-02-06 Thread Juan Quintela
viewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- hw/virtio/virtio-mem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 1ed1f5a4af..02f7b5469a 100644 --- a/hw

[PULL 01/30] migration: Fix migration crash when target psize larger than host

2023-02-06 Thread Juan Quintela
/1456 Fixes: d9e474ea56 ("migration: Teach PSS about host page") Signed-off-by: Peter Xu Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/migrati

[PULL 28/30] multifd: Fix flush of zero copy page send request

2023-02-06 Thread Juan Quintela
From: Zhenzhong Duan Make IO channel flush call after the inflight request has been drained in multifd thread, or else we may missed to flush the inflight request. Signed-off-by: Zhenzhong Duan Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- .../x86_64-quintela-devices.mak

[PULL 02/30] migration: No save_live_pending() method uses the QEMUFile parameter

2023-02-06 Thread Juan Quintela
So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2 +- migration/savevm.h | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration.c| 2 +- migration/block-dirty-bitmap.c | 2

[PULL 10/30] migration/ram: Rely on used_length for uffd_change_protection()

2023-02-06 Thread Juan Quintela
actually be protected and is just a NOP. So let's only protect everything up to used_length. Note: it still makes sense to register uffd-wp for max_length, such that RAM_UF_WRITEPROTECT is independent of a changing used_length. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off

[PULL 18/30] virtio-mem: Migrate immutable properties early

2023-02-06 Thread Juan Quintela
Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/hw/virtio/virtio-mem.h | 8 ++ hw/core/machine.c | 4 ++- hw/virtio/virtio-mem.c | 51 -- 3 files changed, 60 insertions(+), 3

[PULL 13/30] migration/savevm: Prepare vmdesc json writer in qemu_savevm_state_setup()

2023-02-06 Thread Juan Quintela
From: David Hildenbrand ... and store it in the migration state. This is a preparation for storing selected vmds's already in qemu_savevm_state_setup(). Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Signed-off-by: David

[PULL 16/30] migration/ram: Factor out check for advised postcopy

2023-02-06 Thread Juan Quintela
From: David Hildenbrand Let's factor out this check, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan

[PULL 30/30] migration: save/delete migration thread info

2023-02-06 Thread Juan Quintela
From: Jiang Jiacheng To support query migration thread infomation, save and delete thread(live_migration and multifdsend) information at thread creation and finish. Signed-off-by: Jiang Jiacheng Signed-off-by: Juan Quintela --- migration/migration.c | 5 + migration/multifd.c | 5

[PULL 08/30] migration/ram: Fix error handling in ram_write_tracking_start()

2023-02-06 Thread Juan Quintela
uffd_change_protection(false) is fine. Fixes: 278e2f551a09 ("migration: support UFFD write fault processing in ram_save_iterate()") Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration

[PULL 29/30] migration: Introduce interface query-migrationthreads

2023-02-06 Thread Juan Quintela
Quintela Signed-off-by: Juan Quintela --- qapi/migration.json| 29 migration/threadinfo.h | 28 +++ migration/threadinfo.c | 51 ++ migration/meson.build | 1 + 4 files changed, 109 insertions(+) create mode

[PULL 26/30] migration: check magic value for deciding the mapping of channels

2023-02-06 Thread Juan Quintela
d-by: Juan Quintela Suggested-by: Daniel P. Berrange Signed-off-by: manish.mishra Signed-off-by: Juan Quintela --- migration/channel.h | 5 migration/multifd.h | 2 +- migration/postcopy-ram.h | 2 +- migration/channel.c | 45 + migration/m

[PULL 21/30] migration/rdma: fix return value for qio_channel_rdma_{readv, writev}

2023-02-06 Thread Juan Quintela
Zhang Chen Reviewed-by: Juan Quintela Signed-off-by: Fiona Ebner Signed-off-by: Juan Quintela --- migration/rdma.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 94a55dd95b..0ba1668d70 100644 --- a/migration/rd

[PULL 24/30] migration/dirtyrate: Show sample pages only in page-sampling mode

2023-02-06 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/dirtyrate.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 4bfb97fc68..575d48c397 100644 --- a/migration/dirtyrate.c +++ b

[PULL 19/30] virtio-mem: Proper support for preallocation with migration

2023-02-06 Thread Juan Quintela
f ff ff ff ff [...] }, ":00:04.0/virtio-mem-device-early (53)": { "tmp": "00 00 00 08 c0 00 00 00 00 00 00 07 80 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00", "size": "0x0001fa40", "bitmap": "ff ff ff ff ff ff ff ff ff ff f

[PULL 25/30] io: Add support for MSG_PEEK for socket channel

2023-02-06 Thread Juan Quintela
-by: Peter Xu Reviewed-by: Daniel P. Berrange Reviewed-by: Juan Quintela Suggested-by: Daniel P. Berrange Signed-off-by: manish.mishra Signed-off-by: Juan Quintela --- include/io/channel.h| 6 ++ chardev/char-socket.c | 4 ++-- io/channe

[PULL 27/30] multifd: Fix a race on reading MultiFDPages_t.block

2023-02-06 Thread Juan Quintela
Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/multifd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/migration/multifd.c b/migration/multifd.c index eeb4fb87ee..ad89293b4e 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -442,6

[PULL 23/30] migration: Perform vmsd structure check during tests

2023-02-06 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Juan Quintela Signed-off-by: Jua

[PULL 15/30] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST()

2023-02-06 Thread Juan Quintela
From: David Hildenbrand We'll make use of both next in the context of virtio-mem. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/migration

[PULL 22/30] migration: Add canary to VMSTATE_END_OF_LIST

2023-02-06 Thread Juan Quintela
D that should be set, and assert it is set during the traversal. Note: This can't go in until we update the copy of vmstate.h in slirp. Suggested-by: Peter Maydell Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed

[PULL 20/30] migration: Show downtime during postcopy phase

2023-02-06 Thread Juan Quintela
t I assume it shouldn't affect anyone. Reviewed-by: Leonardo Bras Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela --- migration/migration.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migrati

[PULL 14/30] migration/savevm: Allow immutable device state to be migrated early (i.e., before RAM)

2023-02-06 Thread Juan Quintela
on. While at it, also use a bool for the "unmigratable" member. Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/migration/vmstate.h | 16 +++- migration/savevm.c |

[PULL 07/30] migration/ram: Fix populate_read_range()

2023-02-06 Thread Juan Quintela
dable in ram_block_populate_pages()") Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index

[PULL 06/30] util/userfaultfd: Add uffd_open()

2023-02-06 Thread Juan Quintela
From: Peter Xu Add a helper to create the uffd handle. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela --- include/qemu/userfaultfd.h | 12 migration/postcopy-ram.c | 11 +-- tests/qtest

[PULL 09/30] migration/ram: Don't explicitly unprotect when unregistering uffd-wp

2023-02-06 Thread Juan Quintela
l clearing of uffd-wp. If ever relevant, we could clear conditionally in uffd_unregister_memory() -- we just need a way to figure out more recent kernels. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 9 --

[PULL 03/30] migration: Split save_live_pending() into state_pending_*

2023-02-06 Thread Juan Quintela
t() is ram. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 18 --- docs/devel/vfio-migration.rst | 4 ++-- include/migration/register.h | 19 +-- migration/savevm.h | 12 ++ hw/s390x/s390-

[PULL 11/30] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager

2023-02-06 Thread Juan Quintela
waste memory. So let's exclude these ranges, just like ram_block_populate_read() already does. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 36 ++-- 1 file changed, 34

[PULL 12/30] migration/savevm: Move more savevm handling into vmstate_save()

2023-02-06 Thread Juan Quintela
-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/savevm.c | 79 ++ 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c

[PULL 04/30] migration: Remove unused threshold_size parameter

2023-02-06 Thread Juan Quintela
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2

[PULL 05/30] migration: simplify migration_iteration_run()

2023-02-06 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 7cab4b8192..6d4cd8083b 100644 --- a/migration/migration.c

[PULL 00/30] Migration 20230206 patches

2023-02-06 Thread Juan Quintela
migration: save/delete migration thread info Juan Quintela (4): migration: No save_live_pending() method uses the QEMUFile parameter migration: Split save_live_pending() into state_pending_* migration: Remove unused threshold_size parameter migration: simplify migration_iteration_run() P

Re: [PULL 00/26] Next patches

2023-02-06 Thread Juan Quintela
Juan Quintela wrote: > The following changes since commit deabea6e88f7c4c3c12a36ee30051c6209561165: > > Merge tag 'for_upstream' of > https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-02-02 > 10:10:07 +) > > are available in the Git repos

Re: [PULL 00/26] Next patches

2023-02-06 Thread Juan Quintela
On Mon, Feb 6, 2023, 23:07 Peter Xu wrote: > On Sat, Feb 04, 2023 at 10:19:34AM +, Peter Maydell wrote: > > On Thu, 2 Feb 2023 at 16:07, Juan Quintela wrote: > > > > > > The following changes since commit > deabea6e88f7c4c3c12a36ee30051c6209561165: > &g

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-06 Thread Juan Quintela
Peter Maydell wrote: > On Fri, 3 Feb 2023 at 21:14, Juan Quintela wrote: >> >> Peter Maydell wrote: >> > The migration tests have been flaky for a while now, >> > including setups where host and guest page sizes are the same. >> > (For instance, my x

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-06 Thread Juan Quintela
Thomas Huth wrote: > On 03/02/2023 22.14, Juan Quintela wrote: >> Peter Maydell wrote: >>> On Fri, 3 Feb 2023 at 15:44, Thomas Huth wrote: >>>> >>>> On 03/02/2023 13.08, Kevin Wolf wrote: >>>>> Am 03.02.2023 um 12:23 hat Thomas Huth ge

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Juan Quintela
Peter Maydell wrote: > On Fri, 3 Feb 2023 at 15:44, Thomas Huth wrote: >> >> On 03/02/2023 13.08, Kevin Wolf wrote: >> > Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: >> >> On 30/01/2023 11.58, Daniel P. Berrangé wrote: >> >>> On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: >>

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Juan Quintela
Kevin Wolf wrote: > Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: >> On 30/01/2023 11.58, Daniel P. Berrangé wrote: >> > On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: >> > > We can get rid of the build-coroutine-sigaltstack job by moving >> > > the configure flags that should

[PULL 22/26] migration: Add canary to VMSTATE_END_OF_LIST

2023-02-02 Thread Juan Quintela
D that should be set, and assert it is set during the traversal. Note: This can't go in until we update the copy of vmstate.h in slirp. Suggested-by: Peter Maydell Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed

[PULL 20/26] migration: Show downtime during postcopy phase

2023-02-02 Thread Juan Quintela
t I assume it shouldn't affect anyone. Reviewed-by: Leonardo Bras Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela --- migration/migration.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migrati

[PULL 15/26] migration/vmstate: Introduce VMSTATE_WITH_TMP_TEST() and VMSTATE_BITMAP_TEST()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand We'll make use of both next in the context of virtio-mem. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/migration

[PULL 24/26] migration/dirtyrate: Show sample pages only in page-sampling mode

2023-02-02 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/dirtyrate.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 4bfb97fc68..575d48c397 100644 --- a/migration/dirtyrate.c +++ b

[PULL 19/26] virtio-mem: Proper support for preallocation with migration

2023-02-02 Thread Juan Quintela
f ff ff ff ff [...] }, ":00:04.0/virtio-mem-device-early (53)": { "tmp": "00 00 00 08 c0 00 00 00 00 00 00 07 80 00 00 00 00 00 00 00 00 20 00 00 00 00 00 00", "size": "0x0001fa40", "bitmap": "ff ff ff ff ff ff ff ff ff ff f

[PULL 08/26] migration/ram: Fix error handling in ram_write_tracking_start()

2023-02-02 Thread Juan Quintela
uffd_change_protection(false) is fine. Fixes: 278e2f551a09 ("migration: support UFFD write fault processing in ram_save_iterate()") Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration

[PULL 21/26] migration/rdma: fix return value for qio_channel_rdma_{readv, writev}

2023-02-02 Thread Juan Quintela
Zhang Chen Reviewed-by: Juan Quintela Signed-off-by: Fiona Ebner Signed-off-by: Juan Quintela --- migration/rdma.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 94a55dd95b..0ba1668d70 100644 --- a/migration/rd

[PULL 26/26] migration: check magic value for deciding the mapping of channels

2023-02-02 Thread Juan Quintela
d-by: Juan Quintela Suggested-by: Daniel P. Berrange Signed-off-by: manish.mishra Signed-off-by: Juan Quintela --- migration/channel.h | 5 migration/multifd.h | 2 +- migration/postcopy-ram.h | 2 +- migration/channel.c | 45 + migration/m

[PULL 18/26] virtio-mem: Migrate immutable properties early

2023-02-02 Thread Juan Quintela
Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/hw/virtio/virtio-mem.h | 8 ++ hw/core/machine.c | 4 ++- hw/virtio/virtio-mem.c | 51 -- 3 files changed, 60 insertions(+), 3

[PULL 11/26] migration/ram: Optimize ram_write_tracking_start() for RamDiscardManager

2023-02-02 Thread Juan Quintela
waste memory. So let's exclude these ranges, just like ram_block_populate_read() already does. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 36 ++-- 1 file changed, 34

[PULL 06/26] util/userfaultfd: Add uffd_open()

2023-02-02 Thread Juan Quintela
From: Peter Xu Add a helper to create the uffd handle. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Signed-off-by: Juan Quintela --- include/qemu/userfaultfd.h | 8 migration/postcopy-ram.c | 11 +-- tests/qtest/migration

[PULL 00/26] Next patches

2023-02-02 Thread Juan Quintela
virtio-mem: Proper support for preallocation with migration Dr. David Alan Gilbert (2): migration: Add canary to VMSTATE_END_OF_LIST migration: Perform vmsd structure check during tests Fiona Ebner (1): migration/rdma: fix return value for qio_channel_rdma_{readv,writev} Juan Quintela (4):

[PULL 25/26] io: Add support for MSG_PEEK for socket channel

2023-02-02 Thread Juan Quintela
-by: Peter Xu Reviewed-by: Daniel P. Berrange Reviewed-by: Juan Quintela Suggested-by: Daniel P. Berrange Signed-off-by: manish.mishra Signed-off-by: Juan Quintela --- include/io/channel.h| 6 ++ chardev/char-socket.c | 4 ++-- io/channe

[PULL 23/26] migration: Perform vmsd structure check during tests

2023-02-02 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Peter Maydell Reviewed-by: Juan Quintela Signed-off-by: Jua

[PULL 17/26] virtio-mem: Fail if a memory backend with "prealloc=on" is specified

2023-02-02 Thread Juan Quintela
viewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- hw/virtio/virtio-mem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 1ed1f5a4af..02f7b5469a 100644 --- a/hw

[PULL 16/26] migration/ram: Factor out check for advised postcopy

2023-02-02 Thread Juan Quintela
From: David Hildenbrand Let's factor out this check, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan

[PULL 03/26] migration: Split save_live_pending() into state_pending_*

2023-02-02 Thread Juan Quintela
t() is ram. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 18 --- docs/devel/vfio-migration.rst | 4 ++-- include/migration/register.h | 19 +-- migration/savevm.h | 12 ++ hw/s390x/s390-

[PULL 13/26] migration/savevm: Prepare vmdesc json writer in qemu_savevm_state_setup()

2023-02-02 Thread Juan Quintela
From: David Hildenbrand ... and store it in the migration state. This is a preparation for storing selected vmds's already in qemu_savevm_state_setup(). Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Signed-off-by: David

[PULL 05/26] migration: simplify migration_iteration_run()

2023-02-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 594a42f085..cb9aee76c0 100644 --- a/migration/migration.c

[PULL 09/26] migration/ram: Don't explicitly unprotect when unregistering uffd-wp

2023-02-02 Thread Juan Quintela
l clearing of uffd-wp. If ever relevant, we could clear conditionally in uffd_unregister_memory() -- we just need a way to figure out more recent kernels. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 9 --

[PULL 12/26] migration/savevm: Move more savevm handling into vmstate_save()

2023-02-02 Thread Juan Quintela
-by: Michael S. Tsirkin Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/savevm.c | 79 ++ 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c

[PULL 02/26] migration: No save_live_pending() method uses the QEMUFile parameter

2023-02-02 Thread Juan Quintela
So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2 +- migration/savevm.h | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/vfio/migration.c| 2 +- migration/block-dirty-bitmap.c | 2

[PULL 07/26] migration/ram: Fix populate_read_range()

2023-02-02 Thread Juan Quintela
dable in ram_block_populate_pages()") Cc: qemu-sta...@nongnu.org Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- migration/ram.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index

[PULL 04/26] migration: Remove unused threshold_size parameter

2023-02-02 Thread Juan Quintela
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2

[PULL 14/26] migration/savevm: Allow immutable device state to be migrated early (i.e., before RAM)

2023-02-02 Thread Juan Quintela
on. While at it, also use a bool for the "unmigratable" member. Reviewed-by: Peter Xu Reviewed-by: Michael S. Tsirkin Reviewed-by: Juan Quintela S Signed-off-by: David Hildenbrand Signed-off-by: Juan Quintela --- include/migration/vmstate.h | 16 +++- migration/savevm.c |

[PULL 01/26] migration: Fix migration crash when target psize larger than host

2023-02-02 Thread Juan Quintela
/1456 Fixes: d9e474ea56 ("migration: Teach PSS about host page") Signed-off-by: Peter Xu Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/migrati

[PULL 10/26] migration/ram: Rely on used_length for uffd_change_protection()

2023-02-02 Thread Juan Quintela
actually be protected and is just a NOP. So let's only protect everything up to used_length. Note: it still makes sense to register uffd-wp for max_length, such that RAM_UF_WRITEPROTECT is independent of a changing used_length. Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off

Re: [PULL 0/5] Next patches

2023-02-02 Thread Juan Quintela
Juan Quintela wrote: NACK As they are not integrated, I am sending a new PULL request with the fix for the issue spotted by Vladimir. > The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: > > Merge tag 'block-pull-request' of https://gitlab.com/stef

Re: [PULL 5/5] migration: simplify migration_iteration_run()

2023-02-02 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 30.01.23 11:03, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Dr. David Alan Gilbert >> --- >> migration/migration.c | 24 >> 1 file changed, 12 insertions(+), 12 delet

Re: [PATCH v5 04/20] scripts/clean-includes: Improve --git commit message

2023-02-02 Thread Juan Quintela
de qemu/osdep.h first. > * Including it in a .h is redundant, since the .c already includes > it. Drop such inclusions. > * Likewise, including headers qemu/osdep.h includes is redundant. > Drop these, too. Perfect, thanks. Reviewed-by: Juan Quintela or whatever you want it O:-)

Re: [PULL 5/5] migration: simplify migration_iteration_run()

2023-02-02 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 30.01.23 11:03, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Dr. David Alan Gilbert >> --- >> migration/migration.c | 24 >> 1 file changed, 12 insertions(+), 12 delet

Re: [PATCH v3] migration: Remove res_compatible parameter

2023-02-02 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 1/30/23 11:06, Juan Quintela wrote: >> It was only used for RAM, and in that case, it means that this amount >> of data was sent for memory. Just delete the field in all callers. > > Could you describe, why it's safe to change the

Re: [PATCH 18/32] migration: Move the QMP command from monitor/ to migration/

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > This moves the command from MAINTAINERS sections "Human Monitor (HMP)" > and "QMP" to "Migration". > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 17/32] migration: Move HMP commands from monitor/ to migration/

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > This moves these commands from MAINTAINERS sections "Human > Monitor (HMP)" and "QMP" to "Migration". > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH v5 04/20] scripts/clean-includes: Improve --git commit message

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Markus Armbruster wrote: >>> Juan Quintela writes: >>> >>>> Markus Armbruster wrote: >>>>> The script drops #include "qemu/osdep.h" from headers. Mention it in >>&g

Re: [PATCH v5 04/20] scripts/clean-includes: Improve --git commit message

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Markus Armbruster wrote: >>> The script drops #include "qemu/osdep.h" from headers. Mention it in >>> the commit message it uses for --git. >>> >>> Signed-off-by: Markus Armbruster

Re: [PATCH v5 04/20] scripts/clean-includes: Improve --git commit message

2023-01-30 Thread Juan Quintela
;include" the "include files" is interesting/confusing/ Anyways, if you preffer old text or net one. Reviewed-by: Juan Quintela

[PATCH v3] migration: Remove res_compatible parameter

2023-01-30 Thread Juan Quintela
It was only used for RAM, and in that case, it means that this amount of data was sent for memory. Just delete the field in all callers. [Rest of the pages on the vfio series are already on my previous pull request] Signed-off-by: Juan Quintela --- include/migration/register.h | 27

[PULL 2/5] migration: No save_live_pending() method uses the QEMUFile parameter

2023-01-30 Thread Juan Quintela
So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2 +- migration/savevm.h | 2 +- hw/s390x/s390-stattrib.c | 3 +-- hw/vfio/migration.c| 2 +- migration/block-dirty-bitmap.c | 2

[PULL 5/5] migration: simplify migration_iteration_run()

2023-01-30 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 594a42f085..644c61e91d 100644 --- a/migration/migration.c

[PULL 1/5] migration: Fix migration crash when target psize larger than host

2023-01-30 Thread Juan Quintela
/1456 Fixes: d9e474ea56 ("migration: Teach PSS about host page") Signed-off-by: Peter Xu Reviewed-by: Thomas Huth Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/migrati

[PULL 3/5] migration: Split save_live_pending() into state_pending_*

2023-01-30 Thread Juan Quintela
t() is ram. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- docs/devel/migration.rst | 18 --- docs/devel/vfio-migration.rst | 4 ++-- include/migration/register.h | 19 +-- migration/savevm.h | 12 ++ hw/s390x/s390-

[PULL 4/5] migration: Remove unused threshold_size parameter

2023-01-30 Thread Juan Quintela
Until previous commit, save_live_pending() was used for ram. Now with the split into state_pending_estimate() and state_pending_exact() it is not needed anymore, so remove them. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- include/migration/register.h | 2

[PULL 0/5] Next patches

2023-01-30 Thread Juan Quintela
bigger than host - The parts that are reviewed of my vfio series Please, apply. Juan Quintela (4): migration: No save_live_pending() method uses the QEMUFile parameter migration: Split save_live_pending() into state_pending_

Re: [PATCH v4 19/19] Drop duplicate #include

2023-01-29 Thread Juan Quintela
#include "hw/boards.h" > #include "exec/ramblock.h" > #include "socket.h" > -#include "qemu-file.h" > #include "yank_functions.h" > #include "tls.h" Ouch Reviewed-by: Juan Quintela I don't want to look into the logs. They *could* say that it was me the one doing the mess.

Re: [PATCH v4 16/19] Fix non-first inclusions of qemu/osdep.h

2023-01-29 Thread Juan Quintela
Markus Armbruster wrote: > This commit was created with scripts/clean-includes. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH v4 10/19] migration: Clean up includes

2023-01-29 Thread Juan Quintela
includes > > Clean up includes so that osdep.h is included first in .c and not in > .h, and headers which it implies are not included manually. > > This commit was created with scripts/clean-includes. > > >> but OK then, so >> >> Reviewed-by: Dr. David Alan Gilbert Sounds ok to me. Reviewed-by: Juan Quintela

[PULL 05/19] migration: Take bitmap mutex when completing ram migration

2022-12-15 Thread Juan Quintela
it too. Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quintela --- migration/ram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 8aad17c429..cc72c24c18 100644 --- a/migration/ram.c

[PULL 07/19] migration: Cleanup xbzrle zero page cache update logic

2022-12-15 Thread Juan Quintela
eded anymore. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 00a2e30322..7124ff531c

[PULL 16/19] migration: Move last_sent_block into PageSearchStatus

2022-12-15 Thread Juan Quintela
into PageSearchStatus. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 71 - 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/migration/ram.c b

[PULL 03/19] migration: Export ram_transferred_ram()

2022-12-15 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Leonardo Bras --- migration/ram.h | 2 ++ migration/ram.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/ram.h b/migration/ram.h index c7af65ac74

[PULL 10/19] migration: Yield bitmap_mutex properly when sending/sleeping

2022-12-15 Thread Juan Quintela
ion ram_save_host_page() because all threads may need the bitmap_mutex to operate on bitmaps, so that either sendmsg() or any kind of qemu_sem_wait() blocking for one thread will not block the other from progressing. Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilb

[PULL 00/19] Next 8.0 patches

2022-12-15 Thread Juan Quintela
ped, intel posted a fix, I have to redo it - Fix for out of order channels is out Daniel nacked it and I need to redo it ---- Juan Quintela (4): multifd: Create page_size fields into both MultiFD{Recv,Send}Params multifd: Cre

[PULL 06/19] migration: Add postcopy_preempt_active()

2022-12-15 Thread Juan Quintela
From: Peter Xu Add the helper to show that postcopy preempt enabled, meanwhile active. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions

[PULL 12/19] migration: Teach PSS about host page

2022-12-15 Thread Juan Quintela
l page. Currently ram_save_host_page() is still the only user. If there'll be another function to send host page (e.g. in return path thread) in the future, it should follow the same style. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Qu

[PULL 01/19] multifd: Create page_size fields into both MultiFD{Recv, Send}Params

2022-12-15 Thread Juan Quintela
We were calling qemu_target_page_size() left and right. Signed-off-by: Juan Quintela Reviewed-by: Leonardo Bras --- migration/multifd.h | 4 migration/multifd-zlib.c | 14 ++ migration/multifd-zstd.c | 12 +--- migration/multifd.c | 18 -- 4

[PULL 14/19] migration: Add pss_init()

2022-12-15 Thread Juan Quintela
From: Peter Xu Helper to init PSS structures. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/migration/ram.c b/migration

<    5   6   7   8   9   10   11   12   13   14   >