Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 73b42fc58d035cb2fcfe90083d6b33aeb4fa1b2a
      
https://github.com/qemu/qemu/commit/73b42fc58d035cb2fcfe90083d6b33aeb4fa1b2a
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/vmstate.c

  Log Message:
  -----------
  migration: push Error **errp into vmstate_subsection_load()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that vmstate_subsection_load() must report an error
in errp, in case of failure.

The errors are temporarily reported using error_report_err().
This is removed in the subsequent patches in this series,
when we are actually able to propagate the error to the calling
function using errp.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: c632ffbd74a497e88bbb4e4d55a357055eae6f47
      
https://github.com/qemu/qemu/commit/c632ffbd74a497e88bbb4e4d55a357055eae6f47
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hw/display/virtio-gpu.c
    M hw/pci/pci.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/spapr_vscsi.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M include/migration/vmstate.h
    M migration/cpr.c
    M migration/savevm.c
    M migration/vmstate-types.c
    M migration/vmstate.c
    M tests/unit/test-vmstate.c
    M ui/vdagent.c

  Log Message:
  -----------
  migration: push Error **errp into vmstate_load_state()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that vmstate_load_state() must report an error
in errp, in case of failure.

The errors are temporarily reported using error_report_err().
This is removed in the subsequent patches in this series,
when we are actually able to propagate the error to the calling
function using errp. Whereas, if we want the function to exit on
error, then error_fatal is passed.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 71cf63a471a5814fa2c29c74e268838851b14d01
      
https://github.com/qemu/qemu/commit/71cf63a471a5814fa2c29c74e268838851b14d01
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into qemu_loadvm_state_header()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_loadvm_state_header() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: e97da6b583d7cf7d5289cbe9faf280bd453d6391
      
https://github.com/qemu/qemu/commit/e97da6b583d7cf7d5289cbe9faf280bd453d6391
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into vmstate_load()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that vmstate_load() must report an error
in errp, in case of failure.

The errors are temporarily reported using error_report_err().
This is removed in the subsequent patches in this series
when we are actually able to propagate the error to the calling
function.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 5fb0cfbb3576d5f545fef5746a08719ce8ab50ea
      
https://github.com/qemu/qemu/commit/5fb0cfbb3576d5f545fef5746a08719ce8ab50ea
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_process_command()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_process_command() must report an error
in errp, in case of failure.

The errors are temporarily reported using error_report_err().
This is removed in the subsequent patches in this series
when we are actually able to propagate the error to the calling
function.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 829f0d238dd402d60738464a4cac81574b74f431
      
https://github.com/qemu/qemu/commit/829f0d238dd402d60738464a4cac81574b74f431
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_handle_cmd_packaged()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_handle_cmd_packaged() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 9535435795983caa31070b8b642539b5a658dc2f
      
https://github.com/qemu/qemu/commit/9535435795983caa31070b8b642539b5a658dc2f
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

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

  Log Message:
  -----------
  migration: push Error **errp into qemu_loadvm_state()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_loadvm_state() must report an error
in errp, in case of failure.

When postcopy live migration runs, the device states are loaded by
both the qemu coroutine process_incoming_migration_co() and the
postcopy_ram_listen_thread(). Therefore, it is important that the
coroutine also reports the error in case of failure, with
error_report_err(). Otherwise, the source qemu will not display
any errors before going into the postcopy pause state.

Suggested-by: Akihiko Odaki <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 84279d5dc1afb115c673007d65bae575da04e115
      
https://github.com/qemu/qemu/commit/84279d5dc1afb115c673007d65bae575da04e115
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

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

  Log Message:
  -----------
  migration: push Error **errp into qemu_load_device_state()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_load_device_state() must report an error
in errp, in case of failure.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: deecb4e7133c573a85558e29dff61ae428a9cfe8
      
https://github.com/qemu/qemu/commit/deecb4e7133c573a85558e29dff61ae428a9cfe8
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

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

  Log Message:
  -----------
  migration: push Error **errp into qemu_loadvm_state_main()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_loadvm_state_main() must report an error
in errp, in case of failure.

Set errp explicitly if it is NULL in case of failure in the out
section. This will be removed in the subsequent patch when all of
the calls are converted to passing errp.

The error message in the default case of qemu_loadvm_state_main()
has the word "savevm". This is removed because it can confuse the
user while reading destination side error logs.

Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 4493752653141b480d6f4c4df4b25b71a8753b98
      
https://github.com/qemu/qemu/commit/4493752653141b480d6f4c4df4b25b71a8753b98
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into qemu_loadvm_section_start_full()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_loadvm_section_start_full() must report an error
in errp, in case of failure.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 8b6dad124ba757ba96a3b4456223e53632371bc8
      
