From: Aurelien Jarno Subject: Re: [PATCH 2/4] mips_malta: Change default KVM cpu to 24Kc (no FP) Date: Fri, 27 Jun 2014 10:43:10 +0200 Message-ID: <20140627084310.GB10041@hall.aurel32.net> References: <1403775865-25219-1-git-send-email-james.hogan@imgtec.com> <1403775865-25219-3-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Cc: Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org To: James Hogan Return-path: Content-Disposition: inline In-Reply-To: <1403775865-25219-3-git-send-email-james.hogan@imgtec.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org 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. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net