From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751687AbdAXCKU (ORCPT ); Mon, 23 Jan 2017 21:10:20 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33219 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750710AbdAXCKR (ORCPT ); Mon, 23 Jan 2017 21:10:17 -0500 Date: Tue, 24 Jan 2017 10:09:21 +0800 From: Kevin Hao To: Dave Hansen Cc: Yu-cheng Yu , fenghua.yu@intel.com, dvlasenk@redhat.com, peterz@infradead.org, oleg@redhat.com, mingo@kernel.org, linux-kernel@vger.kernel.org, brgerst@gmail.com, luto@kernel.org, bp@alien8.de, jpoimboe@redhat.com, hpa@zytor.com, quentin.casasnovas@oracle.com, tglx@linutronix.de, torvalds@linux-foundation.org, riel@redhat.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:x86/urgent] x86/fpu: Set the xcomp_bv when we fake up a XSAVES area Message-ID: <20170124020921.GC9969@pek-khao-d1> References: <20170123165529.GA4996@test-lenovo> <2be814b7-9fd6-7955-b4e3-6ecb4ef76052@linux.intel.com> <20170123205725.GA3920@test-lenovo> <90b0fbee-273b-31c2-6fe9-228f00c0a205@linux.intel.com> <20170123211640.GA3976@test-lenovo> <20170124001447.GD15017@pek-khao-d1> <0d717394-eaf0-4d29-1aae-218ffcc8f06b@linux.intel.com> <20170124015012.GA9969@pek-khao-d1> <1b4e8b6c-c143-1867-712c-8b2e336a6ce0@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GPJrCs/72TxItFYR" Content-Disposition: inline In-Reply-To: <1b4e8b6c-c143-1867-712c-8b2e336a6ce0@linux.intel.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --GPJrCs/72TxItFYR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 23, 2017 at 06:01:10PM -0800, Dave Hansen wrote: > On 01/23/2017 05:50 PM, Kevin Hao wrote: > > According to the ISA manual, XSAVES also set the XCOMP_BV[62:0]. My cod= e only > > try to be compatible with what the cpu does when excuting XSAVES. The f= ollowing > > is quoted from 325462-sdm-vol-1-2abcd-3abcd.pdf. > > The XSAVES instructions sets bit 63 of the XCOMP_BV field of the XSAV= E header while writing RFBM[62:0] to > > XCOMP_BV[62:0]. The XSAVES instruction does not write any part of the= XSAVE header other than the XSTATE_BV > > and XCOMP_BV fields. >=20 > What purpose does it serve to make copyin_to_xsaves() set that bit, We try to fake up a memory area which is supposed to be composed by XSAVES instruction. My code is just trying to do what the XSAVES do. > other than helping to hide bugs? Why do you think it hide the bug? In contrast, I think my patch fixes what = the bug really is. The memory area we fake up is bug, we should fix it there. Thanks, Kevin --GPJrCs/72TxItFYR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJYhrdRAAoJEJNY7TDerrFxFqIIAMV/rsOvAVVPesFwazy7X8Qk wi4YfNw0lFtIbpMrhr2I++gausNftgZ0NIHu9aaeIFp2x1bcFVSblKDFXdZzjHlw QhOAnzJ1O4Lk1ILd8tBx/e22kW7dH2kh2Walcdo8URIp2f7lIJHMfjch+3gPo7MO 0wgFy1ax7c9dATVTVsHLfwFCTnOIU1ODRC0qI50Dnuwn4L6ArXzmj7c6d7pGeq9f bS/uUhso8X4XtoM9jFqkzONLGhTjEAS09mCC285c+jGZ0pEpQSc4bMZh4x1JEZox VqLXPDxoSNwwwQ6zUuW1nV2BHg7LSlOrSWclsi44d3vEG2CSoet5IV+jitABJ88= =aPap -----END PGP SIGNATURE----- --GPJrCs/72TxItFYR--