]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target-ppc: Change default cpu for ppc64le-linux-user
authorRichard Henderson <rth@twiddle.net>
Sat, 28 Jun 2014 16:45:27 +0000 (09:45 -0700)
committerAlexander Graf <agraf@suse.de>
Tue, 8 Jul 2014 10:10:36 +0000 (12:10 +0200)
The default, 970fx, doesn't support MSR_LE.  So even though we set LE in
ppc_cpu_reset, it gets cleared again in hreg_store_msr.  Error out if a
user-selected cpu model doesn't support LE.

Signed-off-by: Richard Henderson <rth@twiddle.net>
[agraf: switch to POWER7 as default for BE and LE]
Signed-off-by: Alexander Graf <agraf@suse.de>
linux-user/main.c
target-ppc/translate_init.c

index 900a17fa33b2f241a45398e7e59a242f3e8d204a..b453a39853e1701101d4384ce1a418038432657e 100644 (file)
@@ -3901,11 +3901,11 @@ int main(int argc, char **argv, char **envp)
 #elif defined TARGET_OPENRISC
         cpu_model = "or1200";
 #elif defined(TARGET_PPC)
-#ifdef TARGET_PPC64
-        cpu_model = "970fx";
-#else
+# ifdef TARGET_PPC64
+        cpu_model = "POWER7";
+# else
         cpu_model = "750";
-#endif
+# endif
 #else
         cpu_model = "any";
 #endif
index 2ab281069c351e57af867ed951f61a771abd24b1..7b4d9beae2b125419741490f1ea5081ae6a87fc6 100644 (file)
@@ -9551,6 +9551,10 @@ static void ppc_cpu_reset(CPUState *s)
 #endif
 #if !defined(TARGET_WORDS_BIGENDIAN)
     msr |= (target_ulong)1 << MSR_LE; /* Little-endian user mode */
+    if (!((env->msr_mask >> MSR_LE) & 1)) {
+        fprintf(stderr, "Selected CPU does not support little-endian.\n");
+        exit(1);
+    }
 #endif
 #endif