On 07/01/2026 14.07, Philippe Mathieu-Daudé wrote:
By inverting the 'tcg_enabled()' check in s390_cpu_set_psw() we can let the compiler elide the s390_cpu_recompute_watchpoints() call when TCG is not available. Move this function -- along with s390x_cpu_debug_excp_handler() which was introduced in the same commit 311918b979c ("target-s390x: PER storage-alteration event support") -- to a TCG specific file to avoid compiling dead code on KVM. This restricts the WatchPoint API calls to TCG.Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/s390x/s390x-internal.h | 2 - target/s390x/tcg/tcg_s390x.h | 5 ++ target/s390x/cpu.c | 30 ++++++------ target/s390x/helper.c | 38 --------------- target/s390x/tcg/debug.c | 85 ++++++++++++++++++++++++++++++++++ target/s390x/tcg/excp_helper.c | 32 ------------- target/s390x/tcg/meson.build | 3 ++ 7 files changed, 108 insertions(+), 87 deletions(-) create mode 100644 target/s390x/tcg/debug.c
Reviewed-by: Thomas Huth <[email protected]>
