Fix build breakage to kvm on ppc
Recent changes to the generic kvm support code broke compile of kvm for ppc. The patch below fixes the errors by adjusting types in the ppc code, and adding a missing #ifdef.
Please apply.
Signed-off-by David Gibson <[email protected]>
--- kvm-all.c | 2 ++ target-ppc/kvm.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-)
kvm-all.c +2 -0
@@ -998,7 +998,9 @@ int kvm_cpu_exec(CPUState *env) } ret =EXCP_INTERRUPT ; +#ifdef KVM_CAP_SET_GUEST_DEBUG out: +#endif /* KVM_CAP_SET_GUEST_DEBUG */ env->exit_request =0 ; cpu_single_env =NULL ;return ret;
target-ppc/kvm.c +3 -3
@@ -223,7 +223,7 @@ int kvmppc_set_interrupt(CPUState *env, int irq, int level)#define PPC_INPUT_INT PPC6xx_INPUT_INT#endif -int kvm_arch_pre_run (CPUState *env,struct kvm_run *run) +void kvm_arch_pre_run (CPUState *env,struct kvm_run *run) {int r;unsigned irq;
@@ -254,15 +254,15 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)/* We don't know if there are more interrupts pending after this. However, * the guest will return to userspace in the course of handling this one * anyways, so we will get a chance to deliver the rest. */ -return 0 ; }void kvm_arch_post_run (CPUState *env,struct kvm_run *run) { } -void kvm_arch_process_irqchip_events (CPUState *env) +int kvm_arch_process_irqchip_events (CPUState *env) { +return 0 ; }static int kvmppc_handle_halt (CPUState *env)
Signature · 4 lines
David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Quoted 18 lines · David Gibson
Recent changes to the generic kvm support code broke compile of kvm for ppc. The patch below fixes the errors by adjusting types in the ppc code, and adding a missing #ifdef.
Please apply.
Signed-off-by David Gibson <[email protected]>--- kvm-all.c | 2 ++ target-ppc/kvm.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-)kvm-all.c +0
-0
kvm-all.c int kvm_cpu_exec(CPUState *env) · line 1003
Quoted 6 lines
kvm-all.c +2
-0@@ -998,7 +998,9 @@ int kvm_cpu_exec(CPUState *env) } ret =EXCP_INTERRUPT ; +#ifdef KVM_CAP_SET_GUEST_DEBUG out: +#endif /* KVM_CAP_SET_GUEST_DEBUG */
Yeah, another non-x86 breakage. But this made me think about the main loop again, and the result will move any related reasons for the #ifdef into arch code.
Quoted 25 lines
kvm-all.c +0
-0env->exit_request =0 ; cpu_single_env =NULL ;return ret;target-ppc/kvm.c +1
-2@@ -223,7 +223,7 @@ int kvmppc_set_interrupt(CPUState *env, int irq, int level)#define PPC_INPUT_INT PPC6xx_INPUT_INT#endif -int kvm_arch_pre_run (CPUState *env,struct kvm_run *run) +void kvm_arch_pre_run (CPUState *env,struct kvm_run *run) {int r;unsigned irq;@@ -254,15 +254,15 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)/* We don't know if there are more interrupts pending after this. However, * the guest will return to userspace in the course of handling this one * anyways, so we will get a chance to deliver the rest. */ -return 0 ; }void kvm_arch_post_run (CPUState *env,struct kvm_run *run)
target-ppc/kvm.c int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) · line 268
Quoted 10 lines
target-ppc/kvm.c +2
-1{ } -void kvm_arch_process_irqchip_events (CPUState *env) +int kvm_arch_process_irqchip_events (CPUState *env) { +return 0 ; }static int kvmppc_handle_halt (CPUState *env)
That other fix is already filed for uq/master.
Thanks for reporting,
Jan