Skip to contentSkip to conversation

kvm: Switch kvm_update_guest_debug to run_on_cpu

PATCH In review Jan Kiszka 2 participants 2 messages May 19, 2010 – May 23, 2010 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 kvm: Switch kvm_update_guest_debug to run_on_cpu

From: Jan Kiszka <[email protected]>

Guest debugging under KVM is currently broken once io-threads are enabled. Easily fixable by switching the fake on_vcpu to the real run_on_cpu implementation.

---
 kvm-all.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
kvm-all.c +1 -11
index c238f54..5684e51 100644
@@ -1033,16 +1033,6 @@ void kvm_setup_guest_memory(void *start, size_t size)
 }
 
 #ifdef KVM_CAP_SET_GUEST_DEBUG
-static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
-{
-#ifdef CONFIG_IOTHREAD
-    if (env != cpu_single_env) {
-        abort();
-    }
-#endif
-    func(data);
-}
-
 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
                                                  target_ulong pc)
 {
@@ -1086,7 +1076,7 @@ int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap)
     kvm_arch_update_guest_debug(env, &data.dbg);
     data.env = env;
 
-    on_vcpu(env, kvm_invoke_set_guest_debug, &data);
+    run_on_cpu(env, kvm_invoke_set_guest_debug, &data);
     return data.err;
 }
 
Signature · 1 line
1.6.0.2
#1 lore raw
Quoted 6 lines · Jan Kiszka

From: Jan Kiszka<[email protected]>

Guest debugging under KVM is currently broken once io-threads are enabled. Easily fixable by switching the fake on_vcpu to the real run_on_cpu implementation.

Applied uq/master, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function