[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qemu-ppc
Subject:    [Qemu-ppc] [PATCH] PPC: e500: advertise 4.2 MPIC only if KVM supports EPR
From:       Stuart Yoder <stuart.yoder () freescale ! com>
Date:       2013-03-30 16:40:49
Message-ID: 1364661649-2399-1-git-send-email-stuart.yoder () freescale ! com
[Download RAW message or body]

From: Stuart Yoder <stuart.yoder@freescale.com>

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
---
 hw/ppc/e500plat.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c
index 25ac4b1..2cd7cad 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/openpic.h"
+#include "sysemu/kvm.h"
 
 static void e500plat_fixup_devtree(PPCE500Params *params, void *fdt)
 {
@@ -48,6 +49,10 @@ static void e500plat_init(QEMUMachineInitArgs *args)
         .mpic_version = OPENPIC_MODEL_FSL_MPIC_42,
     };
 
+    if (kvm_enabled() && !kvm_check_extension(kvm_state, KVM_CAP_PPC_EPR)) {
+        params.mpic_version = OPENPIC_MODEL_FSL_MPIC_20;
+    }
+
     ppce500_init(&params);
 }
 
-- 
1.7.9.7




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic