aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2017-06-08 16:49:05 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2017-06-15 11:04:05 +0200
commit457e03559dc57859eb12f993380ddeaeb73e9017 (patch)
tree300bb4fc06b5eddf25c947f42ee02f3ec85dbe20 /target
parent1d78a3c3ab8be0d7ea5509676aa38b96c7d551d4 (diff)
hax-all: make async_safe_run_on_cpu safe on HAX too
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>
Diffstat (limited to 'target')
-rw-r--r--target/i386/hax-all.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c
index 097db5cae1..ba6117d7de 100644
--- a/target/i386/hax-all.c
+++ b/target/i386/hax-all.c
@@ -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) {