On 6/20/25 10:27, Philippe Mathieu-Daudé wrote:
When hardware accelerator available, use it to
directly run EL0 and EL1.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  target/arm/tcg/helper-a64.c | 9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c
index 4f618ae390e..5962cff4e7a 100644
--- a/target/arm/tcg/helper-a64.c
+++ b/target/arm/tcg/helper-a64.c
@@ -29,6 +29,7 @@
  #include "internals.h"
  #include "qemu/crc32c.h"
  #include "exec/cpu-common.h"
+#include "system/hw_accel.h"
  #include "accel/tcg/cpu-ldst.h"
  #include "accel/tcg/helper-retaddr.h"
  #include "accel/tcg/probe.h"
@@ -761,6 +762,14 @@ void HELPER(exception_return)(CPUARMState *env, uint64_t 
new_pc)
      arm_call_el_change_hook(cpu);
      bql_unlock();
+ if (new_el < 2 && hwaccel_enabled()) {

Because you're raising EXCP_HWACCEL, I really think this should be

  if (split_enabled() && arm_cpu_can_accelerate(cs))


r~

+        CPUState *cs = env_cpu(env);
+
+        cs->exception_index = EXCP_HWACCEL;
+        cs->exit_request = 1;
+        cpu_loop_exit(cs);
+        /* never returns */
+    }
      return;
illegal_return:


Reply via email to