[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH RESEND 23/42] target/arm: Implement SysemuCPUOps::can_acceler
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH RESEND 23/42] target/arm: Implement SysemuCPUOps::can_accelerate() handler |
Date: |
Fri, 20 Jun 2025 19:27:31 +0200 |
ARM hardware can only accelerate EL0 and EL1.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/arm/cpu.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index ab5fbd9b40b..1a19e5cfb45 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -149,6 +149,13 @@ static bool arm_cpu_has_work(CPUState *cs)
| CPU_INTERRUPT_VFIQ | CPU_INTERRUPT_VIRQ | CPU_INTERRUPT_VSERR
| CPU_INTERRUPT_EXITTB);
}
+
+static bool arm_cpu_can_accelerate(CPUState *cs)
+{
+ CPUARMState *env = cpu_env(cs);
+
+ return arm_current_el(env) < 2;
+}
#endif /* !CONFIG_USER_ONLY */
void arm_register_pre_el_change_hook(ARMCPU *cpu, ARMELChangeHookFn *hook,
@@ -2695,6 +2702,7 @@ static vaddr aarch64_untagged_addr(CPUState *cs, vaddr x)
static const struct SysemuCPUOps arm_sysemu_ops = {
.has_work = arm_cpu_has_work,
+ .can_accelerate = arm_cpu_can_accelerate,
.get_phys_page_attrs_debug = arm_cpu_get_phys_page_attrs_debug,
.asidx_from_attrs = arm_asidx_from_attrs,
.write_elf32_note = arm_cpu_write_elf32_note,
--
2.49.0
- [RFC PATCH RESEND 25/42] accel/split: Empty ops_init(), (continued)
- [RFC PATCH RESEND 25/42] accel/split: Empty ops_init(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 31/42] accel/split: Implement remove_breakpoint(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 34/42] accel/split: Implement get_[vcpu]_stats(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 40/42] accel/split: Call TCGCPUOps::rebuild_tb_hflags(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 01/42] accel/split: Minimal stubs for split accelerator, Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 07/42] accel/split: Implement supports_guest_debug(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 05/42] accel/split: Expose 'hw' and 'sw' properties, Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 12/42] accel/split: Have thread routine ready to dispatch over HW/SW, Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 16/42] accel/split: Implement synchronize_state(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 19/42] accel/split: Implement kick_vcpu_thread(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 23/42] target/arm: Implement SysemuCPUOps::can_accelerate() handler,
Philippe Mathieu-Daudé <=
- [RFC PATCH RESEND 27/42] accel/split: Empty get_elapsed_ticks(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 28/42] accel/split: Empty cpu_thread_is_idle(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 26/42] accel/split: Empty set/get_virtual_clock(), Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 35/42] target/arm: Emulate EL2 under TCG, Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 09/42] accel/split: Add cpu_thread_routine() stub, Philippe Mathieu-Daudé, 2025/06/20
- [RFC PATCH RESEND 21/42] accel/split: Set use_hw in cpu_thread_routine() and switch over, Philippe Mathieu-Daudé, 2025/06/20