https://github.com/qemu/qemu/commit/8b6dad124ba757ba96a3b4456223e53632371bc8
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into qemu_loadvm_section_part_end()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that qemu_loadvm_section_part_end() must report an error
in errp, in case of failure.
This patch also removes the setting of errp when errp is NULL in the
out section as it is no longer required in the series.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 3f9d6e77b0471c844d5050cc71db0863eb4d1b64
      
https://github.com/qemu/qemu/commit/3f9d6e77b0471c844d5050cc71db0863eb4d1b64
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/colo.c
    M migration/migration.c
    M migration/qemu-file.c
    M migration/savevm.c

  Log Message:
  -----------
  migration: Update qemu_file_get_return_path() docs and remove dead checks

The documentation of qemu_file_get_return_path() states that it can
return NULL on failure. However, a review of the current implementation
reveals that it is guaranteed that it will always succeed and will never
return NULL.

As a result, the NULL checks post calling the function become redundant.
This commit updates the documentation for the function and removes all
NULL checks throughout the migration code.

Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 3cd7a260e54a350e4cf0b49f69dfd61baebfa8fb
      
https://github.com/qemu/qemu/commit/3cd7a260e54a350e4cf0b49f69dfd61baebfa8fb
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: make loadvm_postcopy_handle_resume() void

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.

Use warn_report() instead of error_report(); it ensures that
a resume command received while the migration is not
in postcopy recover state is not fatal. It only informs that
the command received is unusual, and therefore we should not set
errp with the error string.

Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 44cdbaa98e8ccafcda3326d7307f393f06538558
      
https://github.com/qemu/qemu/commit/44cdbaa98e8ccafcda3326d7307f393f06538558
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h
    M migration/ram.c
    M migration/ram.h
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into ram_postcopy_incoming_init()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that ram_postcopy_incoming_init() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 34a94fe28da7d2e54e02a44e3bce35f1695ee013
      
https://github.com/qemu/qemu/commit/34a94fe28da7d2e54e02a44e3bce35f1695ee013
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_postcopy_handle_advise()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_postcopy_handle_advise() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 208e5227669ec8de02bd253626566fd72eb3090c
      
https://github.com/qemu/qemu/commit/208e5227669ec8de02bd253626566fd72eb3090c
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_postcopy_handle_listen()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_postcopy_handle_listen() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: ff6ae44e00aec1769629919e30efb3bbd3f991cc
      
https://github.com/qemu/qemu/commit/ff6ae44e00aec1769629919e30efb3bbd3f991cc
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_postcopy_handle_run()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_postcopy_handle_run() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: fd487d7fc78e168f530096f63a3159d7ebde4e5d
      
https://github.com/qemu/qemu/commit/fd487d7fc78e168f530096f63a3159d7ebde4e5d
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_postcopy_ram_handle_discard()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_postcopy_ram_handle_discard() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 97c2fad858b521afef1d0aad7b6bb880fbe0fb05
      
https://github.com/qemu/qemu/commit/97c2fad858b521afef1d0aad7b6bb880fbe0fb05
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_handle_recv_bitmap()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_handle_recv_bitmap() must report an error
in errp, in case of failure.

Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: d9d7c8d81398bb45d59cbdf1b4c2ed30f56c733d
      
https://github.com/qemu/qemu/commit/d9d7c8d81398bb45d59cbdf1b4c2ed30f56c733d
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Return -1 on memory allocation failure in ram.c

The function colo_init_ram_cache() currently returns -errno if
qemu_anon_ram_alloc() fails. However, the subsequent cleanup loop that
calls qemu_anon_ram_free() could potentially alter the value of errno.
This would cause the function to return a value that does not accurately
represent the original allocation failure.

This commit changes the return value to -1 on memory allocation failure.
This ensures that the return value is consistent and is not affected by
any errno changes that may occur during the free process.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: d865e4aabd4bec6d9807c3189eac8956b38b6b8d
      
https://github.com/qemu/qemu/commit/d865e4aabd4bec6d9807c3189eac8956b38b6b8d
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/migration/colo.h
    M migration/migration.c
    M migration/ram.c
    M migration/ram.h
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_process_enable_colo()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
It is ensured that loadvm_process_enable_colo() must report an error
in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: aa77746602cdf7e29d588d100e27f34bd6e46226
      
https://github.com/qemu/qemu/commit/aa77746602cdf7e29d588d100e27f34bd6e46226
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: push Error **errp into loadvm_postcopy_handle_switchover_start()

