qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' objec


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 8c4716: tests/qtest/migration: Add 'to' object into migrat...
Date: Tue, 23 Apr 2024 23:50:32 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 8c47168cca012aa6f64dc50eebdb126ab81e360a
      
https://github.com/qemu/qemu/commit/8c47168cca012aa6f64dc50eebdb126ab81e360a
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Add 'to' object into migrate_qmp()

Add the 'to' object into migrate_qmp(), so we can use
migrate_get_socket_address() inside migrate_qmp() to get
the port value. This is not applied to other migrate_qmp*
because they don't need the port.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-2-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: d1155fd485d54e55fd26804c04635404ce5da43b
      
https://github.com/qemu/qemu/commit/d1155fd485d54e55fd26804c04635404ce5da43b
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Replace connect_uri and move 
migrate_get_socket_address inside migrate_qmp

Move the calls to migrate_get_socket_address() into migrate_qmp().
Get rid of connect_uri and replace it with args->connect_uri only
because 'to' object will help to generate connect_uri with the
correct port number.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-3-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
      
https://github.com/qemu/qemu/commit/4f2f5b694d9dec2dde87a9155b0cb674dc3e6644
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  tests/qtest/migration: Replace migrate_get_connect_uri inplace of 
migrate_get_socket_address

Refactor migrate_get_socket_address to internally utilize 'socket-address'
parameter, reducing redundancy in the function definition.

migrate_get_socket_address implicitly converts SocketAddress into str.
Move migrate_get_socket_address inside migrate_get_connect_uri which
should return the uri string instead.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-4-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 387dc407db6137cec479f6c6efb3851464ea9026
      
https://github.com/qemu/qemu/commit/387dc407db6137cec479f6c6efb3851464ea9026
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Add channels parameter in migrate_qmp_fail

Alter migrate_qmp_fail() to allow both uri and channels
independently. For channels, convert string to a Dict.
No dealing with migrate_get_socket_address() here because
we will fail before starting the migration anyway.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-5-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
      
https://github.com/qemu/qemu/commit/2a49e3c618cd9edd0ef44af5cd19f7159bc52efc
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  tests/qtest/migration: Add migrate_set_ports into migrate_qmp to update 
migration port value

migrate_get_connect_qdict gets qdict with the dst QEMU parameters.

migrate_set_ports() from list of channels reads each QDict for port,
and fills the port with correct value in case it was 0 in the test.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-6-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: d5ee387de9169a0b1b7f20a930d58b7a3b676f45
      
https://github.com/qemu/qemu/commit/d5ee387de9169a0b1b7f20a930d58b7a3b676f45
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Add channels parameter in migrate_qmp

Alter migrate_qmp() to allow use of channels parameter, but only
fill the uri with correct port number if there are no channels.
Here we don't want to allow the wrong cases of having both or
none (ex: migrate_qmp_fail).

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-7-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 9d36d62c00fce08103cc6a801365e5df45acbaa6
      
https://github.com/qemu/qemu/commit/9d36d62c00fce08103cc6a801365e5df45acbaa6
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Add multifd_tcp_plain test using list of channels 
instead of uri

Add a positive test to check multifd live migration but this time
using list of channels (restricted to 1) as the starting point
instead of simple uri string.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-8-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: bc6307a5eea8cfee4a0239a61151da2d83e88e5b
      
https://github.com/qemu/qemu/commit/bc6307a5eea8cfee4a0239a61151da2d83e88e5b
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest/migration: Add negative tests to validate migration QAPIs

Migration QAPI arguments - uri and channels are mutually exhaustive.
Add negative validation tests, one with both arguments present and
one with none present.

Signed-off-by: Het Gala <het.gala@nutanix.com>
Suggested-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240312202634.63349-9-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: fe3ba17b330afd2f6004bcd36e5181f91d319106
      
https://github.com/qemu/qemu/commit/fe3ba17b330afd2f6004bcd36e5181f91d319106
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M tests/qtest/migration-helpers.c

  Log Message:
  -----------
  tests/qtest/migration: Fix typo for vsock in SocketAddress_to_str

Signed-off-by: Het Gala <het.gala@nutanix.com>
Link: https://lore.kernel.org/r/20240319204840.211632-2-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: e86f243487ed8cf71eddfe9b28eb8109d09556af
      
https://github.com/qemu/qemu/commit/e86f243487ed8cf71eddfe9b28eb8109d09556af
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/s390x/s390-stattrib-kvm.c
    M hw/s390x/s390-stattrib.c
    M include/hw/s390x/storage-attributes.h

  Log Message:
  -----------
  s390/stattrib: Add Error** argument to set_migrationmode() handler

