PPC: e500: advertise 4.2 MPIC only if KVM supports EPR

Older KVM versions don't support EPR which breaks guests when we announce
MPIC variants that support EPR.

Catch that case and expose only MPIC version 2.0 which tells the guest that
we don't support the EPR capability yet.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
[agraf: Add comment, route cap check through kvm_ppc.c]
Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
Stuart Yoder 2013-03-30 06:40:49 +00:00 committed by Alexander Graf
parent e71ec2e93d
commit 3b961124bf
3 changed files with 20 additions and 0 deletions

View file

@ -33,6 +33,7 @@ int kvmppc_reset_htab(int shift_hint);
uint64_t kvmppc_rma_size(uint64_t current_size, unsigned int hash_shift);
#endif /* !CONFIG_USER_ONLY */
int kvmppc_fixup_cpu(PowerPCCPU *cpu);
bool kvmppc_has_cap_epr(void);
#else
@ -129,6 +130,11 @@ static inline int kvmppc_fixup_cpu(PowerPCCPU *cpu)
{
return -1;
}
static inline bool kvmppc_has_cap_epr(void)
{
return false;
}
#endif
#ifndef CONFIG_KVM