From 1a61a9ae61cdf7b7d24c3eb711fe772c196c235e Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Thu, 3 Jan 2013 12:37:02 +0000 Subject: PPC: KVM: set has-idle in guest device tree On e500mc, the platform doesn't provide a way for the CPU to go idle. To still not uselessly burn CPU time, expose an idle hypercall to the guest if kvm supports it. Signed-off-by: Stuart Yoder [agraf: adjust for current code base, add patch description, fix non-kvm case] Signed-off-by: Alexander Graf --- target-ppc/kvm_ppc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'target-ppc/kvm_ppc.h') diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 31eb9e6..9b0d500 100644 --- a/target-ppc/kvm_ppc.h +++ b/target-ppc/kvm_ppc.h @@ -19,6 +19,7 @@ uint32_t kvmppc_get_tbfreq(void); uint64_t kvmppc_get_clockfreq(void); uint32_t kvmppc_get_vmx(void); uint32_t kvmppc_get_dfp(void); +int kvmppc_get_hasidle(CPUPPCState *env); int kvmppc_get_hypercall(CPUPPCState *env, uint8_t *buf, int buf_len); int kvmppc_set_interrupt(PowerPCCPU *cpu, int irq, int level); void kvmppc_set_papr(PowerPCCPU *cpu); @@ -55,6 +56,11 @@ static inline uint32_t kvmppc_get_dfp(void) return 0; } +static inline int kvmppc_get_hasidle(CPUPPCState *env) +{ + return 0; +} + static inline int kvmppc_get_hypercall(CPUPPCState *env, uint8_t *buf, int buf_len) { return -1; -- cgit v1.1