qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH-for-8.0] softmmu: Extract watchpoint API from physmem.c


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-8.0] softmmu: Extract watchpoint API from physmem.c
Date: Fri, 9 Dec 2022 16:33:20 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

+Peter/Laurent

On 9/12/22 15:12, Philippe Mathieu-Daudé wrote:
The watchpoint API is specific to TCG system emulation.

Move it to a new compile unit. The inlined stubs are used
for user-mode and non-TCG accelerators.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  MAINTAINERS           |   1 +
  include/hw/core/cpu.h |   2 +-
  softmmu/meson.build   |   3 +-
  softmmu/physmem.c     | 191 ------------------------------------
  softmmu/watchpoint.c  | 220 ++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 224 insertions(+), 193 deletions(-)
  create mode 100644 softmmu/watchpoint.c

diff --git a/MAINTAINERS b/MAINTAINERS
index 6966490c94..979c3e2c3f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -120,6 +120,7 @@ M: Richard Henderson <richard.henderson@linaro.org>
  R: Paolo Bonzini <pbonzini@redhat.com>
  S: Maintained
  F: softmmu/cpus.c
+F: softmmu/watchpoint.c
  F: cpus-common.c
  F: page-vary.c
  F: page-vary-common.c
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 8830546121..b490cc80d8 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -943,7 +943,7 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr 
pc, int mask)
      return false;
  }
-#ifdef CONFIG_USER_ONLY
+#if !defined(CONFIG_TCG) || defined(CONFIG_USER_ONLY)
  static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len,
                                          int flags, CPUWatchpoint **watchpoint)

I guess remember Peter saying watchpoints could be supported in user-mode but I'm not sure... Anyhow if so this can still be done on top of
this patch, which removes 200 LoC from physmem.c which is the 2000 LoC.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]