Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752670AbcD2URE (ORCPT ); Fri, 29 Apr 2016 16:17:04 -0400 Received: from mga02.intel.com ([134.134.136.20]:3083 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752327AbcD2URC (ORCPT ); Fri, 29 Apr 2016 16:17:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,553,1455004800"; d="scan'208";a="795290129" Subject: Re: [PATCH v4 07/10] x86/xsaves: Fix PTRACE frames for XSAVES To: Yu-cheng Yu , x86@kernel.org, "H. Peter Anvin" , Thomas Gleixner , Ingo Molnar , linux-kernel@vger.kernel.org References: <46ff4951eef7e9ad30b25df401fa536a5bc9100b.1457038929.git.yu-cheng.yu@intel.com> Cc: Andy Lutomirski , Borislav Petkov , Sai Praneeth Prakhya , "Ravi V. Shankar" , Fenghua Yu From: Dave Hansen Message-ID: <5723C13B.8080408@linux.intel.com> Date: Fri, 29 Apr 2016 13:16:59 -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: <46ff4951eef7e9ad30b25df401fa536a5bc9100b.1457038929.git.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 Content-Length: 446 Lines: 10 On 03/04/2016 10:12 AM, Yu-cheng Yu wrote: > + if (boot_cpu_has(X86_FEATURE_XSAVES)) { > + ret = copyout_from_xsaves(pos, count, kbuf, ubuf, xsave); On a higher level, we really should stop using "boot_cpu_has(X86_FEATURE_XSAVES)" as a proxy for "the kernel XSAVE buffer is in the XSAVES format". I think our use of the _hardware_ CPUID bit is confusing at least the KVM folks. We probably want a software X86_FEATURE_OS_XSAVES or something.