From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MuYLv-0002rC-54 for qemu-devel@nongnu.org; Sun, 04 Oct 2009 17:10:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MuYLt-0002qF-1S for qemu-devel@nongnu.org; Sun, 04 Oct 2009 17:10:45 -0400 Received: from [199.232.76.173] (port=36434 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MuYLs-0002qC-Qj for qemu-devel@nongnu.org; Sun, 04 Oct 2009 17:10:44 -0400 Received: from hall.aurel32.net ([88.191.82.174]:49721) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MuYLs-0003hD-Dm for qemu-devel@nongnu.org; Sun, 04 Oct 2009 17:10:44 -0400 Date: Sun, 4 Oct 2009 23:10:41 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] x86: Fix exceptions for fxsave/fxrstor Message-ID: <20091004211041.GA8368@volta.aurel32.net> References: <1254515337-14321-1-git-send-email-mail@kevin-wolf.de> <20091004100516.GN6691@hall.aurel32.net> <200910042243.54712@kevin-wolf.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <200910042243.54712@kevin-wolf.de> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Sun, Oct 04, 2009 at 10:43:54PM +0200, Kevin Wolf wrote: > Am Sonntag, 4. Oktober 2009 12:05 schrieb Aurelien Jarno: > > On Fri, Oct 02, 2009 at 10:28:57PM +0200, Kevin Wolf wrote: > > > This patch corrects the following aspects of exception generation in > > > fxsave/fxrstor: > > > > > > * Generate #GP if the operand is not aligned to a 16 byte boundary > > > > Agreed. > > > > > * Generate #UD if the LOCK prefix is used > > > > Agreed. > > > > > * For CR0.EM = 1 #NM is generated, not #UD > > > > This does not match the Intel manual: > > | #NM If CR0.TS[bit 3] = 1. > > | > > | #UD If CR0.EM[bit 2] = 1. > > | If CPUID.01H:EDX.FXSR[bit 24] = 0. > > | If the LOCK prefix is used. > > | > > Hm, you seem to have a different Intel manual. In my copy the CR0.EM part > still belongs to #NM. Also, I ran my test code in KVM for comparision and it > did generate an #NM (on two different machines, one Intel, one AMD), so I'm > quite sure this is right (well, at least not completely wrong). My copy of the Intel Manual was quite outdated (May 2007). The new version from September 2009 matches your patch, so I have applied it. Sorry. -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net