This is an incremental step in converting vmstate loading code to report
error via Error objects instead of directly printing it to console/monitor.
It is ensured that loadvm_postcopy_handle_switchover_start() must report
an error in errp, in case of failure.

Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 94272d9b45bbf17b8bb143b39fd3060aeef7dc3d
      
https://github.com/qemu/qemu/commit/94272d9b45bbf17b8bb143b39fd3060aeef7dc3d
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Capture error in postcopy_ram_listen_thread()

This is an incremental step in converting vmstate loading
code to report error via Error objects instead of directly
printing it to console/monitor.
postcopy_ram_listen_thread() calls qemu_loadvm_state_main()
to load the vm, and in case of a failure, it should set the error
in the migration object.

Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 6f9fc6f5012344292f7014e079e5225b8988383d
      
https://github.com/qemu/qemu/commit/6f9fc6f5012344292f7014e079e5225b8988383d
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hw/display/virtio-gpu.c
    M hw/pci/pci.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/spapr_vscsi.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M include/migration/vmstate.h
    M migration/cpr.c
    M migration/savevm.c
    M migration/vmstate-types.c
    M migration/vmstate.c
    M tests/unit/test-vmstate.c
    M ui/vdagent.c

  Log Message:
  -----------
  migration: Remove error variant of vmstate_save_state() function

This commit removes the redundant vmstate_save_state_with_err()
function.

Previously, commit 969298f9d7 introduced vmstate_save_state_with_err()
to handle error propagation, while vmstate_save_state() existed for
non-error scenarios.
This is because there were code paths where vmstate_save_state_v()
(called internally by vmstate_save_state) did not explicitly set
errors on failure.

This change unifies error handling by
 - updating vmstate_save_state() to accept an Error **errp argument.
 - vmstate_save_state_v() ensures errors are set directly within the errp
   object, eliminating the need for two separate functions.

All calls to vmstate_save_state_with_err() are replaced with
vmstate_save_state(). This simplifies the API and improves code
maintainability.

vmstate_save_state() that only calls vmstate_save_state_v(),
by inference, also has errors set in errp in case of failure.
The errors are reported using error_report_err().
If we want the function to exit on error, then &error_fatal is
passed.

Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 40de712a89d8fe26af398dd23c24e94834ca442b
      
https://github.com/qemu/qemu/commit/40de712a89d8fe26af398dd23c24e94834ca442b
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M docs/devel/migration/main.rst
    M include/migration/vmstate.h
    M migration/vmstate.c

  Log Message:
  -----------
  migration: Add error-parameterized function variants in VMSD struct

- We need to have good error reporting in the callbacks in
  VMStateDescription struct. Specifically pre_save, pre_load
  and post_load callbacks.
- It is not possible to change these functions everywhere in one
  patch, therefore, we introduce a duplicate set of callbacks
  with Error object passed to them.
- So, in this commit, we implement 'errp' variants of these callbacks,
  introducing an explicit Error object parameter.
- This is a functional step towards transitioning the entire codebase
  to the new error-parameterized functions.
- Deliberately called in mutual exclusion from their counterparts,
  to prevent conflicts during the transition.
- New impls should preferentally use 'errp' variants of
  these methods, and existing impls incrementally converted.
  The variants without 'errp' are intended to be removed
  once all usage is converted.

Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 42e556fa3f7acfd0d0bc834dd0b002eb24d20eea
      
https://github.com/qemu/qemu/commit/42e556fa3f7acfd0d0bc834dd0b002eb24d20eea
  Author: Arun Menon <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M backends/tpm/tpm_emulator.c

  Log Message:
  -----------
  backends/tpm: Propagate vTPM error on migration failure

- When migration of a VM with encrypted vTPM fails on the
  destination host, (e.g., due to a mismatch in secret values),
  the error message displayed on the source host is generic and unhelpful.
- For example, a typical error looks like this:
  "operation failed: job 'migration out' failed: Sibling indicated error 1.
  operation failed: job 'migration in' failed: load of migration failed:
  Input/output error"
- Such generic errors are logged using error_report(), which prints to
  the console/monitor but does not make the detailed error accessible via
  the QMP query-migrate command.
- This change, along with the set of changes of passing errp Error object
  to the VM state loading functions, help in addressing the issue.
  We use the post_load_errp hook of VMStateDescription to propagate errors
  by setting Error **errp objects in case of failure in the TPM backend.
- It can then be retrieved using QMP command:
  {"execute" : "query-migrate"}

Buglink: https://issues.redhat.com/browse/RHEL-82826

Reviewed-by: Stefan Berger <[email protected]>
Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Signed-off-by: Arun Menon <[email protected]>
Tested-by: Fabiano Rosas <[email protected]>
Reviewed-by: Akihiko Odaki <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 7e0c22d585581b8083ffdeb332ea497218665daf
      
