Revision tags: v8.2.3, v7.2.11, v9.0.0, v9.0.0-rc4, v9.0.0-rc3, v9.0.0-rc2, v9.0.0-rc1, v9.0.0-rc0 |
|
#
00580786 |
| 12-Mar-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
qapi: Inline and remove QERR_MIGRATION_ACTIVE definition
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015:
/* * These macros will go away, please
qapi: Inline and remove QERR_MIGRATION_ACTIVE definition
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015:
/* * These macros will go away, please don't use * in new code, and do not add new ones! */
Mechanical transformation using sed, manually removing the definition in include/qapi/qmp/qerror.h.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240312141343.3168265-10-armbru@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> [Straightforward conflict with commit aeaafb1e59f (migration: export migration_is_running) resolved]
show more ...
|
#
057a2009 |
| 20-Mar-2024 |
Cédric Le Goater <clg@redhat.com> |
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
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>
show more ...
|
#
057a2009 |
| 20-Mar-2024 |
Cédric Le Goater <clg@redhat.com> |
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
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>
show more ...
|
#
d0ad271a |
| 28-Mar-2024 |
Avihai Horon <avihaih@nvidia.com> |
migration/postcopy: Ensure postcopy_start() sets errp if it fails
There are several places where postcopy_start() fails without setting errp. This can cause a null pointer de-reference, as in case o
migration/postcopy: Ensure postcopy_start() sets errp if it fails
There are several places where postcopy_start() fails without setting errp. This can cause a null pointer de-reference, as in case of error, the caller of postcopy_start() copies/prints the error set in errp.
Fix it by setting errp in all of postcopy_start() error paths.
Cc: qemu-stable <qemu-stable@nongnu.org> Fixes: 908927db28ea ("migration: Update error description whenever migration fails") Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240328140252.16756-3-avihaih@nvidia.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
30158d88 |
| 28-Mar-2024 |
Avihai Horon <avihaih@nvidia.com> |
migration: Set migration error in migration_completion()
After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that
migration: Set migration error in migration_completion()
After commit 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()"), close_return_path_on_source() assumes that migration error is set if an error occurs during migration.
This may not be true if migration errors in migration_completion(). For example, if qemu_savevm_state_complete_precopy() errors, migration error will not be set.
This in turn, will cause a migration hang bug, similar to the bug that was fixed by commit 22b04245f0d5 ("migration: Join the return path thread before releasing to_dst_file"), as shutdown() will not be issued for the return-path channel.
Fix it by ensuring migration error is set in case of error in migration_completion().
Signed-off-by: Avihai Horon <avihaih@nvidia.com> Reviewed-by: Peter Xu <peterx@redhat.com> Fixes: 9425ef3f990a ("migration: Use migrate_has_error() in close_return_path_on_source()") Acked-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20240328140252.16756-2-avihaih@nvidia.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
910c1647 |
| 20-Mar-2024 |
Peter Xu <peterx@redhat.com> |
migration/postcopy: Fix high frequency sync
With current code base I can observe extremely high sync count during precopy, as long as one enables postcopy-ram=on before switchover to postcopy.
To p
migration/postcopy: Fix high frequency sync
With current code base I can observe extremely high sync count during precopy, as long as one enables postcopy-ram=on before switchover to postcopy.
To provide some context of when QEMU decides to do a full sync: it checks must_precopy (which implies "data must be sent during precopy phase"), and as long as it is lower than the threshold size we calculated (out of bandwidth and expected downtime) QEMU will kick off the slow/exact sync.
However, when postcopy is enabled (even if still during precopy phase), RAM only reports all pages as can_postcopy, and report must_precopy==0. Then "must_precopy <= threshold_size" mostly always triggers and enforces a slow sync for every call to migration_iteration_run() when postcopy is enabled even if not used. That is insane.
It turns out it was a regress bug introduced in the previous refactoring in 8.0 as reported by Nina [1]:
(a) c8df4a7aef ("migration: Split save_live_pending() into state_pending_*")
Then a workaround patch is applied at the end of release (8.0-rc4) to fix it:
(b) 28ef5339c3 ("migration: fix ram_state_pending_exact()")
However that "workaround" was overlooked when during the cleanup in this 9.0 release in this commit..
(c) b0504edd40 ("migration: Drop unnecessary check in ram's pending_exact()")
Then the issue was re-exposed as reported by Nina [1].
The problem with (b) is that it only fixed the case for RAM, rather than all the rest of iterators. Here a slow sync should only be required if all dirty data (precopy+postcopy) is less than the threshold_size that QEMU calculated. It is even debatable whether a sync is needed when switched to postcopy. Currently ram_state_pending_exact() will be mostly noop if switched to postcopy, and that logic seems to apply too for all the rest of iterators, as sync dirty bitmap during a postcopy doesn't make much sense. However let's leave such change for later, as we're in rc phase.
So rather than reusing commit (b), this patch provides the complete fix for all iterators. When at it, cleanup a little bit on the lines around.
[1] https://gitlab.com/qemu-project/qemu/-/issues/1565
Reported-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com> Fixes: b0504edd40 ("migration: Drop unnecessary check in ram's pending_exact()") Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240320214453.584374-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
bd4480b0 |
| 19-Mar-2024 |
Fabiano Rosas <farosas@suse.de> |
migration: Revert mapped-ram multifd support to fd: URI
This reverts commit decdc76772c453ff1444612e910caa0d45cd8eac in full and also the relevant migration-tests from 7a09f092834641b7a793d50a3a2610
migration: Revert mapped-ram multifd support to fd: URI
This reverts commit decdc76772c453ff1444612e910caa0d45cd8eac in full and also the relevant migration-tests from 7a09f092834641b7a793d50a3a261073bbb404a6.
After the addition of the new QAPI-based migration address API in 8.2 we've been converting an "fd:" URI into a SocketAddress, missing the fact that the "fd:" syntax could also be used for a plain file instead of a socket. This is a problem because the SocketAddress is part of the API, so we're effectively asking users to create a "socket" channel to pass in a plain file.
The easiest way to fix this situation is to deprecate the usage of both SocketAddress and "fd:" when used with a plain file for migration. Since this has been possible since 8.2, we can wait until 9.1 to deprecate it.
For 9.0, however, we should avoid adding further support to migration to a plain file using the old "fd:" syntax or the new SocketAddress API, and instead require the usage of either the old-style "file:" URI or the FileMigrationArgs::filename field of the new API with the "/dev/fdset/NN" syntax, both of which are already supported.
Signed-off-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240319210941.1907-1-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
73f6f9a1 |
| 15-Mar-2024 |
Fabiano Rosas <farosas@suse.de> |
migration/multifd: Ensure we're not given a socket for file migration
When doing migration using the fd: URI, QEMU will fetch the file descriptor passed in via the monitor at fd_start_outgoing|incom
migration/multifd: Ensure we're not given a socket for file migration
When doing migration using the fd: URI, QEMU will fetch the file descriptor passed in via the monitor at fd_start_outgoing|incoming_migration(), which means the checks at migration_channels_and_transport_compatible() happen too soon and we don't know at that point whether the FD refers to a plain file or a socket.
For this reason, we've been allowing a migration channel of type SOCKET_ADDRESS_TYPE_FD to pass the initial verifications in scenarios where the socket migration is not supported, such as with fd + multifd.
The commit decdc76772 ("migration/multifd: Add mapped-ram support to fd: URI") was supposed to add a second check prior to starting migration to make sure a socket fd is not passed instead of a file fd, but failed to do so.
Add the missing verification and update the comment explaining this situation which is currently incorrect.
Fixes: decdc76772 ("migration/multifd: Add mapped-ram support to fd: URI") Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com> Link: https://lore.kernel.org/r/20240315032040.7974-2-farosas@suse.de Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
a3ed4893 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-b
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
20c64c8a |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lo
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
9bb630c6 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
6e785639 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_thread_is_self
Define and export migration_thread_is_self to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lo
migration: migration_thread_is_self
Define and export migration_thread_is_self to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
aeaafb1e |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_running
Delete the MigrationState parameter from migration_is_running and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com
migration: export migration_is_running
Delete the MigrationState parameter from migration_is_running and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-5-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
3a6813b6 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_active
Delete the MigrationState parameter from migration_is_active so it can be exported and used without including migration.h.
Signed-off-by: Steve Sistare <steven
migration: export migration_is_active
Delete the MigrationState parameter from migration_is_active so it can be exported and used without including migration.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-4-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
7dcb3c87 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_setup_or_active
Delete the MigrationState parameter from migration_is_setup_or_active and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.si
migration: export migration_is_setup_or_active
Delete the MigrationState parameter from migration_is_setup_or_active and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/1710179338-294359-3-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
a3ed4893 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-b
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
20c64c8a |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lo
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
9bb630c6 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
6e785639 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_thread_is_self
Define and export migration_thread_is_self to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lo
migration: migration_thread_is_self
Define and export migration_thread_is_self to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-7-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
aeaafb1e |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_running
Delete the MigrationState parameter from migration_is_running and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com
migration: export migration_is_running
Delete the MigrationState parameter from migration_is_running and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-5-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
3a6813b6 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_active
Delete the MigrationState parameter from migration_is_active so it can be exported and used without including migration.h.
Signed-off-by: Steve Sistare <steven
migration: export migration_is_active
Delete the MigrationState parameter from migration_is_active so it can be exported and used without including migration.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-4-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
7dcb3c87 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: export migration_is_setup_or_active
Delete the MigrationState parameter from migration_is_setup_or_active and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.si
migration: export migration_is_setup_or_active
Delete the MigrationState parameter from migration_is_setup_or_active and move it to the public API in misc.h.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/1710179338-294359-3-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
a3ed4893 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-b
migration: delete unused accessors
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
20c64c8a |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lo
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
9bb630c6 |
| 11-Mar-2024 |
Steve Sistare <steven.sistare@oracle.com> |
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.
migration: migration_is_device
Define and export migration_is_device to eliminate a dependency on MigrationState.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-8-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
show more ...
|