qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 16/41] kvm-all: make async_safe_run_on_cpu safe on kv


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 16/41] kvm-all: make async_safe_run_on_cpu safe on kvm too
Date: Thu, 15 Jun 2017 12:52:36 +0200

From: Roman Kagan <address@hidden>

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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 kvm-all.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kvm-all.c b/kvm-all.c
index ab8262f..98ad151 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) {
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]