https://github.com/qemu/qemu/commit/7e0c22d585581b8083ffdeb332ea497218665daf
  Author: Peter Xu <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M crypto/tlssession.c
    M include/crypto/tlssession.h
    M io/channel-tls.c

  Log Message:
  -----------
  io/crypto: Move tls premature termination handling into QIO layer

QCryptoTLSSession allows TLS premature termination in two cases, one of the
case is when the channel shutdown() is invoked on READ side.

It's possible the shutdown() happened after the read thread blocked at
gnutls_record_recv().  In this case, we should allow the premature
termination to happen.

The problem is by the time qcrypto_tls_session_read() was invoked,
tioc->shutdown may not have been set, so this may instead be treated as an
error if there is concurrent shutdown() calls.

To allow the flag to reflect the latest status of tioc->shutdown, move the
check upper into the QIOChannel level, so as to read the flag only after
QEMU gets an GNUTLS_E_PREMATURE_TERMINATION.

When at it, introduce qio_channel_tls_allow_premature_termination() helper
to make the condition checks easier to read.  When doing so, change the
qatomic_load_acquire() to qatomic_read(): here we don't need any ordering
of memory accesses, but reading a flag.  qatomic_read() would suffice
because it guarantees fetching from memory.  Nothing else we should need to
order on memory access.

This patch will fix a qemu qtest warning when running the preempt tls test,
reporting premature termination:

QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --full -r 
/x86_64/migration/postcopy/preempt/tls/psk
...
qemu-kvm: Cannot read from TLS channel: The TLS connection was non-properly 
terminated.
...

In this specific case, the error was set by postcopy_preempt_thread, which
normally will be concurrently shutdown()ed by the main thread.

Reviewed-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Juraj Marcin <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: dc487044d5c09d32dd19c8e85e76396fbbc9dde1
      
https://github.com/qemu/qemu/commit/dc487044d5c09d32dd19c8e85e76396fbbc9dde1
  Author: Peter Xu <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Make migration_has_failed() work even for CANCELLING

No issue I hit, the change is only from code observation when I am looking
at a TLS premature termination issue.

We set CANCELLED very late, it means migration_has_failed() may not work
correctly if it's invoked before updating CANCELLING to CANCELLED.

Allow that state will make migration_has_failed() working as expected even
if it's invoked slightly earlier.

One current user is the multifd code for the TLS graceful termination,
where it's before updating to CANCELLED.

Reviewed-by: Juraj Marcin <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 2aae7171224b6a305f2bf228754b59f0f99d255a
      
https://github.com/qemu/qemu/commit/2aae7171224b6a305f2bf228754b59f0f99d255a
  Author: Bin Guo <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/migration-hmp-cmds.c

  Log Message:
  -----------
  migration: HMP: Adjust the order of output fields

Adjust the positions of 'tls-authz' and 'max-postcopy-bandwidth' in
the fields output by the 'info migrate_parameters' command so that
related fields are next to each other.

For clarity only, no functional changes.

Sample output after this commit:
(qemu) info migrate_parameters
...
max-cpu-throttle: 99
tls-creds: ''
tls-hostname: ''
tls-authz: ''
max-bandwidth: 134217728 bytes/second
avail-switchover-bandwidth: 0 bytes/second
max-postcopy-bandwidth: 0 bytes/second
downtime-limit: 300 ms
...

Cc: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Bin Guo <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[peterx: move postcopy-bw before avail-switchover-bw]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 82f038d5961a8c8f896b499e31c638266e0291e9
      
https://github.com/qemu/qemu/commit/82f038d5961a8c8f896b499e31c638266e0291e9
  Author: Peter Xu <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd/tls: Cleanup BYE message processing on sender side

This patch is a trivial cleanup to the BYE messages on the multifd sender
side.  It could also be a fix, but since we do not have a solid clue,
taking this as a cleanup only.

One trivial concern is, migration_tls_channel_end() might be unsafe to be
invoked in the migration thread if migration is not successful, because
when failed / cancelled we do not know whether the multifd sender threads
can be writting to the channels, while GnuTLS library (when it's a TLS
channel) logically doesn't support concurrent writes.

When at it, cleanup on a few things.  What changed:

  - Introduce a helper to do graceful shutdowns with rich comment, hiding
    the details

  - Only send bye() iff migration succeeded, skip if it failed / cancelled

  - Detect TLS channel using channel type rather than thread created flags

  - Move the loop into the existing one that will close the channels, but
    do graceful shutdowns before channel shutdowns

  - local_err seems to have been leaked if set, fix it along the way

