From patchwork Thu Jun 26 09:44:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Hogan X-Patchwork-Id: 4426781 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A10A9BEEAA for ; Thu, 26 Jun 2014 09:44:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C58BB203A1 for ; Thu, 26 Jun 2014 09:44:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F11C42039E for ; Thu, 26 Jun 2014 09:44:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755774AbaFZJoq (ORCPT ); Thu, 26 Jun 2014 05:44:46 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:16850 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751425AbaFZJop (ORCPT ); Thu, 26 Jun 2014 05:44:45 -0400 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id B6E2D83C36993; Thu, 26 Jun 2014 10:44:40 +0100 (IST) Received: from KLMAIL02.kl.imgtec.org (10.40.10.222) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 26 Jun 2014 10:44:43 +0100 Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by klmail02.kl.imgtec.org (10.40.10.222) with Microsoft SMTP Server (TLS) id 14.3.181.6; Thu, 26 Jun 2014 10:44:42 +0100 Received: from jhogan-linux.le.imgtec.org (192.168.154.101) by LEMAIL01.le.imgtec.org (192.168.152.62) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 26 Jun 2014 10:44:41 +0100 From: James Hogan To: CC: , Aurelien Jarno , "Paolo Bonzini" , James Hogan Subject: [PATCH 2/4] mips_malta: Change default KVM cpu to 24Kc (no FP) Date: Thu, 26 Jun 2014 10:44:23 +0100 Message-ID: <1403775865-25219-3-git-send-email-james.hogan@imgtec.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1403775865-25219-1-git-send-email-james.hogan@imgtec.com> References: <1403775865-25219-1-git-send-email-james.hogan@imgtec.com> MIME-Version: 1.0 X-Originating-IP: [192.168.154.101] Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: James Hogan Cc: Aurelien Jarno Cc: Paolo Bonzini --- hw/mips/mips_malta.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 2868ee5b0307..c0841991f4e9 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 }