[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulati
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulation |
Date: |
Wed, 3 Mar 2021 22:47:03 +0100 |
We can not use watchpoints in user-mode emulation because we
need the softmmu slow path to detect accesses to watchpointed
memory. Add #ifdef'ry around it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
target/i386/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 994d58aa754..4b8f06f6193 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -6182,7 +6182,6 @@ static void x86_cpu_reset(DeviceState *dev)
env->dr[6] = DR6_FIXED_1;
env->dr[7] = DR7_FIXED_1;
cpu_breakpoint_remove_all(s, BP_CPU);
- cpu_watchpoint_remove_all(s, BP_CPU);
cr4 = 0;
xcr0 = XSTATE_FP_MASK;
@@ -6205,6 +6204,8 @@ static void x86_cpu_reset(DeviceState *dev)
if (env->features[FEAT_7_0_EBX] & CPUID_7_0_EBX_FSGSBASE) {
cr4 |= CR4_FSGSBASE_MASK;
}
+#else
+ cpu_watchpoint_remove_all(s, BP_CPU);
#endif
env->xcr0 = xcr0;
--
2.26.2
- [PATCH v4 15/28] cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps, (continued)
- [PATCH v4 15/28] cpu: Move CPUClass::get_paging_enabled to SysemuCPUOps, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 16/28] cpu: Restrict "hw/core/sysemu-cpu-ops.h" to target/cpu.c, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 17/28] linux-user: Remove dead code, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 18/28] gdbstub: Remove watchpoint dead code in gdbserver_fork(), Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 19/28] target/arm/internals: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 20/28] target/arm: Move code blocks around, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 21/28] target/arm: Refactor some function bodies, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 22/28] target/arm: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 23/28] target/i386: Restrict watchpoint code to system emulation,
Philippe Mathieu-Daudé <=
- [PATCH v4 24/28] target/xtensa: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 25/28] accel/tcg/cpu-exec: Restrict watchpoint code to system emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 26/28] cpu: Remove watchpoint stubs for user emulation, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 27/28] cpu: Fix code style for checkpatch.pl, Philippe Mathieu-Daudé, 2021/03/03
- [PATCH v4 28/28] cpu: Move sysemu specific declarations to 'sysemu-cpu-ops.h', Philippe Mathieu-Daudé, 2021/03/03
- Re: [PATCH v4 00/28] cpu: Introduce SysemuCPUOps structure, remove watchpoints from usermode, Richard Henderson, 2021/03/03