Reviewed-by: Fabiano Rosas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 725a9e5f7885a3c0d0cd82022d6eb5a758ac9d47
      
https://github.com/qemu/qemu/commit/725a9e5f7885a3c0d0cd82022d6eb5a758ac9d47
  Author: Juraj Marcin <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Fix state transition in postcopy_start() error handling

Commit 48814111366b ("migration: Always set DEVICE state") introduced
DEVICE state to postcopy, which moved the actual state transition that
leads to POSTCOPY_ACTIVE.

However, the error handling part of the postcopy_start() function still
expects the state POSTCOPY_ACTIVE, but depending on where an error
happens, now the state can be either ACTIVE, DEVICE or CANCELLING, but
never POSTCOPY_ACTIVE, as this transition now happens just before a
successful return from the function.

Instead, accept any state except CANCELLING when transitioning to FAILED
state.

Cc: [email protected]
Fixes: 48814111366b ("migration: Always set DEVICE state")
Signed-off-by: Juraj Marcin <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: d943cef76090b5255e68ba38ce6ddf20537b07bc
      
https://github.com/qemu/qemu/commit/d943cef76090b5255e68ba38ce6ddf20537b07bc
  Author: Yanfei Xu <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hw/intc/apic_common.c
    M include/migration/vmstate.h

  Log Message:
  -----------
  migration: ensure APIC is loaded prior to VFIO PCI devices

The load procedure of VFIO PCI devices involves setting up IRT
for each VFIO PCI devices. This requires determining whether an
interrupt is single-destination interrupt to decide between
Posted Interrupt(PI) or remapping mode for the IRTE. However,
determining this may require accessing the VM's APIC registers.

For example:
ioctl(vbasedev->fd, VFIO_DEVICE_SET_IRQS, irqs)
  ...
    kvm_arch_irq_bypass_add_producer
      kvm_x86_call(pi_update_irte)
        vmx_pi_update_irte
          kvm_intr_is_single_vcpu

If the LAPIC has not been loaded yet, interrupts will use remapping
mode. To prevent the fallback of interrupt mode, keep APIC is always
loaded prior to VFIO PCI devices.

Signed-off-by: Yicong Shen <[email protected]>
Signed-off-by: Yanfei Xu <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 9e7bfda4909cc688dd0327e17985019f08a78d5d
      
https://github.com/qemu/qemu/commit/9e7bfda4909cc688dd0327e17985019f08a78d5d
  Author: Peter Maydell <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/system/memory.h

  Log Message:
  -----------
  include/system/memory.h: Clarify address_space_destroy() behaviour

address_space_destroy() doesn't actually immediately destroy the AS;
it queues it to be destroyed via RCU. This means you can't g_free()
the memory the AS struct is in until that has happened.

Clarify this in the documentation.

Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 041600e23f2fe2a9c252c9a8b26c7d147bedf982
      
https://github.com/qemu/qemu/commit/041600e23f2fe2a9c252c9a8b26c7d147bedf982
  Author: Peter Xu <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/system/memory.h
    M system/memory.c

  Log Message:
  -----------
  memory: New AS helper to serialize destroy+free

If an AddressSpace has been created in its own allocated
memory, cleaning it up requires first destroying the AS
and then freeing the memory. Doing this doesn't work:

    address_space_destroy(as);
    g_free_rcu(as, rcu);

because both address_space_destroy() and g_free_rcu()
try to use the same 'rcu' node in the AddressSpace struct
and the address_space_destroy hook gets overwritten.

Provide a new address_space_destroy_free() function which
will destroy the AS and then free the memory it uses, all
in one RCU callback.

(CC to stable because the next commit needs this function.)

Cc: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 300a87c502c4ba7ffc7720d8f3583e3d1a68348a
      
https://github.com/qemu/qemu/commit/300a87c502c4ba7ffc7720d8f3583e3d1a68348a
  Author: Peter Maydell <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hw/core/cpu-common.c
    M include/exec/cpu-common.h
    M include/hw/core/cpu.h
    A stubs/cpu-destroy-address-spaces.c
    M stubs/meson.build
    M system/physmem.c

  Log Message:
  -----------
  physmem: Destroy all CPU AddressSpaces on unrealize

When we unrealize a CPU object (which happens on vCPU hot-unplug), we
should destroy all the AddressSpace objects we created via calls to
cpu_address_space_init() when the CPU was realized.

Commit 24bec42f3d6eae added a function to do this for a specific
AddressSpace, but did not add any places where the function was
called.

