[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH V1 11/32] cpu: disable ticks when suspended
From: |
Steve Sistare |
Subject: |
[PATCH V1 11/32] cpu: disable ticks when suspended |
Date: |
Thu, 30 Jul 2020 08:14:15 -0700 |
After cprload, the guest console misbehaves. You must type 8 characters
before any are echoed to the terminal. Qemu was not sending interrupts
to the guest because the QEMU_CLOCK_VIRTUAL timers_state.cpu_clock_offset
was bad. The offset is usually updated at cprsave time by the path
save_cpr_snapshot()
vm_stop()
do_vm_stop()
if (runstate_is_running())
cpu_disable_ticks();
timers_state.cpu_clock_offset = cpu_get_clock_locked();
However, if the guest is in RUN_STATE_SUSPENDED, then cpu_disable_ticks is
not called. Further, the earlier transition to suspended in
qemu_system_suspend did not disable ticks. To fix, call cpu_disable_ticks
from save_cpr_snapshot.
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
migration/savevm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/migration/savevm.c b/migration/savevm.c
index f101039..00f493b 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2729,6 +2729,11 @@ void save_cpr_snapshot(const char *file, const char
*mode, Error **errp)
return;
}
+ /* Update timers_state before saving. Suspend did not so do. */
+ if (runstate_check(RUN_STATE_SUSPENDED)) {
+ cpu_disable_ticks();
+ }
+
vm_stop(RUN_STATE_SAVE_VM);
ret = qemu_savevm_state(f, op, errp);
--
1.8.3.1
- Re: [PATCH V1 07/32] savevm: QMP command for cprinfo, (continued)
- [PATCH V1 04/32] savevm: HMP Command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 03/32] savevm: QMP command for cprsave, Steve Sistare, 2020/07/30
- [PATCH V1 10/32] kvmclock: restore paused KVM clock, Steve Sistare, 2020/07/30
- [PATCH V1 01/32] savevm: add vmstate handler iterators, Steve Sistare, 2020/07/30
- [PATCH V1 08/32] savevm: HMP command for cprinfo, Steve Sistare, 2020/07/30
- [PATCH V1 06/32] savevm: HMP Command for cprload, Steve Sistare, 2020/07/30
- [PATCH V1 11/32] cpu: disable ticks when suspended,
Steve Sistare <=
- [PATCH V1 12/32] vl: pause option, Steve Sistare, 2020/07/30
- Re: [PATCH V1 12/32] vl: pause option, Alex Bennée, 2020/07/30
[PATCH V1 14/32] savevm: VMS_RESTART and cprsave restart, Steve Sistare, 2020/07/30