qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] e1c2b0: MAINTAINERS: Leaving Migration


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] e1c2b0: MAINTAINERS: Leaving Migration
Date: Fri, 05 Jan 2024 08:08:11 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: e1c2b0e133edd76168d20b80a13e00ad6942568e
      
https://github.com/qemu/qemu/commit/e1c2b0e133edd76168d20b80a13e00ad6942568e
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M .mailmap
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Leaving Migration

I am leaving Red Hat, and as part of that I am leaving Migration
maintenarship.

You are left in good hands with Peter and Fabiano.

Thanks for all the fish.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Link: https://lore.kernel.org/r/20240102201908.1987-2-quintela@redhat.com
[peterx: prefix the subject]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 5d799717c21438423d81c58dd56fc01d5464be12
      
https://github.com/qemu/qemu/commit/5d799717c21438423d81c58dd56fc01d5464be12
  Author: Leonardo Bras <leobras@redhat.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Remove myself as reviewer from Live Migration

I am currently focusing in kernel development, so I will probably not be
of much help in reviewing general Live Migration changes.

For above reason I am removing my Reviewer status from Migration and RDMA
Migration.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Link: https://lore.kernel.org/r/20231221170739.332378-1-leobras@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f06f316d3e7f100cbbeaf0ea001d6332c12e7ab5
      
https://github.com/qemu/qemu/commit/f06f316d3e7f100cbbeaf0ea001d6332c12e7ab5
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M include/sysemu/runstate.h
    M system/cpus.c

  Log Message:
  -----------
  cpus: vm_was_suspended

Add a state variable to remember if a vm previously transitioned into a
suspended state.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b9ae473d80302519a7b89f98795a80abfea1deea
      
https://github.com/qemu/qemu/commit/b9ae473d80302519a7b89f98795a80abfea1deea
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M include/sysemu/runstate.h
    M qapi/misc.json
    M qapi/run-state.json
    M system/cpus.c
    M system/runstate.c

  Log Message:
  -----------
  cpus: stop vm in suspended runstate

Currently, a vm in the suspended state is not completely stopped.  The VCPUs
have been paused, but the cpu clock still runs, and runstate notifiers for
the transition to stopped have not been called.  This causes problems for
live migration.  Stale cpu timers_state is saved to the migration stream,
causing time errors in the guest when it wakes from suspend, and state that
would have been modified by runstate notifiers is wrong.

Modify vm_stop to completely stop the vm if the current state is suspended,
transition to RUN_STATE_PAUSED, and remember that the machine was suspended.
Modify vm_start to restore the suspended state.

This affects all callers of vm_stop and vm_start, notably, the qapi stop and
cont commands:

  old behavior:
    RUN_STATE_SUSPENDED --> stop --> RUN_STATE_SUSPENDED

  new behavior:
    RUN_STATE_SUSPENDED --> stop --> RUN_STATE_PAUSED
    RUN_STATE_PAUSED    --> cont --> RUN_STATE_SUSPENDED

For example:

    (qemu) info status
    VM status: paused (suspended)

    (qemu) stop
    (qemu) info status
    VM status: paused

    (qemu) system_wakeup
    Error: Unable to wake up: guest is not in suspended state

    (qemu) cont
    (qemu) info status
    VM status: paused (suspended)

    (qemu) system_wakeup
    (qemu) info status
    VM status: running

Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-3-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 0f1db069b6c5e7f7ddcdcc9c64fd4b6dbe4afcdf
      
https://github.com/qemu/qemu/commit/0f1db069b6c5e7f7ddcdcc9c64fd4b6dbe4afcdf
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M backends/tpm/tpm_emulator.c
    M hw/usb/hcd-ehci.c
    M hw/usb/redirect.c
    M hw/xen/xen-hvm-common.c

  Log Message:
  -----------
  cpus: check running not RUN_STATE_RUNNING

When a vm transitions from running to suspended, runstate notifiers are
not called, so the notifiers still think the vm is running.  Hence, when
we call vm_start to restore the suspended state, we call vm_state_notify
with running=1.  However, some notifiers check for RUN_STATE_RUNNING.
They must check the running boolean instead.

No functional change.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-4-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 9ff5e79f2ec0be3e2d7d81c41b33cbfeac393d99
      
https://github.com/qemu/qemu/commit/9ff5e79f2ec0be3e2d7d81c41b33cbfeac393d99
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M include/sysemu/runstate.h
    M system/cpus.c

  Log Message:
  -----------
  cpus: vm_resume

Define the vm_resume helper, for use in subsequent patches.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-5-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: d3c86c99f36ac37a92dd40191b9571c0d12d415a
      