Since we always want to destroy all the AddressSpaces on unrealize,
regardless of the target architecture, we don't need to try to keep
track of how many are still undestroyed, or make the target
architecture code manually call a destroy function for each AS it
created.  Instead we can adjust the function to always completely
destroy the whole cpu->ases array, and arrange for it to be called
during CPU unrealize as part of the common code.

Without this fix, AddressSanitizer will report a leak like this
from a run where we hot-plugged and then hot-unplugged an x86 KVM
vCPU:

Direct leak of 416 byte(s) in 1 object(s) allocated from:
    #0 0x5b638565053d in calloc 
(/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/qemu-system-x86_64+0x1ee153d)
 (BuildId: c1cd6022b195142106e1bffeca23498c2b752bca)
    #1 0x7c28083f77b1 in g_malloc0 
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x637b1) (BuildId: 
1eb6131419edb83b2178b682829a6913cf682d75)
    #2 0x5b6386999c7c in cpu_address_space_init 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../system/physmem.c:797:25
    #3 0x5b638727f049 in kvm_cpu_realizefn 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../target/i386/kvm/kvm-cpu.c:102:5
    #4 0x5b6385745f40 in accel_cpu_common_realize 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../accel/accel-common.c:101:13
    #5 0x5b638568fe3c in cpu_exec_realizefn 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../hw/core/cpu-common.c:232:10
    #6 0x5b63874a2cd5 in x86_cpu_realizefn 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../target/i386/cpu.c:9321:5
    #7 0x5b6387a0469a in device_set_realized 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../hw/core/qdev.c:494:13
    #8 0x5b6387a27d9e in property_set_bool 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../qom/object.c:2375:5
    #9 0x5b6387a2090b in object_property_set 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../qom/object.c:1450:5
    #10 0x5b6387a35b05 in object_property_set_qobject 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../qom/qom-qobject.c:28:10
    #11 0x5b6387a21739 in object_property_set_bool 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../qom/object.c:1520:15
    #12 0x5b63879fe510 in qdev_realize 
/data_nvme1n1/linaro/qemu-from-laptop/qemu/build/x86-tgts-asan/../../hw/core/qdev.c:276:12

Cc: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2517
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: a5bc1ccca9596ecbf57b05bed10bd39e8854e475
      
https://github.com/qemu/qemu/commit/a5bc1ccca9596ecbf57b05bed10bd39e8854e475
  Author: Daniel P. Berrangé <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration: simplify error reporting after channel read

The code handling the return value of qio_channel_read proceses
len == 0 (EOF) separately from len < 1  (error), but in both
cases ends up calling qemu_file_set_error_obj() with -EIO as the
errno. This logic can be merged into one codepath to simplify it.

Signed-off-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Reviewed-by: Prasad Pandit <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: dc79c7d5e15be05b23f24fab12f0d5e2bf831514
      
https://github.com/qemu/qemu/commit/dc79c7d5e15be05b23f24fab12f0d5e2bf831514
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.c

  Log Message:
  -----------
  migration: multi-mode notifier

Allow a notifier to be added for multiple migration modes.
To allow a notifier to appear on multiple per-node lists, use
a generic list type.  We can no longer use NotifierWithReturnList,
because it shoe horns the notifier onto a single list.

Signed-off-by: Steve Sistare <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: a9f9eee58bc5cfacc1aa5cb7a138b5a8c12a493c
      
https://github.com/qemu/qemu/commit/a9f9eee58bc5cfacc1aa5cb7a138b5a8c12a493c
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/migration/cpr.h
    M migration/cpr.c

  Log Message:
  -----------
  migration: add cpr_walk_fd

Add a helper to walk all CPR fd's and run a callback for each.

Signed-off-by: Steve Sistare <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: fe72a8073ed63cf0fc138d1f4450da2e6e5b5271
      
https://github.com/qemu/qemu/commit/fe72a8073ed63cf0fc138d1f4450da2e6e5b5271
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/qemu/osdep.h
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  oslib: qemu_clear_cloexec

Define qemu_clear_cloexec, analogous to qemu_set_cloexec.

Signed-off-by: Steve Sistare <[email protected]>
Reviewed-by: Dr. David Alan Gilbert <[email protected]>
Reviewed-by: Marc-André Lureau <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: f57ff59f1e14f8162efda41725d1c013ed76b7d7
      
https://github.com/qemu/qemu/commit/f57ff59f1e14f8162efda41725d1c013ed76b7d7
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hmp-commands.hx
    M migration/migration-hmp-cmds.c
    M migration/options.c
    M qapi/migration.json

  Log Message:
  -----------
  migration: cpr-exec-command parameter

