From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755010AbcEDWqu (ORCPT ); Wed, 4 May 2016 18:46:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:9712 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753784AbcEDWqt (ORCPT ); Wed, 4 May 2016 18:46:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,579,1455004800"; d="scan'208";a="946443287" Subject: Re: [PATCH v4 10/10] x86/xsaves: Re-enable XSAVES To: Dave Hansen , Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org References: <572A7AAD.5040201@linux.intel.com> Cc: Andy Lutomirski , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu From: Dave Hansen Message-ID: <572A7BD5.7040708@intel.com> Date: Wed, 4 May 2016 15:46:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <572A7AAD.5040201@linux.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 05/04/2016 03:41 PM, Dave Hansen wrote: > But, since we *always* call XSAVES with an instruction mask of -1 and > end up with a requested feature bitmap (RFBM) equal to XCR0, I think we > can do a shortcut because we'll practically *always* have an > xcomp_bv==RFBM==XCR0, which means that all (present) components will > always have an address. Actually, we depend on that anyway. xstate_comp_offsets[] is completely bogus if we don't have xcomp_bv==RFBM==XCR0. Perhaps we need to add those checks anyway.