From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755539AbcBVUpZ (ORCPT ); Mon, 22 Feb 2016 15:45:25 -0500 Received: from mga03.intel.com ([134.134.136.65]:56098 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752980AbcBVUpX (ORCPT ); Mon, 22 Feb 2016 15:45:23 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,486,1449561600"; d="scan'208";a="921492207" Date: Mon, 22 Feb 2016 12:42:57 -0800 From: Yu-cheng Yu To: Dave Hansen Cc: x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org, Andy Lutomirski , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu Subject: Re: [PATCH 07/10] x86/xsaves: Fix init_fpstate.header.xcomp_bv Message-ID: <20160222204256.GB4140@test-lenovo> References: <1456167596-3932-1-git-send-email-yu-cheng.yu@intel.com> <56CB67C6.3050707@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56CB67C6.3050707@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2016 at 11:55:50AM -0800, Dave Hansen wrote: > On 02/22/2016 10:59 AM, Yu-cheng Yu wrote: > > This actually does not apply to XSAVES as XSAVES uses optimization. After > > init, all components are in INIT and not MODIFIED state and will not be > > saved. There is no need of setting xcomp_bv except for bit 63 to indicate > > a compacted format. > > I look at it this way: xcomp_bv tells you the format of the buffer > xstate_bv tells you which components of the buffer are valid (not in > init state). > > As it stands, every kernel xcomp_bv value should be identical, since the > kernel buffer is always in the same state and XSAVES is always called > with the same Requested Feature BitMap (RFBM). > > While I don't think this patch _hurts_ anything, I think it might be a > bit confusing. Wouldn't it just be easier if *EVERY* xcomp_bv value was > the same? Agree. This patch can be skipped if it turns out not needed. --Yu-cheng