]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hax-all: make async_safe_run_on_cpu safe on HAX too
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 8 Jun 2017 14:49:05 +0000 (16:49 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:05 +0000 (11:04 +0200)
While at it, drop the current_cpu assignment since this is a
per-thread variable on modern QEMU.

Cc: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/hax-all.c

index 097db5cae1cdf1037c5301df3474f97ebd905074..ba6117d7de5b480a39c2aa0ccae3974f16c872bb 100644 (file)
@@ -514,9 +514,10 @@ static int hax_vcpu_hax_exec(CPUArchState *env)
         hax_vcpu_interrupt(env);
 
         qemu_mutex_unlock_iothread();
+        cpu_exec_start(cpu);
         hax_ret = hax_vcpu_run(vcpu);
+        cpu_exec_end(cpu);
         qemu_mutex_lock_iothread();
-        current_cpu = cpu;
 
         /* Simply continue the vcpu_run if system call interrupted */
         if (hax_ret == -EINTR || hax_ret == -EAGAIN) {