]> www.infradead.org Git - users/dwmw2/qemu.git/commit
migration: Add helper to get target runstate
authorPeter Xu <peterx@redhat.com>
Fri, 6 Dec 2024 23:08:33 +0000 (18:08 -0500)
committerFabiano Rosas <farosas@suse.de>
Thu, 9 Jan 2025 20:38:41 +0000 (17:38 -0300)
commit7815f69867da92335055d4b5248430b0f122ce4e
tree7350cdb885970df8e9c20dcf952d7a6c45225993
parentb93d897ea2f0abbe7fc341a9ac176b5ecd0f3c93
migration: Add helper to get target runstate

In 99% cases, after QEMU migrates to dest host, it tries to detect the
target VM runstate using global_state_get_runstate().

There's one outlier so far which is Xen that won't send global state.
That's the major reason why global_state_received() check was always there
together with global_state_get_runstate().

However it's utterly confusing why global_state_received() has anything to
do with "let's start VM or not".

Provide a helper to explain it, then we have an unified entry for getting
the target dest QEMU runstate after migration.

Suggested-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20241206230838.1111496-2-peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/migration.c