aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorRoman Kagan <rkagan@virtuozzo.com>2017-06-06 21:19:39 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-06-15 11:04:05 +0200
commit1d78a3c3ab8be0d7ea5509676aa38b96c7d551d4 (patch)
treec6efcde5c43193e3d8f674ca91bb6d4686ae47cb /kvm-all.c
parenta20fa79fa5585add650264ab9de1ea01624af943 (diff)
kvm-all: make async_safe_run_on_cpu safe on kvm too
Wrap the bulk of kvm_cpu_exec with cpu_exec_start/end, so that kvm version can also enjoy performing certain operations while all vCPUs are quiescent. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Message-Id: <20170606181948.16238-15-rkagan@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index ab8262f672..98ad151375 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1977,6 +1977,7 @@ int kvm_cpu_exec(CPUState *cpu)
}
qemu_mutex_unlock_iothread();
+ cpu_exec_start(cpu);
do {
MemTxAttrs attrs;
@@ -2106,6 +2107,7 @@ int kvm_cpu_exec(CPUState *cpu)
}
} while (ret == 0);
+ cpu_exec_end(cpu);
qemu_mutex_lock_iothread();
if (ret < 0) {