This will prepare ground for future changes adding an Error** argument
to the save_setup() handler. We need to make sure that on failure,
set_migrationmode() always sets a new error. See the Rules section in
qapi/error.h.

Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-2-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 31cf7c1413db6c8fba6d9e73d77e4ab6faee0408
      
https://github.com/qemu/qemu/commit/31cf7c1413db6c8fba6d9e73d77e4ab6faee0408
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/vfio/migration.c

  Log Message:
  -----------
  vfio: Always report an error in vfio_save_setup()

This will prepare ground for future changes adding an Error** argument
to the save_setup() handler. We need to make sure that on failure,
vfio_save_setup() always sets a new error.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-3-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 150da48cb28ff68ca51b5ab26c6d930bad60a460
      
https://github.com/qemu/qemu/commit/150da48cb28ff68ca51b5ab26c6d930bad60a460
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/block.c

  Log Message:
  -----------
  migration: Always report an error in block_save_setup()

This will prepare ground for future changes adding an Error** argument
to the save_setup() handler. We need to make sure that on failure,
block_save_setup() always sets a new error.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-4-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 76936bbc313190f8e4ea5e33f793fd00bf49b3f0
      
https://github.com/qemu/qemu/commit/76936bbc313190f8e4ea5e33f793fd00bf49b3f0
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Always report an error in ram_save_setup()

This will prepare ground for future changes adding an Error** argument
to the save_setup() handler. We need to make sure that on failure,
ram_save_setup() sets a new error.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-5-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 6138d43ab2b1d013ebe2cfe2917e6279396473b2
      
https://github.com/qemu/qemu/commit/6138d43ab2b1d013ebe2cfe2917e6279396473b2
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Add Error** argument to vmstate_save()

This will prepare ground for future changes adding an Error** argument
to qemu_savevm_state_setup().

Reviewed-by: Prasad Pandit <pjp@fedoraproject.org>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-6-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 057a20099b62c5ac3c925f3fe12bdedac96e647b
      
https://github.com/qemu/qemu/commit/057a20099b62c5ac3c925f3fe12bdedac96e647b
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/migration.c
    M migration/savevm.c
    M migration/savevm.h

  Log Message:
  -----------
  migration: Add Error** argument to qemu_savevm_state_setup()

This prepares ground for the changes coming next which add an Error**
argument to the .save_setup() handler. Callers of qemu_savevm_state_setup()
now handle the error and fail earlier setting the migration state from
MIGRATION_STATUS_SETUP to MIGRATION_STATUS_FAILED.

In qemu_savevm_state(), move the cleanup to preserve the error
reported by .save_setup() handlers.

Since the previous behavior was to ignore errors at this step of
migration, this change should be examined closely to check that
cleanups are still correctly done.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-7-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 01c3ac681bd6709d2bf6a7d9591c40a394e39536
      
https://github.com/qemu/qemu/commit/01c3ac681bd6709d2bf6a7d9591c40a394e39536
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/s390x/s390-stattrib.c
    M hw/vfio/migration.c
    M include/migration/register.h
    M migration/block-dirty-bitmap.c
    M migration/block.c
    M migration/ram.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: Add Error** argument to .save_setup() handler

The purpose is to record a potential error in the migration stream if
qemu_savevm_state_setup() fails. Most of the current .save_setup()
handlers can be modified to use the Error argument instead of managing
their own and calling locally error_report().

Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Harsh Prateek Bora <harshpb@linux.ibm.com>
Cc: Halil Pasic <pasic@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: John Snow <jsnow@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-8-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: e4fa064d5610a96e50b49c1ea34c98ef12d0034a
      
https://github.com/qemu/qemu/commit/e4fa064d5610a96e50b49c1ea34c98ef12d0034a
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/vfio/migration.c
    M include/migration/register.h
    M migration/ram.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: Add Error** argument to .load_setup() handler

This will be useful to report errors at a higher level, mostly in VFIO
today.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-9-clg@redhat.com
[peterx: drop comment for ERRP_GUARD, per Markus]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 3688fec8923101b3a44acde7f3db59b76f82b838
      
https://github.com/qemu/qemu/commit/3688fec8923101b3a44acde7f3db59b76f82b838
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/i386/xen/xen-hvm.c
    M hw/vfio/common.c
    M hw/virtio/vhost.c
    M include/exec/memory.h
    M system/memory.c

  Log Message:
  -----------
  memory: Add Error** argument to .log_global_start() handler

Modify all .log_global_start() handlers to take an Error** parameter
and return a bool. Adapt memory_global_dirty_log_start() to interrupt
on the first error the loop on handlers. In such case, a rollback is
performed to stop dirty logging on all listeners where it was
previously enabled.

Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-10-clg@redhat.com
[peterx: modify & enrich the comment for listener_add_address_space() ]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 92c20b2fc5cd3b423973a65aac945a605f93142e
      
