aboutsummaryrefslogtreecommitdiff
path: root/include/hw/core
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-03-28 19:31:17 +0200
committerRichard Henderson <richard.henderson@linaro.org>2023-03-28 15:24:06 -0700
commit87e303de70f93bf700f58412fb9b2c3ec918c4b5 (patch)
treead518276fd65d20e339a33200de38cb603a9e17b /include/hw/core
parenta0858608343d26e74da390a5795e2e83aabda2d4 (diff)
downloadqemu-87e303de70f93bf700f58412fb9b2c3ec918c4b5.zip
qemu-87e303de70f93bf700f58412fb9b2c3ec918c4b5.tar.gz
qemu-87e303de70f93bf700f58412fb9b2c3ec918c4b5.tar.bz2
softmmu: Restore use of CPU watchpoint for all accelerators
CPU watchpoints can be use by non-TCG accelerators. KVM uses them: $ git grep CPUWatchpoint|fgrep kvm target/arm/kvm64.c:1558: CPUWatchpoint *wp = find_hw_watchpoint(cs, debug_exit->far); target/i386/kvm/kvm.c:5216:static CPUWatchpoint hw_watchpoint; target/ppc/kvm.c:443:static CPUWatchpoint hw_watchpoint; target/s390x/kvm/kvm.c:139:static CPUWatchpoint hw_watchpoint; See for example commit e4482ab7e3 ("target-arm: kvm - add support for HW assisted debug"): This adds basic support for HW assisted debug. The ioctl interface to KVM allows us to pass an implementation defined number of break and watch point registers. [...] This partially reverts commit 2609ec2868e6c286e755a73b4504714a0296a. Fixes: 2609ec2868 ("softmmu: Extract watchpoint API from physmem.c") Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230328173117.15226-4-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/core')
-rw-r--r--include/hw/core/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index ce31274..397fd3a 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -949,7 +949,7 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask)
return false;
}
-#if !defined(CONFIG_TCG) || defined(CONFIG_USER_ONLY)
+#if defined(CONFIG_USER_ONLY)
static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
int flags, CPUWatchpoint **watchpoint)
{