diff mbox

[PULL,02/10] mips_malta: Change default KVM cpu to 24Kc (no FP)

Message ID 1404921577-1461-3-git-send-email-pbonzini@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini July 9, 2014, 3:59 p.m. UTC
From: James Hogan <james.hogan@imgtec.com>

Change the default Malta CPU model for when KVM is enabled to 24Kc which
doesn't have floating point support compared to the 24Kf.

The resulting incorrect Config CP0 register value doesn't get passed to
KVM yet as KVM doesn't expose it, however we should ensure it is set
correctly now to reduce the risk of breaking migration/loadvm to a
future version of QEMU/Linux that does support them.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/mips/mips_malta.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 2868ee5..c084199 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -949,7 +949,12 @@  void mips_malta_init(MachineState *machine)
 #ifdef TARGET_MIPS64
         cpu_model = "20Kc";
 #else
-        cpu_model = "24Kf";
+        if (kvm_enabled()) {
+            /* Don't enable FPU on KVM yet */
+            cpu_model = "24Kc";
+        } else {
+            cpu_model = "24Kf";
+        }
 #endif
     }