https://github.com/qemu/qemu/commit/92c20b2fc5cd3b423973a65aac945a605f93142e
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Introduce ram_bitmaps_destroy()

We will use it in ram_init_bitmaps() to clear the allocated bitmaps when
support for error reporting is added to memory_global_dirty_log_start().

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240320064911.545001-11-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 639ec3fbf96c15b1568f52a50b9fa727cde3144b
      
https://github.com/qemu/qemu/commit/639ec3fbf96c15b1568f52a50b9fa727cde3144b
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/i386/xen/xen-hvm.c
    M include/exec/memory.h
    M migration/dirtyrate.c
    M migration/ram.c
    M system/memory.c

  Log Message:
  -----------
  memory: Add Error** argument to the global_dirty_log routines

Now that the log_global*() handlers take an Error** parameter and
return a bool, do the same for memory_global_dirty_log_start() and
memory_global_dirty_log_stop(). The error is reported in the callers
for now and it will be propagated in the call stack in the next
changes.

To be noted a functional change in ram_init_bitmaps(), if the dirty
pages logger fails to start, there is no need to synchronize the dirty
pages bitmaps. colo_incoming_start_dirty_log() could be modified in a
similar way.

Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Paul Durrant <paul@xen.org>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hyman Huang <yong.huang@smartx.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Acked-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240320064911.545001-12-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 16ecd25a4f324fd98cb974a0fd80390c7e136ea7
      
https://github.com/qemu/qemu/commit/16ecd25a4f324fd98cb974a0fd80390c7e136ea7
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Add Error** argument to ram_state_init()

Since the return value not exploited, follow the recommendations of
qapi/error.h and change it to a bool

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240320064911.545001-13-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 7bee8ba8bbcef27cc98bc85747258e942f8d9717
      
https://github.com/qemu/qemu/commit/7bee8ba8bbcef27cc98bc85747258e942f8d9717
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Add Error** argument to xbzrle_init()

Since the return value (-ENOMEM) is not exploited, follow the
recommendations of qapi/error.h and change it to a bool

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240320064911.545001-14-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 030b56b280375242cd8591b06e806978b8564be1
      
https://github.com/qemu/qemu/commit/030b56b280375242cd8591b06e806978b8564be1
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Modify ram_init_bitmaps() to report dirty tracking errors

The .save_setup() handler has now an Error** argument that we can use
to propagate errors reported by the .log_global_start() handler. Do
that for the RAM. The caller qemu_savevm_state_setup() will store the
error under the migration stream for later detection in the migration
sequence.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240320064911.545001-15-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: dd031677257d7d00a72f28f073befc22691a0ad6
      
https://github.com/qemu/qemu/commit/dd031677257d7d00a72f28f073befc22691a0ad6
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/block-dirty-bitmap.c

  Log Message:
  -----------
  migration: Add Error** argument to add_bitmaps_to_list()

This allows to report more precise errors in the migration handler
dirty_bitmap_save_setup().

Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Link: https://lore.kernel.org/r/20240329105627.311227-1-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 5ef7e26bdb7eda10d6d5e1b77121be9945e5e550
      
https://github.com/qemu/qemu/commit/5ef7e26bdb7eda10d6d5e1b77121be9945e5e550
  Author: Yuan Liu <yuan1.liu@intel.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M include/exec/ramblock.h
    M migration/multifd-zero-page.c
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  migration/multifd: solve zero page causing multiple page faults

Implemented recvbitmap tracking of received pages in multifd.

If the zero page appears for the first time in the recvbitmap, this
page is not checked and set.

If the zero page has already appeared in the recvbitmap, there is no
need to check the data but directly set the data to 0, because it is
unlikely that the zero page will be migrated multiple times.

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240401154110.2028453-2-yuan1.liu@intel.com
[peterx: touch up the comment, as the bitmap is used outside postcopy now]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 2cc637f1ea08d2a1b19fc5b1a30bc609f948de93
      
https://github.com/qemu/qemu/commit/2cc637f1ea08d2a1b19fc5b1a30bc609f948de93
  Author: Li Zhijian <lizhijian@fujitsu.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M migration/colo.c

  Log Message:
  -----------
  migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion 
