[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 33/46] replay: fix replay of the interrupts
From: |
Paolo Bonzini |
Subject: |
[PULL 33/46] replay: fix replay of the interrupts |
Date: |
Mon, 8 Feb 2021 19:23:18 +0100 |
From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Sometimes interrupt event comes at the same time with
the virtual timers. In this case replay tries to proceed
the timers, because deadline for them is zero.
This patch allows processing interrupts and exceptions
by entering the vCPU execution loop, when deadline is zero,
but checkpoint associated with virtual timers is not ready
to be replayed.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <161216312794.2030770.1709657858900983160.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
accel/tcg/tcg-accel-ops-icount.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c
index 87762b469c..13b8fbeb69 100644
--- a/accel/tcg/tcg-accel-ops-icount.c
+++ b/accel/tcg/tcg-accel-ops-icount.c
@@ -81,7 +81,13 @@ void icount_handle_deadline(void)
int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
QEMU_TIMER_ATTR_ALL);
- if (deadline == 0) {
+ /*
+ * Instructions, interrupts, and exceptions are processed in cpu-exec.
+ * Don't interrupt cpu thread, when these events are waiting
+ * (i.e., there is no checkpoint)
+ */
+ if (deadline == 0
+ && (replay_mode != REPLAY_MODE_PLAY || replay_has_checkpoint())) {
icount_notify_aio_contexts();
}
}
--
2.29.2
- [PULL 28/46] qapi/meson: Restrict qdev code to system-mode emulation, (continued)
- [PULL 28/46] qapi/meson: Restrict qdev code to system-mode emulation, Paolo Bonzini, 2021/02/08
- [PULL 35/46] replay: rng-builtin support, Paolo Bonzini, 2021/02/08
- [PULL 25/46] meson: Merge trace_events_subdirs array, Paolo Bonzini, 2021/02/08
- [PULL 37/46] hw/pci-host: add pci-intack write method, Paolo Bonzini, 2021/02/08
- [PULL 43/46] tz-ppc: add dummy read/write methods, Paolo Bonzini, 2021/02/08
- [PULL 42/46] spapr_pci: add spapr msi read method, Paolo Bonzini, 2021/02/08
- [PULL 31/46] qapi/meson: Restrict UI module to system emulation and tools, Paolo Bonzini, 2021/02/08
- [PULL 26/46] meson: Restrict some trace event directories to user/system emulation, Paolo Bonzini, 2021/02/08
- [PULL 30/46] qapi/meson: Restrict system-mode specific modules, Paolo Bonzini, 2021/02/08
- [PULL 32/46] accel/kvm/kvm-all: Fix wrong return code handling in dirty log code, Paolo Bonzini, 2021/02/08
- [PULL 33/46] replay: fix replay of the interrupts,
Paolo Bonzini <=
- [PULL 36/46] cpu-throttle: Remove timer_mod() from cpu_throttle_set(), Paolo Bonzini, 2021/02/08
- [PULL 34/46] pc-bios/descriptors: fix paths in json files, Paolo Bonzini, 2021/02/08
- [PULL 38/46] pci-host: designware: add pcie-msi read method, Paolo Bonzini, 2021/02/08
- [PULL 39/46] vfio: add quirk device write method, Paolo Bonzini, 2021/02/08
- [PULL 41/46] nvram: add nrf51_soc flash read method, Paolo Bonzini, 2021/02/08
- [PULL 44/46] imx7-ccm: add digprog mmio write method, Paolo Bonzini, 2021/02/08
- [PULL 40/46] prep: add ppc-parity write method, Paolo Bonzini, 2021/02/08
- [PULL 46/46] target/i386: Expose VMX entry/exit load pkrs control bits, Paolo Bonzini, 2021/02/08
- [PULL 45/46] target/i386: Add support for save/load IA32_PKRS MSR, Paolo Bonzini, 2021/02/08
- Re: [PULL 00/46] Misc patches for 2021-02-08, Peter Maydell, 2021/02/09