From: Luiz Capitulino Date: Wed, 22 Jul 2009 18:32:52 +0000 (-0300) Subject: Fix broken build X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~8331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cf21c8127797cc0dde90004dce6d09f0a8c8c5c;p=sdk%2Femulator%2Fqemu.git 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. Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- diff --git a/kvm-all.c b/kvm-all.c index 91d9333a66..9a822ed88c 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -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; @@ -909,6 +900,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) {