`!qemu_in_coroutine()' failed.

bdrv_activate_all() should not be called from the coroutine context, move
it to the QEMU thread colo_process_incoming_thread() with the bql_lock
protected.

The backtrace is as follows:
 #4  0x0000561af7948362 in bdrv_graph_rdlock_main_loop () at 
../block/graph-lock.c:260
 #5  0x0000561af7907a68 in graph_lockable_auto_lock_mainloop (x=0x7fd29810be7b) 
at /patch/to/qemu/include/block/graph-lock.h:259
 #6  0x0000561af79167d1 in bdrv_activate_all (errp=0x7fd29810bed0) at 
../block.c:6906
 #7  0x0000561af762b4af in colo_incoming_co () at ../migration/colo.c:935
 #8  0x0000561af7607e57 in process_incoming_migration_co (opaque=0x0) at 
../migration/migration.c:793
 #9  0x0000561af7adbeeb in coroutine_trampoline (i0=-106876144, i1=22042) at 
../util/coroutine-ucontext.c:175
 #10 0x00007fd2a5cf21c0 in  () at /lib64/libc.so.6

Cc: qemu-stable@nongnu.org
Cc: Fabiano Rosas <farosas@suse.de>
Closes: https://gitlab.com/qemu-project/qemu/-/issues/2277
Fixes: 2b3912f135 ("block: Mark bdrv_first_blk() and bdrv_is_root_node() 
GRAPH_RDLOCK")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Tested-by: Zhang Chen <chen.zhang@intel.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240417025634.1014582-1-lizhijian@fujitsu.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 88daa112d4eda4e6c29f9f7004be09c13e4785df
      
https://github.com/qemu/qemu/commit/88daa112d4eda4e6c29f9f7004be09c13e4785df
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M hw/i386/xen/xen-hvm.c
    M hw/ppc/spapr.c
    M hw/s390x/s390-stattrib-kvm.c
    M hw/s390x/s390-stattrib.c
    M hw/vfio/common.c
    M hw/vfio/migration.c
    M hw/virtio/vhost.c
    M include/exec/memory.h
    M include/exec/ramblock.h
    M include/hw/s390x/storage-attributes.h
    M include/migration/register.h
    M migration/block-dirty-bitmap.c
    M migration/block.c
    M migration/colo.c
    M migration/dirtyrate.c
    M migration/migration.c
    M migration/multifd-zero-page.c
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/ram.c
    M migration/ram.h
    M migration/savevm.c
    M migration/savevm.h
    M system/memory.c
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  Merge tag 'migration-20240423-pull-request' of https://gitlab.com/peterx/qemu 
into staging

Migration pull for 9.1

- Het's new test cases for "channels"
- Het's fix for a typo for vsock parsing
- Cedric's VFIO error report series
- Cedric's one more patch for dirty-bitmap error reports
- Zhijian's rdma deprecation patch
- Yuan's zeropage optimization to fix double faults on anon mem
- Zhijian's COLO fix on a crash

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZig4HxIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wbQiwD/V5nSJzSuAG4Ra1Fjo+LRG2TT6qk8eNCi
# fIytehSw6cYA/0wqarxOF0tr7ikeyhtG3w4xFf44kk6KcPkoVSl1tqoL
# =pJmQ
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 23 Apr 2024 03:37:19 PM PDT
# gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
# gpg:                issuer "peterx@redhat.com"
# gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [unknown]
# gpg:                 aka "Peter Xu <peterx@redhat.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D  D1A9 3B5F CCCD F3AB D706

* tag 'migration-20240423-pull-request' of https://gitlab.com/peterx/qemu: (26 
commits)
  migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion 
`!qemu_in_coroutine()' failed.
  migration/multifd: solve zero page causing multiple page faults
  migration: Add Error** argument to add_bitmaps_to_list()
  migration: Modify ram_init_bitmaps() to report dirty tracking errors
  migration: Add Error** argument to xbzrle_init()
  migration: Add Error** argument to ram_state_init()
  memory: Add Error** argument to the global_dirty_log routines
  migration: Introduce ram_bitmaps_destroy()
  memory: Add Error** argument to .log_global_start() handler
  migration: Add Error** argument to .load_setup() handler
  migration: Add Error** argument to .save_setup() handler
  migration: Add Error** argument to qemu_savevm_state_setup()
  migration: Add Error** argument to vmstate_save()
  migration: Always report an error in ram_save_setup()
  migration: Always report an error in block_save_setup()
  vfio: Always report an error in vfio_save_setup()
  s390/stattrib: Add Error** argument to set_migrationmode() handler
  tests/qtest/migration: Fix typo for vsock in SocketAddress_to_str
  tests/qtest/migration: Add negative tests to validate migration QAPIs
  tests/qtest/migration: Add multifd_tcp_plain test using list of channels 
instead of uri
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/13b1e9667737...88daa112d4ed

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

[Prev in Thread] Current Thread [Next in Thread]