From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0UPZ-0006sJ-7i for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:33:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0UPT-0001t9-8C for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:33:45 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:57536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0UPT-0001sw-1s for qemu-devel@nongnu.org; Fri, 27 Jun 2014 07:33:39 -0400 Received: by mail-we0-f178.google.com with SMTP id x48so5099276wes.23 for ; Fri, 27 Jun 2014 04:33:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53AD568E.7090409@redhat.com> Date: Fri, 27 Jun 2014 13:33:34 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403775865-25219-1-git-send-email-james.hogan@imgtec.com> <1403775865-25219-3-git-send-email-james.hogan@imgtec.com> <20140627084310.GB10041@hall.aurel32.net> In-Reply-To: <20140627084310.GB10041@hall.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] mips_malta: Change default KVM cpu to 24Kc (no FP) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , James Hogan Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Il 27/06/2014 10:43, Aurelien Jarno ha scritto: > On Thu, Jun 26, 2014 at 10:44:23AM +0100, James Hogan wrote: >> 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 >> } > > Given the explanations in the other mails, that looks fine to me, that > said I think we should at least warn the user that we are disabling some > features, instead of doing it silently. This is what is done for example > on x86 when a CPU feature is not available. I agree. James, can you send v2 of this patch only? Paolo