On Wed, Jan 07, 2026 at 12:19:07AM +0100, Philippe Mathieu-Daudé wrote: > Date: Wed, 7 Jan 2026 00:19:07 +0100 > From: Philippe Mathieu-Daudé <[email protected]> > Subject: [PATCH 5/5] accel/tcg: Unify watchpoint API > X-Mailer: git-send-email 2.52.0 > > Currently "exec/breakpoint.h" contains both BreakPoint *and* > WatchPoint APIs, however very few files requires the former, > and more the latter: > > $ git grep -l CPUBreakpoint | wc -l > 12 > $ git grep -l CPUWatchpoint | wc -l > 25 > > So extracting the WatchPoint API to its own header will reduce > compilation pressure. > > But more importantly, the API is scattered in two distinct headers. > Unify them ("accel/tcg/cpu-ops.h" and "exec/watchpoint.h") to the > new "accel/tcg/watchpoint.h" header, making the emphasis the API is > specific to TCG. > > Have accel/tcg/watchpoint.c absorb system/watchpoint.c code. > > Signed-off-by: Philippe Mathieu-Daudé <[email protected]> > --- > MAINTAINERS | 1 - > include/accel/tcg/cpu-ops.h | 28 +------- > include/accel/tcg/watchpoint.h | 57 ++++++++++++++++ > include/exec/breakpoint.h | 10 --- > include/exec/watchpoint.h | 18 ----- > include/hw/core/cpu.h | 3 +- > target/arm/internals.h | 2 +- > target/ppc/internal.h | 2 +- > target/riscv/debug.h | 2 +- > accel/tcg/cputlb.c | 1 + > accel/tcg/tcg-accel-ops.c | 2 +- > accel/tcg/user-exec-stub.c | 3 +- > accel/tcg/watchpoint.c | 83 +++++++++++++++++++++- > system/watchpoint.c | 102 ---------------------------- > target/arm/debug_helper.c | 2 +- > target/arm/tcg/mte_helper.c | 2 +- > target/arm/tcg/sve_helper.c | 2 +- > target/i386/cpu.c | 2 +- > target/i386/machine.c | 2 +- > target/i386/tcg/system/bpt_helper.c | 2 +- > target/ppc/cpu.c | 2 +- > target/ppc/cpu_init.c | 2 +- > target/riscv/cpu_helper.c | 2 +- > target/riscv/debug.c | 2 +- > target/s390x/helper.c | 2 +- > target/s390x/tcg/debug.c | 2 +- > target/s390x/tcg/excp_helper.c | 2 +- > target/s390x/tcg/mem_helper.c | 1 + > target/xtensa/dbg_helper.c | 2 +- > system/meson.build | 1 - > 30 files changed, 162 insertions(+), 182 deletions(-) > create mode 100644 include/accel/tcg/watchpoint.h > delete mode 100644 include/exec/watchpoint.h > delete mode 100644 system/watchpoint.c
Reviewed-by: Zhao Liu <[email protected]>