Create the cpr-exec-command migration parameter, defined as a list of
strings.  It will be used for cpr-exec migration mode in a subsequent
patch, and contains forward references to cpr-exec mode in the qapi
doc.

No functional change, except that cpr-exec-command is shown by the
'info migrate' command.

Signed-off-by: Steve Sistare <[email protected]>
Acked-by: Markus Armbruster <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: efc65873131dac48d2f7620adfcd683834acc94b
      
https://github.com/qemu/qemu/commit/efc65873131dac48d2f7620adfcd683834acc94b
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/migration/cpr.h
    A migration/cpr-exec.c
    M migration/meson.build

  Log Message:
  -----------
  migration: cpr-exec save and load

To preserve CPR state across exec, create a QEMUFile based on a memfd, and
keep the memfd open across exec.  Save the value of the memfd in an
environment variable so post-exec QEMU can find it.

These new functions are called in a subsequent patch.

Signed-off-by: Steve Sistare <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
[peterx: fix build for Windows]
Signed-off-by: Peter Xu <[email protected]>


  Commit: a3eae205c601dd491d2e83fa9ff0d15fce7236b5
      
https://github.com/qemu/qemu/commit/a3eae205c601dd491d2e83fa9ff0d15fce7236b5
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M include/migration/cpr.h
    M migration/cpr-exec.c
    M migration/cpr.c
    M migration/migration.c
    M migration/ram.c
    M migration/trace-events
    M migration/vmstate-types.c
    M qapi/migration.json
    M system/vl.c

  Log Message:
  -----------
  migration: cpr-exec mode

Add the cpr-exec migration mode.  Usage:
  qemu-system-$arch -machine aux-ram-share=on ...
  migrate_set_parameter mode cpr-exec
  migrate_set_parameter cpr-exec-command \
    <arg1> <arg2> ... -incoming <uri-1> \
  migrate -d <uri-1>

The migrate command stops the VM, saves state to uri-1,
directly exec's a new version of QEMU on the same host,
replacing the original process while retaining its PID, and
loads state from uri-1.  Guest RAM is preserved in place,
albeit with new virtual addresses.

The new QEMU process is started by exec'ing the command
specified by the @cpr-exec-command parameter.  The first word of
the command is the binary, and the remaining words are its
arguments.  The command may be a direct invocation of new QEMU,
or may be a non-QEMU command that exec's the new QEMU binary.

This mode creates a second migration channel that is not visible
to the user.  At the start of migration, old QEMU saves CPR state
to the second channel, and at the end of migration, it tells the
main loop to call cpr_exec.  New QEMU loads CPR state early, before
objects are created.

Because old QEMU terminates when new QEMU starts, one cannot
stream data between the two, so uri-1 must be a type,
such as a file, that accepts all data before old QEMU exits.
Otherwise, old QEMU may quietly block writing to the channel.

Memory-backend objects must have the share=on attribute, but
memory-backend-epc is not supported.  The VM must be started with
the '-machine aux-ram-share=on' option, which allows anonymous
memory to be transferred in place to the new process.  The memfds
are kept open across exec by clearing the close-on-exec flag, their
values are saved in CPR state, and they are mmap'd in new QEMU.

Signed-off-by: Steve Sistare <[email protected]>
Acked-by: Markus Armbruster <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 2f9dc012ec31856573009ee922855ba4ab5183a9
      
https://github.com/qemu/qemu/commit/2f9dc012ec31856573009ee922855ba4ab5183a9
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M docs/devel/migration/CPR.rst

  Log Message:
  -----------
  migration: cpr-exec docs

Update developer documentation for cpr-exec mode.

Signed-off-by: Steve Sistare <[email protected]>
Reviewed-by: Fabiano Rosas <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: ee1ca09fc1e6362ab94e92c25600ae51413d8ee4
      
https://github.com/qemu/qemu/commit/ee1ca09fc1e6362ab94e92c25600ae51413d8ee4
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

  Changed paths:
    M hw/vfio/container-legacy.c
    M hw/vfio/cpr-iommufd.c
    M hw/vfio/cpr-legacy.c
    M hw/vfio/cpr.c

  Log Message:
  -----------
  vfio: cpr-exec mode

All blockers and notifiers for cpr-transfer mode also apply to cpr-exec.

Signed-off-by: Steve Sistare <[email protected]>
Acked-by: Cédric Le Goater <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: 27cffe16354816d57710d2d4357f16139405c749
      
https://github.com/qemu/qemu/commit/27cffe16354816d57710d2d4357f16139405c749
  Author: Steve Sistare <[email protected]>
  Date:   2025-10-03 (Fri, 03 Oct 2025)

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

  Log Message:
  -----------
  migration-test: test cpr-exec

