From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754991AbcBVTzv (ORCPT ); Mon, 22 Feb 2016 14:55:51 -0500 Received: from mga11.intel.com ([192.55.52.93]:36157 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753194AbcBVTzu (ORCPT ); Mon, 22 Feb 2016 14:55:50 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,485,1449561600"; d="scan'208";a="751132585" Subject: Re: [PATCH 07/10] x86/xsaves: Fix init_fpstate.header.xcomp_bv To: Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org References: <1456167596-3932-1-git-send-email-yu-cheng.yu@intel.com> Cc: Andy Lutomirski , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu From: Dave Hansen Message-ID: <56CB67C6.3050707@linux.intel.com> Date: Mon, 22 Feb 2016 11:55:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456167596-3932-1-git-send-email-yu-cheng.yu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?