https://github.com/qemu/qemu/commit/d3c86c99f36ac37a92dd40191b9571c0d12d415a
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/global_state.c

  Log Message:
  -----------
  migration: propagate suspended runstate

If the outgoing machine was previously suspended, propagate that to the
incoming side via global_state, so a subsequent vm_start restores the
suspended state.  To maintain backward and forward compatibility, reclaim
some space from the runstate member.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b4e9ddccd1a64239c07d7229afd7e00eed5afcd8
      
https://github.com/qemu/qemu/commit/b4e9ddccd1a64239c07d7229afd7e00eed5afcd8
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: preserve suspended runstate

A guest that is migrated in the suspended state automaticaly wakes and
continues execution.  This is wrong; the guest should end migration in
the same state it started.  The root cause is that the outgoing migration
code automatically wakes the guest, then saves the RUNNING runstate in
global_state_store(), hence the incoming migration code thinks the guest is
running and continues the guest if autostart is true.

On the outgoing side, delete the call to qemu_system_wakeup_request().
Now that vm_stop completely stops a vm in the suspended state (from the
preceding patches), the existing call to vm_stop_force_state is sufficient
to correctly migrate all vmstate.

On the incoming side, call vm_start if the pre-migration state was running
or suspended.  For the latter, vm_start correctly restores the suspended
state, and a future system_wakeup monitor request will cause the vm to
resume running.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-7-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 58b105703e86c1721d1a4cb9f6aaaca49c82145e
      
https://github.com/qemu/qemu/commit/58b105703e86c1721d1a4cb9f6aaaca49c82145e
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M include/migration/snapshot.h
    M migration/migration-hmp-cmds.c
    M migration/savevm.c
    M system/runstate.c
    M system/vl.c

  Log Message:
  -----------
  migration: preserve suspended for snapshot

Restoring a snapshot can break a suspended guest.  Snapshots suffer from
the same suspended-state issues that affect live migration, plus they must
handle an additional problematic scenario, which is that a running vm must
remain running if it loads a suspended snapshot.

To save, the existing vm_stop call now completely stops the suspended
state.  Finish with vm_resume to leave the vm in the state it had prior
to the save, correctly restoring the suspended state.

To load, if the snapshot is not suspended, then vm_stop + vm_resume
correctly handles all states, and leaves the vm in the state it had prior
to the load.  However, if the snapshot is suspended, restoration is
trickier.  First, call vm_resume to restore the state to suspended so the
current state matches the saved state.  Then, if the pre-load state is
running, call wakeup to resume running.

Prior to these changes, the vm_stop to RUN_STATE_SAVE_VM and
RUN_STATE_RESTORE_VM did not change runstate if the current state was
suspended, but now it does, so allow these transitions.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-8-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 49a5020697001eb96693e8a289c13b89149c7fef
      
https://github.com/qemu/qemu/commit/49a5020697001eb96693e8a289c13b89149c7fef
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c
    M system/runstate.c

  Log Message:
  -----------
  migration: preserve suspended for bg_migration

Do not wake a suspended guest during bg_migration, and restore the prior
state at finish rather than unconditionally running.  Allow the additional
state transitions that occur.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f0649758be63da16d215344011fc67aa07531542
      
https://github.com/qemu/qemu/commit/f0649758be63da16d215344011fc67aa07531542
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 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 events

Define a state object to capture events seen by migration tests, to allow
more events to be captured in a subsequent patch, and simplify event
checking in wait_for_migration_pass.  No functional change.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-10-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 5014478e0dc0e7e542e462fe271a24fd07bd813d
      
https://github.com/qemu/qemu/commit/5014478e0dc0e7e542e462fe271a24fd07bd813d
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M tests/migration/i386/Makefile
    M tests/migration/i386/a-b-bootblock.S
    M tests/migration/i386/a-b-bootblock.h
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  tests/qtest: option to suspend during migration

Add an option to suspend the src in a-b-bootblock.S, which puts the guest
in S3 state after one round of writing to memory.  The option is enabled by
poking a 1 into the suspend_me word in the boot block prior to starting the
src vm.  Generate symbol offsets in a-b-bootblock.h so that the suspend_me
offset is known.  Generate the bootblock for each test, because suspend_me
may differ for each.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: 
https://lore.kernel.org/r/1704312341-66640-11-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b1fdd21e8c2442ec8a68f0c3e67efdb279ecea64
      
https://github.com/qemu/qemu/commit/b1fdd21e8c2442ec8a68f0c3e67efdb279ecea64
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 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: precopy migration with suspend

Add a test case to verify that the suspended state is handled correctly
during live migration precopy.  The test suspends the src, migrates, then
wakes the dest.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-12-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 2b58a8b9631f25f0ddc19fbed0fd5bfff3bb5f41
      
