[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 113/115] replay: fix replay shutdown for console mode
From: |
Paolo Bonzini |
Subject: |
[PULL 113/115] replay: fix replay shutdown for console mode |
Date: |
Thu, 11 Jun 2020 15:44:47 -0400 |
From: Pavel Dovgalyuk <Pavel.Dovgaluk@gmail.com>
When QEMU is used without any graphical window,
QEMU execution is terminated with the signal (e.g., Ctrl-C).
Signal processing in QEMU does not include
qemu_system_shutdown_request call. That is why shutdown
event is not recorded by record/replay in this case.
This patch adds shutdown event to the end of the record log.
Now every replay will shutdown the machine at the end.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Message-Id: <159012995470.27967.18129611453659045726.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
replay/replay.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/replay/replay.c b/replay/replay.c
index 706c7b4f4b..7d93746c73 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -366,6 +366,11 @@ void replay_finish(void)
/* finalize the file */
if (replay_file) {
if (replay_mode == REPLAY_MODE_RECORD) {
+ /*
+ * Can't do it in the signal handler, therefore
+ * add shutdown event here for the case of Ctrl-C.
+ */
+ replay_shutdown_request(SHUTDOWN_CAUSE_HOST_SIGNAL);
/* write end event */
replay_put_event(EVENT_END);
--
2.26.2
- [PULL 105/115] target/i386: sev: Remove redundant cbitpos and reduced_phys_bits fields, (continued)
- [PULL 105/115] target/i386: sev: Remove redundant cbitpos and reduced_phys_bits fields, Paolo Bonzini, 2020/06/11
- [PULL 073/115] replay: implement fair mutex, Paolo Bonzini, 2020/06/11
- [PULL 103/115] target/i386: sev: Embed SEVState in SevGuestState, Paolo Bonzini, 2020/06/11
- [PULL 107/115] target/i386: sev: Remove redundant handle field, Paolo Bonzini, 2020/06/11
- [PULL 108/115] target/i386: sev: Unify SEVState and SevGuestState, Paolo Bonzini, 2020/06/11
- [PULL 109/115] checkpatch: reversed logic with acpi test checks, Paolo Bonzini, 2020/06/11
- [PULL 099/115] xen: fix build without pci passthrough, Paolo Bonzini, 2020/06/11
- [PULL 110/115] exec/memory: Remove unused MemoryRegionMmio type, Paolo Bonzini, 2020/06/11
- [PULL 114/115] stubs: move Xen stubs to accel/, Paolo Bonzini, 2020/06/11
- [PULL 111/115] hw/usb: Move device-specific declarations to new 'hcd-musb.h' header, Paolo Bonzini, 2020/06/11
- [PULL 113/115] replay: fix replay shutdown for console mode,
Paolo Bonzini <=
- [PULL 112/115] exec/cpu-common: Move MUSB specific typedefs to 'hw/usb/hcd-musb.h', Paolo Bonzini, 2020/06/11
- [PULL 115/115] target/i386: Remove obsolete TODO file, Paolo Bonzini, 2020/06/11
- [PULL 086/115] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode, Paolo Bonzini, 2020/06/11
- [PULL 106/115] target/i386: sev: Remove redundant policy field, Paolo Bonzini, 2020/06/11
- Re: [PULL 000/115] Huge miscellaneous pull request for 2020-06-11, no-reply, 2020/06/11
- Re: [PULL 000/115] Huge miscellaneous pull request for 2020-06-11, Peter Maydell, 2020/06/12