From 3b961124bf8a0b490e4fc3a6a39e004500ae6967 Mon Sep 17 00:00:00 2001 From: Stuart Yoder Date: Sat, 30 Mar 2013 06:40:49 +0000 Subject: 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 [agraf: Add comment, route cap check through kvm_ppc.c] Signed-off-by: Alexander Graf --- hw/ppc/e500plat.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'hw/ppc/e500plat.c') diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 7292ce1..c852995 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -16,6 +16,7 @@ #include "sysemu/device_tree.h" #include "hw/pci/pci.h" #include "hw/ppc/openpic.h" +#include "kvm_ppc.h" static void e500plat_fixup_devtree(PPCE500Params *params, void *fdt) { @@ -48,6 +49,12 @@ static void e500plat_init(QEMUMachineInitArgs *args) .mpic_version = OPENPIC_MODEL_FSL_MPIC_42, }; + /* Older KVM versions don't support EPR which breaks guests when we announce + MPIC variants that support EPR. Revert to an older one for those */ + if (kvm_enabled() && !kvmppc_has_cap_epr()) { + params.mpic_version = OPENPIC_MODEL_FSL_MPIC_20; + } + ppce500_init(¶ms); } -- cgit v1.1