Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933894AbcKQREK (ORCPT ); Thu, 17 Nov 2016 12:04:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:38494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933758AbcKQRD5 (ORCPT ); Thu, 17 Nov 2016 12:03:57 -0500 Date: Thu, 17 Nov 2016 17:51:54 +0100 From: Borislav Petkov To: Kyle Huey Cc: "Robert O'Callahan" , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Peter Zijlstra , Boris Ostrovsky , Len Brown , "Rafael J. Wysocki" , Dmitry Safonov , David Matlack , Nadav Amit , linux-kernel@vger.kernel.org, user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v12 5/7] x86/cpufeature: Detect CPUID faulting support Message-ID: <20161117165154.knskynwyjpzqglnd@pd.tnic> References: <20161117020610.5302-1-khuey@kylehuey.com> <20161117020610.5302-6-khuey@kylehuey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161117020610.5302-6-khuey@kylehuey.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 968 Lines: 27 On Wed, Nov 16, 2016 at 06:06:08PM -0800, Kyle Huey wrote: > Intel supports faulting on the CPUID instruction beginning with Ivy Bridge. > When enabled, the processor will fault on attempts to execute the CPUID > instruction with CPL>0. This will allow a ptracer to emulate the CPUID > instruction. > > Bit 31 of MSR_PLATFORM_INFO advertises support for this feature. It is > documented in detail in Section 2.3.2 of > https://bugzilla.kernel.org/attachment.cgi?id=243991 > > Detect support for this feature and expose it as X86_FEATURE_CPUID_FAULT. > > Signed-off-by: Kyle Huey > --- > arch/x86/include/asm/cpufeatures.h | 1 + > arch/x86/include/asm/msr-index.h | 2 ++ > arch/x86/kernel/cpu/intel.c | 12 ++++++++++++ > 3 files changed, 15 insertions(+) Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --