Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753426AbcCLRrx (ORCPT ); Sat, 12 Mar 2016 12:47:53 -0500 Received: from mail.skyhub.de ([78.46.96.112]:43007 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbcCLRrn (ORCPT ); Sat, 12 Mar 2016 12:47:43 -0500 Date: Sat, 12 Mar 2016 18:47:23 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Fenghua Yu , Thomas Gleixner , "x86@kernel.org" , Dave Hansen , "Bryan O'Donoghue" , Andrew Morton , Oleg Nesterov , Ingo Molnar , "linux-kernel@vger.kernel.org" , Andy Shevchenko , "H. Peter Anvin" , "Yu, Yu-cheng" , Linus Torvalds Subject: Re: [PATCH] x86/FPU: Fix FPU handling on legacy FPU machines Message-ID: <20160312174722.GE23410@pd.tnic> References: <20160311090840.GA8486@gmail.com> <20160311094802.GA4312@pd.tnic> <1457694124.2007.12.camel@nexus-software.ie> <20160311112610.GC4312@pd.tnic> <20160311113206.GD4312@pd.tnic> <20160311220313.GG4312@pd.tnic> <56E34197.8080209@linux.intel.com> <20160311222023.GH4312@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1788 Lines: 52 On Sat, Mar 12, 2016 at 09:21:16AM -0800, Andy Lutomirski wrote: > For reference, what are the QEMU options and boot options you used to > trigger this? I'm asking because I tested eagerfpu=on without fxsr a > few weeks ago in QEMU, and I didn't trigger it. Maybe I needed to > force KVM off or something. $ qemu-system-i386 -enable-kvm -gdb tcp::1234 -cpu 486 -m 2048 -hda /home/boris/kvm/debian/sid-i386.img -boot menu=off,order=c -localtime -net nic,model=rtl8139,macaddr=12:35:12:34:56:78 -net user,hostfwd=tcp::1235-:22 -usbdevice tablet -kernel /home/boris/kernel/linux-2.6/arch/x86/boot/bzImage -append "root=/dev/sda1 resume=/dev/sdb1 debug ignore_loglevel log_buf_len=16M earlyprintk=ttyS0,115200 console=ttyS0,115200 console=tty0 " -monitor pty -soundhw hda -serial file:/home/boris/kvm/test-i386-1235.log -snapshot -name "Debian i386:1235" -smp 1 -virtfs local,path=/tmp,mount_tag=tmp,security_model=none I basically tried to get it as close to 486er as possible. I had also CONFIG_M486=y for the guest kernel. > Off the top of my head, I'm guessing that when I wrote "x86/fpu: Fix > FNSAVE usage in eagerfpu mode", I was inadvertently using a bastardize > combination of FNSAVE and FXRSTOR-of-init-state, KVM let the FXRSTOR > through despite not advertising it in CPUID, and it papered over the > init issue because the wrong init state format was hidden by using the > wrong instruction to load it. Yeah, I think qemu looks at CPUID bits for some stuff but probably not all. And I also think we should go and fix such issues there so that we can have as accurate an emulation as possible. > Sigh. Yet more reason for Intel to add chicken bits to *turn off* new > features. Amen to that. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.