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 <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
This commit is contained in:
Roman Kagan authored and Paolo Bonzini committed 2017-06-15 11:04:05 +02:00
1 parent a20fa79fa5
commit 1d78a3c3ab
1 file changed
+2
+2
View File
@@ -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) {