Commit fc5d642fcae392bbc9fed9ac6bc78ac29ed48372

Authored by Luiz Capitulino
Committed by Anthony Liguori
1 parent aaf10d9d

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 <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 9 additions and 9 deletions
kvm-all.c
@@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque) @@ -155,15 +155,6 @@ static void kvm_reset_vcpu(void *opaque)
155 } 155 }
156 } 156 }
157 157
158 -static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)  
159 -{  
160 - if (env == cpu_single_env) {  
161 - func(data);  
162 - return;  
163 - }  
164 - abort();  
165 -}  
166 -  
167 int kvm_irqchip_in_kernel(void) 158 int kvm_irqchip_in_kernel(void)
168 { 159 {
169 return kvm_state->irqchip_in_kernel; 160 return kvm_state->irqchip_in_kernel;
@@ -909,6 +900,15 @@ void kvm_setup_guest_memory(void *start, size_t size) @@ -909,6 +900,15 @@ void kvm_setup_guest_memory(void *start, size_t size)
909 } 900 }
910 901
911 #ifdef KVM_CAP_SET_GUEST_DEBUG 902 #ifdef KVM_CAP_SET_GUEST_DEBUG
  903 +static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
  904 +{
  905 + if (env == cpu_single_env) {
  906 + func(data);
  907 + return;
  908 + }
  909 + abort();
  910 +}
  911 +
912 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env, 912 struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
913 target_ulong pc) 913 target_ulong pc)
914 { 914 {