Skip to content
Snippets Groups Projects
  1. Nov 14, 2023
  2. Oct 08, 2023
  3. Oct 03, 2023
  4. Mar 28, 2023
    • Philippe Mathieu-Daudé's avatar
      softmmu: Restore use of CPU watchpoint for all accelerators · 87e303de
      Philippe Mathieu-Daudé authored
      
      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 e4482ab7 ("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 2609ec28.
      
      Fixes: 2609ec28 ("softmmu: Extract watchpoint API from physmem.c")
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-Id: <20230328173117.15226-4-philmd@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      87e303de
    • Philippe Mathieu-Daudé's avatar
      softmmu/watchpoint: Add missing 'qemu/error-report.h' include · a0858608
      Philippe Mathieu-Daudé authored
      
      cpu_watchpoint_insert() calls error_report() which is declared
      in "qemu/error-report.h". When moving this code in commit 2609ec28
      ("softmmu: Extract watchpoint API from physmem.c") we neglected to
      include this header. This works so far because it is indirectly
      included by TCG headers -> "qemu/plugin.h" -> "qemu/error-report.h".
      
      Currently cpu_watchpoint_insert() is only built with the TCG
      accelerator. When building it with other ones (or without TCG)
      we get:
      
        softmmu/watchpoint.c:38:9: error: implicit declaration of function 'error_report' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
              error_report("tried to set invalid watchpoint at %"
              ^
      
      Include "qemu/error-report.h" in order to fix this for non-TCG
      builds.
      
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Message-Id: <20230328173117.15226-3-philmd@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      a0858608
  5. Mar 05, 2023
  6. Feb 27, 2023
Loading