diff mbox

[2/2] QEMU: PPC: set default cpu type to be 'host'

Message ID 1392405772-8664-2-git-send-email-stuart.yoder@freescale.com
State New
Headers show

Commit Message

Stuart Yoder Feb. 14, 2014, 7:22 p.m. UTC
From: Stuart Yoder <stuart.yoder@freescale.com>

-for KVM we always want the cpu to be that of the
 host system, so make that the default

-for TGC mode, the emulated cpu type should be explicitly
 set

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

Comments

Alexander Graf April 14, 2014, 11:02 a.m. UTC | #1
On 14.02.14 20:22, Stuart Yoder wrote:
> From: Stuart Yoder <stuart.yoder@freescale.com>
>
> -for KVM we always want the cpu to be that of the
>   host system, so make that the default
>
> -for TGC mode, the emulated cpu type should be explicitly
>   set
>
> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>

Could you please indicate in the subject line that we're talking about 
e500? Otherwise this might be confusing for people who expect IBM POWER 
changes.

Otherwise I agree with the patches :).


Alex
diff mbox

Patch

diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index b37ce9d..69dbf47 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -621,7 +621,11 @@  void ppce500_init(QEMUMachineInitArgs *args, PPCE500Params *params)
 
     /* Setup CPUs */
     if (args->cpu_model == NULL) {
-        args->cpu_model = "e500v2_v30";
+        if (kvm_enabled()) {
+            args->cpu_model = "host";
+        } else {
+            args->cpu_model = "e500v2_v30";
+        }
     }
 
     irqs = g_malloc0(smp_cpus * sizeof(qemu_irq *));