Skip to contentSkip to conversation

Fix broken build

PATCH New Luiz Capitulino 1 participant 1 message Jul 22, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix broken build

The only caller of on_vcpu() is protected by ifdef KVM_CAP_SET_GUEST_DEBUG, so protect on_vcpu() too otherwise QEMU may not to build.

---
 kvm-all.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
kvm-all.c +9 -9
index 824bb4c..70507b1 100644
@@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque)
     }
 }
 
-static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
-{
-    if (env == cpu_single_env) {
-        func(data);
-        return;
-    }
-    abort();
-}
-
 int kvm_irqchip_in_kernel(void)
 {
     return kvm_state->irqchip_in_kernel;
@@ -906,6 +897,15 @@ 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)
+{
+    if (env == cpu_single_env) {
+        func(data);
+        return;
+    }
+    abort();
+}
+
 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
                                                  target_ulong pc)
 {
Signature · 1 line
1.6.4.rc1.10.g2a67