[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/39] runstate: ignore exit request in finish migrate state
From: |
Paolo Bonzini |
Subject: |
[PULL 23/39] runstate: ignore exit request in finish migrate state |
Date: |
Thu, 24 Oct 2019 16:03:39 +0200 |
From: Laurent Vivier <address@hidden>
Trying to reboot a VM while a migration is running can
move to the prelaunch state (because of the reset) while
the runstate is in finish migrate state.
As the logical step after the finish migrate is postmigrate,
this can create an invalid state transition from prelaunch state
to postmigrate state and this raises an error and aborts:
invalid runstate transition: 'prelaunch' -> 'postmigrate'
As we are not able to manage reset in finish migrate state the
best we can do is to ignore any changes and delay them until
the next state which should be postmigrate and which should allow
this kind of transition.
Reported-by: Lukáš Doktor <address@hidden>
Suggested-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
vl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/vl.c b/vl.c
index 4489cfb..4a7d011 100644
--- a/vl.c
+++ b/vl.c
@@ -1744,6 +1744,9 @@ static bool main_loop_should_exit(void)
RunState r;
ShutdownCause request;
+ if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
+ return false;
+ }
if (preconfig_exit_requested) {
if (runstate_check(RUN_STATE_PRECONFIG)) {
runstate_set(RUN_STATE_PRELAUNCH);
--
1.8.3.1
- [PULL 08/39] hw/i386/pc: rename functions shared with non-PC machines, (continued)
- [PULL 08/39] hw/i386/pc: rename functions shared with non-PC machines, Paolo Bonzini, 2019/10/24
- [PULL 07/39] hw/virtio: Factorize virtio-mmio headers, Paolo Bonzini, 2019/10/24
- [PULL 10/39] hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux(), Paolo Bonzini, 2019/10/24
- [PULL 11/39] hw/i386/pc: avoid an assignment in if condition in x86_load_linux(), Paolo Bonzini, 2019/10/24
- [PULL 09/39] hw/i386/pc: fix code style issues on functions that will be moved out, Paolo Bonzini, 2019/10/24
- [PULL 17/39] hw/intc/apic: reject pic ints if isa_pic == NULL, Paolo Bonzini, 2019/10/24
- [PULL 21/39] MAINTAINERS: add microvm related files, Paolo Bonzini, 2019/10/24
- [PULL 18/39] roms: add microvm-bios (qboot) as binary and git submodule, Paolo Bonzini, 2019/10/24
- [PULL 15/39] hw/i386: make x86.c independent from PCMachineState, Paolo Bonzini, 2019/10/24
- [PULL 12/39] hw/i386/pc: remove commented out code from x86_load_linux(), Paolo Bonzini, 2019/10/24
- [PULL 23/39] runstate: ignore exit request in finish migrate state,
Paolo Bonzini <=
- [PULL 20/39] hw/i386: Introduce the microvm machine type, Paolo Bonzini, 2019/10/24
- [PULL 19/39] docs/microvm.rst: document the new microvm machine type, Paolo Bonzini, 2019/10/24
- [PULL 16/39] fw_cfg: add "modify" functions for all types, Paolo Bonzini, 2019/10/24
- [PULL 24/39] hw/timer/mc146818rtc: Only include qapi-commands-misc on I386, Paolo Bonzini, 2019/10/24
- [PULL 28/39] hw/i386/pc: Move gsi_state creation code, Paolo Bonzini, 2019/10/24
- [PULL 22/39] checkpatch: suggest qemu_real_host_page_size instead of getpagesize() or sysconf(_SC_PAGESIZE), Paolo Bonzini, 2019/10/24
- [PULL 14/39] hw/i386: split PCMachineState deriving X86MachineState from it, Paolo Bonzini, 2019/10/24
- [PULL 26/39] target/i386: Add support for save/load IA32_UMWAIT_CONTROL MSR, Paolo Bonzini, 2019/10/24
- [PULL 30/39] hw/i386/pc: Remove kvm_i386.h include, Paolo Bonzini, 2019/10/24
- [PULL 32/39] mc146818rtc: Move RTC_ISA_IRQ definition, Paolo Bonzini, 2019/10/24