[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/25] target/arm: Wrap breakpoint/watchpoint updates with tcg_ena
From: |
Peter Maydell |
Subject: |
[PULL 02/25] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled |
Date: |
Mon, 27 Feb 2023 14:00:39 +0000 |
From: Fabiano Rosas <farosas@suse.de>
This is in preparation for restricting compilation of some parts of
debug_helper.c to TCG only.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/cpu.c | 6 ++++--
target/arm/debug_helper.c | 16 ++++++++++++----
target/arm/machine.c | 7 +++++--
3 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 876ab8f3bf8..da416f7b1cb 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -539,8 +539,10 @@ static void arm_cpu_reset_hold(Object *obj)
}
#endif
- hw_breakpoint_update_all(cpu);
- hw_watchpoint_update_all(cpu);
+ if (tcg_enabled()) {
+ hw_breakpoint_update_all(cpu);
+ hw_watchpoint_update_all(cpu);
+ }
arm_rebuild_hflags(env);
}
diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c
index 3c671c88c1a..3325eb9d7df 100644
--- a/target/arm/debug_helper.c
+++ b/target/arm/debug_helper.c
@@ -939,7 +939,9 @@ static void dbgwvr_write(CPUARMState *env, const
ARMCPRegInfo *ri,
value &= ~3ULL;
raw_write(env, ri, value);
- hw_watchpoint_update(cpu, i);
+ if (tcg_enabled()) {
+ hw_watchpoint_update(cpu, i);
+ }
}
static void dbgwcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
@@ -949,7 +951,9 @@ static void dbgwcr_write(CPUARMState *env, const
ARMCPRegInfo *ri,
int i = ri->crm;
raw_write(env, ri, value);
- hw_watchpoint_update(cpu, i);
+ if (tcg_enabled()) {
+ hw_watchpoint_update(cpu, i);
+ }
}
void hw_breakpoint_update(ARMCPU *cpu, int n)
@@ -1062,7 +1066,9 @@ static void dbgbvr_write(CPUARMState *env, const
ARMCPRegInfo *ri,
int i = ri->crm;
raw_write(env, ri, value);
- hw_breakpoint_update(cpu, i);
+ if (tcg_enabled()) {
+ hw_breakpoint_update(cpu, i);
+ }
}
static void dbgbcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
@@ -1079,7 +1085,9 @@ static void dbgbcr_write(CPUARMState *env, const
ARMCPRegInfo *ri,
value = deposit64(value, 8, 1, extract64(value, 7, 1));
raw_write(env, ri, value);
- hw_breakpoint_update(cpu, i);
+ if (tcg_enabled()) {
+ hw_breakpoint_update(cpu, i);
+ }
}
void define_debug_regs(ARMCPU *cpu)
diff --git a/target/arm/machine.c b/target/arm/machine.c
index b4c3850570c..fd6323f6d8a 100644
--- a/target/arm/machine.c
+++ b/target/arm/machine.c
@@ -2,6 +2,7 @@
#include "cpu.h"
#include "qemu/error-report.h"
#include "sysemu/kvm.h"
+#include "sysemu/tcg.h"
#include "kvm_arm.h"
#include "internals.h"
#include "migration/cpu.h"
@@ -848,8 +849,10 @@ static int cpu_post_load(void *opaque, int version_id)
return -1;
}
- hw_breakpoint_update_all(cpu);
- hw_watchpoint_update_all(cpu);
+ if (tcg_enabled()) {
+ hw_breakpoint_update_all(cpu);
+ hw_watchpoint_update_all(cpu);
+ }
/*
* TCG gen_update_fp_context() relies on the invariant that
--
2.34.1
- [PULL 00/25] target-arm queue, Peter Maydell, 2023/02/27
- [PULL 01/25] include/hw/arm/allwinner-a10.h: Remove superfluous includes from the header, Peter Maydell, 2023/02/27
- [PULL 02/25] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled,
Peter Maydell <=
- [PULL 05/25] target/arm: move helpers to tcg/, Peter Maydell, 2023/02/27
- [PULL 08/25] target/arm: Move hflags code into the tcg directory, Peter Maydell, 2023/02/27
- [PULL 14/25] hw/char/pl011: Un-inline pl011_create(), Peter Maydell, 2023/02/27
- [PULL 17/25] hw/char/xilinx_uartlite: Open-code xilinx_uartlite_create(), Peter Maydell, 2023/02/27
- [PULL 21/25] hw/arm/musicpal: Remove unused dummy MemoryRegion, Peter Maydell, 2023/02/27
- [PULL 25/25] hw: Replace qemu_or_irq typedef by OrIRQState, Peter Maydell, 2023/02/27
- [PULL 09/25] target/arm: Move regime_using_lpae_format into internal.h, Peter Maydell, 2023/02/27
- [PULL 15/25] hw/char/pl011: Open-code pl011_luminary_create(), Peter Maydell, 2023/02/27
- [PULL 07/25] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled, Peter Maydell, 2023/02/27
- [PULL 10/25] target/arm: Don't access TCG code when debugging with KVM, Peter Maydell, 2023/02/27