aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorStuart Yoder <stuart.yoder@freescale.com>2013-03-30 06:40:49 +0000
committerAlexander Graf <agraf@suse.de>2013-04-26 23:02:40 +0200
commit3b961124bf8a0b490e4fc3a6a39e004500ae6967 (patch)
treeed1715503dfdcba439a9700e30c6622c3b7759d9 /hw/ppc
parente71ec2e93dad4446d245031382e30b377640d9ca (diff)
downloadqemu-3b961124bf8a0b490e4fc3a6a39e004500ae6967.zip
qemu-3b961124bf8a0b490e4fc3a6a39e004500ae6967.tar.gz
qemu-3b961124bf8a0b490e4fc3a6a39e004500ae6967.tar.bz2
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 'hw/ppc')
-rw-r--r--hw/ppc/e500plat.c7
1 files changed, 7 insertions, 0 deletions
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(&params);
}