https://github.com/qemu/qemu/commit/2b58a8b9631f25f0ddc19fbed0fd5bfff3bb5f41
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

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

  Log Message:
  -----------
  tests/qtest: postcopy migration with suspend

Add a test case to verify that the suspended state is handled correctly by
live migration postcopy.  The test suspends the src, migrates, then wakes
the dest.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: 
https://lore.kernel.org/r/1704312341-66640-13-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 17b9483baae595aa1b9d25adceb240bf74fdb1ee
      
https://github.com/qemu/qemu/commit/17b9483baae595aa1b9d25adceb240bf74fdb1ee
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.h

  Log Message:
  -----------
  migration: Remove migrate_max_downtime() declaration

migrate_max_downtime() has been removed long ago, but its declaration
was mistakenly left. Remove it.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-2-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 80caba6955c422ac7f848999cb961846aa2781d1
      
https://github.com/qemu/qemu/commit/80caba6955c422ac7f848999cb961846aa2781d1
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Remove nulling of hostname in migrate_init()

MigrationState->hostname is set to NULL in migrate_init(). This is
redundant because it is already freed and set to NULL in
migrade_fd_cleanup(). Remove it.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-3-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: c606f3baa2de0ee40a3cc69142a23fff130debc3
      
https://github.com/qemu/qemu/commit/c606f3baa2de0ee40a3cc69142a23fff130debc3
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Refactor migration_incoming_setup()

