On 12/1/26 14:47, Philippe Mathieu-Daudé wrote:
On 12/1/26 14:14, Thomas Huth wrote:
From: Philippe Mathieu-Daudé <[email protected]>

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]>
Reviewed-by: Thomas Huth <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Thomas Huth <[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

Thanks for taking this patch, but Richard said this WatchPoint
API shouldn't be TCG-only:

https://lore.kernel.org/qemu-devel/4be5bd97-21a5-40fe-9a9c- [email protected]/

As discussed on IRC, this can easily be reverted or adapted in
the unlikely case s390x gets another accelerator merged in QEMU
or KVM/s390x gets watchpoint support :)

Reply via email to