Message ID | 20250620172751.94231-41-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | accel/split/arm: Run EL2 using TCG and EL1/EL0 in hardware with HVF | expand |
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote: > Call TCG rebuild_tb_hflags() when transitioning from > hardware accelerator to TCG. > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> > --- > accel/split/split-accel-ops.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c > index 615faf1d96b..4b058034252 100644 > --- a/accel/split/split-accel-ops.c > +++ b/accel/split/split-accel-ops.c > @@ -40,6 +40,8 @@ static void *split_cpu_thread_routine(void *arg) > assert(swc->allowed); > assert(hwc->allowed); > > + assert(swops->rebuild_tcg_tb_flags); > + > rcu_register_thread(); > sw_force_rcu = mttcg_vcpu_register(cpu); > > @@ -69,6 +71,7 @@ static void *split_cpu_thread_routine(void *arg) > r = hwops->exec_vcpu_thread(cpu); > trace_accel_split_exec_vcpu_thread_hw(r); > } else { > + swops->rebuild_tcg_tb_flags(cpu); > r = swops->exec_vcpu_thread(cpu) You should not need to do this before every exec, only on transitions. r~
diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c index 615faf1d96b..4b058034252 100644 --- a/accel/split/split-accel-ops.c +++ b/accel/split/split-accel-ops.c @@ -40,6 +40,8 @@ static void *split_cpu_thread_routine(void *arg) assert(swc->allowed); assert(hwc->allowed); + assert(swops->rebuild_tcg_tb_flags); + rcu_register_thread(); sw_force_rcu = mttcg_vcpu_register(cpu); @@ -69,6 +71,7 @@ static void *split_cpu_thread_routine(void *arg) r = hwops->exec_vcpu_thread(cpu); trace_accel_split_exec_vcpu_thread_hw(r); } else { + swops->rebuild_tcg_tb_flags(cpu); r = swops->exec_vcpu_thread(cpu); trace_accel_split_exec_vcpu_thread_sw(r); }
Call TCG rebuild_tb_hflags() when transitioning from hardware accelerator to TCG. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- accel/split/split-accel-ops.c | 3 +++ 1 file changed, 3 insertions(+)