Commit 6720c2b32725 ("migration: check magic value for deciding the
mapping of channels") extracted the only code that could fail in
migration_incoming_setup().

Now migration_incoming_setup() can't fail, so refactor it to return void
and remove errp parameter.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20231231093016.14204-4-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b0cf3bfc69752969314f9e88d68f75f40fcdf274
      
https://github.com/qemu/qemu/commit/b0cf3bfc69752969314f9e88d68f75f40fcdf274
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

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

  Log Message:
  -----------
  migration: Remove errp parameter in migration_fd_process_incoming()

Errp parameter in migration_fd_process_incoming() is unused.
Remove it.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-5-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: c77b40859a5201f01b44dc475258405e289c431f
      
https://github.com/qemu/qemu/commit/c77b40859a5201f01b44dc475258405e289c431f
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd: Fix error message in multifd_recv_initial_packet()

In multifd_recv_initial_packet(), if MultiFDInit_t->id is greater than
the configured number of multifd channels, an irrelevant error message
about multifd version is printed.

Change the error message to a relevant one about the channel id.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-6-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: a4395f5d3c06472ed70d9ef9f79878f95575be9e
      
https://github.com/qemu/qemu/commit/a4395f5d3c06472ed70d9ef9f79878f95575be9e
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd: Simplify multifd_channel_connect() if else statement

The else branch in multifd_channel_connect() is redundant because when
the if branch is taken the function returns.

Simplify the code by removing the else branch.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20231231093016.14204-7-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 6ae208ce9656114e428b1a75ac62a6761ed3216c
      
https://github.com/qemu/qemu/commit/6ae208ce9656114e428b1a75ac62a6761ed3216c
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd: Fix leaking of Error in TLS error flow

If there is an error in multifd TLS handshake task,
multifd_tls_outgoing_handshake() retrieves the error with
qio_task_propagate_error() but never frees it.

Fix it by freeing the obtained Error.

In addition, the error is not reported at all, so report it with
migrate_set_error().

Fixes: 29647140157a ("migration/tls: add support for multifd tls-handshake")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-8-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 1d3886f837d8e972366a8b58ba8afb0e5efbeed7
      
https://github.com/qemu/qemu/commit/1d3886f837d8e972366a8b58ba8afb0e5efbeed7
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration/multifd: Remove error_setg() in migration_ioc_process_incoming()

If multifd_load_setup() fails in migration_ioc_process_incoming(),
error_setg() is called with errp. This will lead to an assert because in
that case errp already contains an error.

Fix it by removing the redundant error_setg().

Fixes: 6720c2b32725 ("migration: check magic value for deciding the mapping of 
channels")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-9-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 4f8cf323e80c17f7d4b5604f1699591326df6262
      
https://github.com/qemu/qemu/commit/4f8cf323e80c17f7d4b5604f1699591326df6262
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/channel.c

  Log Message:
  -----------
  migration: Fix migration_channel_read_peek() error path

migration_channel_read_peek() calls qio_channel_readv_full() and handles
both cases of return value == 0 and return value < 0 the same way, by
calling error_setg() with errp. However, if return value < 0, errp is
already set, so calling error_setg() with errp will lead to an assert.

Fix it by handling these cases separately, calling error_setg() with
errp only in return value == 0 case.

Fixes: 6720c2b32725 ("migration: check magic value for deciding the mapping of 
channels")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20231231093016.14204-10-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b6f4c0c788d5a037197a0ed409e131ed2cec274a
      
https://github.com/qemu/qemu/commit/b6f4c0c788d5a037197a0ed409e131ed2cec274a
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Remove unnecessary usage of local Error

According to Error API, usage of ERRP_GUARD() or a local Error instead
of errp is needed if errp is passed to void functions, where it is later
dereferenced to see if an error occurred.

There are several places in migration.c that use local Error although it
is not needed. Change these places to use errp directly.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20231231093016.14204-11-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 3fc58efa938338a82e4d5c0c031e7e9c98e9544f
      
https://github.com/qemu/qemu/commit/3fc58efa938338a82e4d5c0c031e7e9c98e9544f
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd: Remove unnecessary usage of local Error

According to Error API, usage of ERRP_GUARD() or a local Error instead
of errp is needed if errp is passed to void functions, where it is later
dereferenced to see if an error occurred.

There are several places in multifd.c that use local Error although it
is not needed. Change these places to use errp directly.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20231231093016.14204-12-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: b12635ff08ab2e5a6a955c6866ef4525fb3deb5d
      
https://github.com/qemu/qemu/commit/b12635ff08ab2e5a6a955c6866ef4525fb3deb5d
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-01-04 (Thu, 04 Jan 2024)

  Changed paths:
    M migration/options.c

  Log Message:
  -----------
  migration: fix coverity migrate_mode finding

Coverity diagnoses a possible out-of-range array index here ...

    static GSList *migration_blockers[MIG_MODE__MAX];

    fill_source_migration_info() {
        GSList *cur_blocker = migration_blockers[migrate_mode()];

... because it does not know that MIG_MODE__MAX will never be returned as
a migration mode.  To fix, assert so in migrate_mode().

Fixes: fa3673e497a1 ("migration: per-mode blockers")

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: 
https://lore.kernel.org/r/1699907025-215450-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: c8193acc078e297fd46b6229e02b819b65c6702e
      
https://github.com/qemu/qemu/commit/c8193acc078e297fd46b6229e02b819b65c6702e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M .mailmap
    M MAINTAINERS
    M backends/tpm/tpm_emulator.c
    M hw/usb/hcd-ehci.c
    M hw/usb/redirect.c
    M hw/xen/xen-hvm-common.c
    M include/migration/snapshot.h
    M include/sysemu/runstate.h
    M migration/channel.c
    M migration/global_state.c
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h
    M migration/multifd.c
    M migration/options.c
    M migration/rdma.c
    M migration/savevm.c
    M qapi/misc.json
    M qapi/run-state.json
    M system/cpus.c
    M system/runstate.c
    M system/vl.c
    M tests/migration/i386/Makefile
    M tests/migration/i386/a-b-bootblock.S
    M tests/migration/i386/a-b-bootblock.h
    M tests/qtest/migration-helpers.c
    M tests/qtest/migration-helpers.h
    M tests/qtest/migration-test.c

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

migration 1st pull for 9.0

- We lost Juan and Leo in the maintainers file
- Steven's suspend state fix
- Steven's fix for coverity on migrate_mode
- Avihai's migration cleanup series

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZZY0TxIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wbSxgEAoM5g3wkc22lpAlRpU+hJUqT9NVOVQSK+
# Fk7XJYTdSgABAKzykA6hAmU5Kj+yVI6jI874SVZbs2FWpFs4osvsKk4D
# =sfuM
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 04 Jan 2024 04:30:07 GMT
# 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-20240104-pull-request' of https://gitlab.com/peterx/qemu: (26 
commits)
  migration: fix coverity migrate_mode finding
  migration/multifd: Remove unnecessary usage of local Error
  migration: Remove unnecessary usage of local Error
  migration: Fix migration_channel_read_peek() error path
  migration/multifd: Remove error_setg() in migration_ioc_process_incoming()
  migration/multifd: Fix leaking of Error in TLS error flow
  migration/multifd: Simplify multifd_channel_connect() if else statement
  migration/multifd: Fix error message in multifd_recv_initial_packet()
  migration: Remove errp parameter in migration_fd_process_incoming()
  migration: Refactor migration_incoming_setup()
  migration: Remove nulling of hostname in migrate_init()
  migration: Remove migrate_max_downtime() declaration
  tests/qtest: postcopy migration with suspend
  tests/qtest: precopy migration with suspend
  tests/qtest: option to suspend during migration
  tests/qtest: migration events
  migration: preserve suspended for bg_migration
  migration: preserve suspended for snapshot
  migration: preserve suspended runstate
  migration: propagate suspended runstate
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/05470c3979d5...c8193acc078e



reply via email to

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