diff options
author | Stuart Yoder <stuart.yoder@freescale.com> | 2013-03-30 06:40:49 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 23:02:40 +0200 |
commit | 3b961124bf8a0b490e4fc3a6a39e004500ae6967 (patch) | |
tree | ed1715503dfdcba439a9700e30c6622c3b7759d9 /target-ppc/kvm.c | |
parent | e71ec2e93dad4446d245031382e30b377640d9ca (diff) |
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>
Diffstat (limited to 'target-ppc/kvm.c')
-rw-r--r-- | target-ppc/kvm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 5e9dddbb54..f2658bba50 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -63,6 +63,7 @@ static int cap_ppc_rma; static int cap_spapr_tce; static int cap_hior; static int cap_one_reg; +static int cap_epr; /* XXX We have a race condition where we actually have a level triggered * interrupt, but the infrastructure can't expose that yet, so the guest @@ -95,6 +96,7 @@ int kvm_arch_init(KVMState *s) cap_spapr_tce = kvm_check_extension(s, KVM_CAP_SPAPR_TCE); cap_one_reg = kvm_check_extension(s, KVM_CAP_ONE_REG); cap_hior = kvm_check_extension(s, KVM_CAP_PPC_HIOR); + cap_epr = kvm_check_extension(s, KVM_CAP_PPC_EPR); if (!cap_interrupt_level) { fprintf(stderr, "KVM: Couldn't find level irq capability. Expect the " @@ -1530,6 +1532,11 @@ int kvmppc_fixup_cpu(PowerPCCPU *cpu) return 0; } +bool kvmppc_has_cap_epr(void) +{ + return cap_epr; +} + static int kvm_ppc_register_host_cpu_type(void) { TypeInfo type_info = { |