- qga/win32: Use rundll for VSS installation - qga/win32: Remove change action from MSI installer - ide: Increment BB in-flight counter for TRIM BH - hw/pci-bridge/pxb: Fix missing swizzle - host-vdpa: make notifiers _init()/_uninit() symmetric - hw/virtio: vdpa: Fix leak of host-notifier memory-region - accel/tcg/cpu-exec: Fix precise single-stepping after interrupt - Allow setting up to 8 bytes with the generic loader - hw/net/virtio-net: make some VirtIONet const - accel/tcg: Optimize jump cache flush during tlb range flush - 9pfs: prevent opening special files (CVE-2023-2861) - tcg: Reduce tcg_assert_listed_vecop() scope - gitlab: Disable plugins for cross-i386-tci - vfio/pci: Fix a segfault in vfio_realize - block/iscsi: fix double-free on BUSY or similar statuses - tests/tcg: fix unused variable in linux-test - hw/net/vmxnet3: allow VMXNET3_MAX_MTU itself as a value - qga/vss-win32: fix warning for clang++-15 - vnc: avoid underflow when accessing user-provided address - block/monitor: Fix crash when executing HMP commit - virtio-gpu: add a FIXME for virtio_gpu_load() - hw/ppc/Kconfig: MAC_NEWWORLD should always select USB_OHCI_PCI - migration: report compress thread pid to libvirt Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From ddca9c0cba8e3c858b7998c67ae2739f58b5b681 Mon Sep 17 00:00:00 2001
|
|
From: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
Date: Fri, 21 Jul 2023 06:41:38 +0000
|
|
Subject: [PATCH] accel/tcg/cpu-exec: Fix precise single-stepping after
|
|
interrupt mainline inclusion commit 5b7b197c87cefbd24bd1936614fd4e00ccc279ab
|
|
category: bugfix
|
|
|
|
---------------------------------------------------------------
|
|
|
|
In some cases, cpu->exit_request can be false after handling the
|
|
interrupt, leading to another TB being executed instead of returning
|
|
to the main loop.
|
|
|
|
Fix this by returning true unconditionally when in single-step mode.
|
|
|
|
Fixes: ba3c35d9c402 ("tcg/cpu-exec: precise single-stepping after an interrupt")
|
|
Signed-off-by: Luc Michel <lmichel@kalray.eu>
|
|
Message-Id: <20220214132656.11397-1-lmichel@kalray.eu>
|
|
[rth: Unlock iothread mutex; simplify indentation]
|
|
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
|
|
|
|
Signed-off-by: tangbinzy <tangbin_yewu@cmss.chinamobile.com>
|
|
---
|
|
accel/tcg/cpu-exec.c | 8 ++++++--
|
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
|
|
index 409ec8c38c..7fb87afedc 100644
|
|
--- a/accel/tcg/cpu-exec.c
|
|
+++ b/accel/tcg/cpu-exec.c
|
|
@@ -798,8 +798,12 @@ static inline bool cpu_handle_interrupt(CPUState *cpu,
|
|
* raised when single-stepping so that GDB doesn't miss the
|
|
* next instruction.
|
|
*/
|
|
- cpu->exception_index =
|
|
- (cpu->singlestep_enabled ? EXCP_DEBUG : -1);
|
|
+ if (unlikely(cpu->singlestep_enabled)) {
|
|
+ cpu->exception_index = EXCP_DEBUG;
|
|
+ qemu_mutex_unlock_iothread();
|
|
+ return true;
|
|
+ }
|
|
+ cpu->exception_index = -1;
|
|
*last_tb = NULL;
|
|
}
|
|
/* The target hook may have updated the 'cpu->interrupt_request';
|
|
--
|
|
2.41.0.windows.1
|
|
|