FIXME: Use sw-hooks?
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
accel/split/split-accel-ops.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
index efef0d60fde..2c7945b6331 100644
--- a/accel/split/split-accel-ops.c
+++ b/accel/split/split-accel-ops.c
@@ -14,9 +14,12 @@
#include "system/cpus.h"
#include "split-accel.h"
+#include "accel/tcg/tcg-accel-ops-mttcg.h"
+
static void *split_cpu_thread_routine(void *arg)
{
AccelState *as = current_accel();
+ void *sw_force_rcu;
CPUState *cpu = arg;
AccelCPUState *acs;
int r;
@@ -24,6 +27,7 @@ static void *split_cpu_thread_routine(void *arg)
/* TODO: check accel allowed */
rcu_register_thread();
+ sw_force_rcu = mttcg_vcpu_register(cpu);
bql_lock();
qemu_thread_get_self(cpu->thread);
@@ -84,6 +88,7 @@ static void *split_cpu_thread_routine(void *arg)
cpu_thread_signal_destroyed(cpu);
bql_unlock();
+ mttcg_vcpu_unregister(cpu, sw_force_rcu);
rcu_unregister_thread();
return NULL;
--
2.49.0