[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] target/hppa: defer hppa_ptlbe until CPU starts running
From: |
Alex Bennée |
Subject: |
[PATCH 2/4] target/hppa: defer hppa_ptlbe until CPU starts running |
Date: |
Tue, 25 Feb 2025 18:46:26 +0000 |
Since 30933c4fb4 (tcg/cputlb: remove other-cpu capability from TLB flushing)
we don't expect non-CPU callers to the tlb_flush() code. Normally I
would drop the call anyway as the common cpu_reset() code will call
tlb_flush anyway. However as the flush function does more than that,
and is called from helpers instead defer it with an async_run_on_cpu.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
target/hppa/cpu.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 5655677431..b631af381c 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -168,6 +168,14 @@ void hppa_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
cpu_loop_exit(cs);
}
+
+static void hppa_clear_ptlbe(CPUState *cpu, run_on_cpu_data opaque)
+{
+ CPUHPPAState *env = (CPUHPPAState *) opaque.host_ptr;
+ hppa_ptlbe(env);
+}
+
+
#endif /* CONFIG_USER_ONLY */
static void hppa_cpu_realizefn(DeviceState *dev, Error **errp)
@@ -191,7 +199,7 @@ static void hppa_cpu_realizefn(DeviceState *dev, Error
**errp)
cpu->alarm_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
hppa_cpu_alarm_timer, cpu);
- hppa_ptlbe(&cpu->env);
+ async_run_on_cpu(cs, hppa_clear_ptlbe, RUN_ON_CPU_HOST_PTR(&cpu->env));
}
#endif
--
2.39.5
[PATCH 3/4] cputlb: introduce tlb_flush_other_cpu for reset use, Alex Bennée, 2025/02/25
[PATCH 4/4] tcg:tlb: use tcg_debug_assert() in assert_cpu_is_self(), Alex Bennée, 2025/02/25