Add a test for the cpr-exec migration mode.

Signed-off-by: Steve Sistare <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Peter Xu <[email protected]>


  Commit: bd6aa0d1e59d71218c3eee055bc8d222c6e1a628
      
https://github.com/qemu/qemu/commit/bd6aa0d1e59d71218c3eee055bc8d222c6e1a628
  Author: Richard Henderson <[email protected]>
  Date:   2025-10-04 (Sat, 04 Oct 2025)

  Changed paths:
    M backends/tpm/tpm_emulator.c
    M crypto/tlssession.c
    M docs/devel/migration/CPR.rst
    M docs/devel/migration/main.rst
    M hmp-commands.hx
    M hw/core/cpu-common.c
    M hw/display/virtio-gpu.c
    M hw/intc/apic_common.c
    M hw/pci/pci.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/spapr_vscsi.c
    M hw/vfio/container-legacy.c
    M hw/vfio/cpr-iommufd.c
    M hw/vfio/cpr-legacy.c
    M hw/vfio/cpr.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-mmio.c
    M hw/virtio/virtio-pci.c
    M hw/virtio/virtio.c
    M include/crypto/tlssession.h
    M include/exec/cpu-common.h
    M include/hw/core/cpu.h
    M include/migration/colo.h
    M include/migration/cpr.h
    M include/migration/misc.h
    M include/migration/vmstate.h
    M include/qemu/osdep.h
    M include/system/memory.h
    M io/channel-tls.c
    M migration/colo.c
    A migration/cpr-exec.c
    M migration/cpr.c
    M migration/meson.build
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/multifd.c
    M migration/options.c
    M migration/postcopy-ram.c
    M migration/postcopy-ram.h
    M migration/qemu-file.c
    M migration/ram.c
    M migration/ram.h
    M migration/savevm.c
    M migration/savevm.h
    M migration/trace-events
    M migration/vmstate-types.c
    M migration/vmstate.c
    M qapi/migration.json
    A stubs/cpu-destroy-address-spaces.c
    M stubs/meson.build
    M system/memory.c
    M system/physmem.c
    M system/vl.c
    M tests/qtest/migration/cpr-tests.c
    M tests/unit/test-vmstate.c
    M ui/vdagent.c
    M util/oslib-posix.c
    M util/oslib-win32.c

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

Migration/Memory Pull for 10.2

- PeterX's fix on tls warning for preempt channel when migratino completes
- Arun's series to enhance error reporting for vTPM and migration framework
- PeterX's patch to cleanup multifd send TLS BYE messages
- Juraj's fix on postcopy start state transition when switchover failed
- Yanfei's fix to migrate APIC before VFIO-PCI to avoid irq fallbacks
- Dan's cleanup to simplify error reporting in qemu_fill_buffer()
- PeterM's fix on address space leak when cpu hot plug / unplug
- Steve's cpr-exec wholeset

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCaN/uIhIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wZ+mAEA1l2RS9sZS1W3vXQMCNb+Nu8Uo2p+e5Qj
# Uu6J0WVV+XsBANtzGZk2UM/frqlABywW3/ozJ4qBvIPKo758Mr6/lqUH
# =asUv
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 03 Oct 2025 08:39:14 AM PDT
# gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Peter Xu <[email protected]>" [unknown]
# gpg:                 aka "Peter Xu <[email protected]>" [unknown]
# gpg: WARNING: The key's User ID 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 'staging-pull-request' of https://gitlab.com/peterx/qemu: (45 commits)
  migration-test: test cpr-exec
  vfio: cpr-exec mode
  migration: cpr-exec docs
  migration: cpr-exec mode
  migration: cpr-exec save and load
  migration: cpr-exec-command parameter
  oslib: qemu_clear_cloexec
  migration: add cpr_walk_fd
  migration: multi-mode notifier
  migration: simplify error reporting after channel read
  physmem: Destroy all CPU AddressSpaces on unrealize
  memory: New AS helper to serialize destroy+free
  include/system/memory.h: Clarify address_space_destroy() behaviour
  migration: ensure APIC is loaded prior to VFIO PCI devices
  migration: Fix state transition in postcopy_start() error handling
  migration/multifd/tls: Cleanup BYE message processing on sender side
  migration: HMP: Adjust the order of output fields
  migration: Make migration_has_failed() work even for CANCELLING
  io/crypto: Move tls premature termination handling into QIO layer
  backends/tpm: Propagate vTPM error on migration failure
  ...

Signed-off-by: Richard Henderson <[email protected]>


Compare: https://github.com/qemu/qemu/compare/81e3121bef89...bd6aa0d1e59d

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

Reply via email to