Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932600AbcKHTKu (ORCPT ); Tue, 8 Nov 2016 14:10:50 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:55946 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751749AbcKHTKr (ORCPT ); Tue, 8 Nov 2016 14:10:47 -0500 Date: Tue, 8 Nov 2016 20:06:28 +0100 (CET) From: Thomas Gleixner To: Kyle Huey cc: "Robert O'Callahan" , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Paolo Bonzini , =?ISO-8859-2?Q?Radim_Kr=E8m=E1=F8?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Borislav Petkov , Peter Zijlstra , Boris Ostrovsky , Len Brown , "Rafael J. Wysocki" , Dmitry Safonov , David Matlack , 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 v10 5/7] x86/cpufeature: Detect CPUID faulting support In-Reply-To: <20161108183956.4521-6-khuey@kylehuey.com> Message-ID: References: <20161108183956.4521-1-khuey@kylehuey.com> <20161108183956.4521-6-khuey@kylehuey.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 953 Lines: 24 On Tue, 8 Nov 2016, 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 > http://www.intel.com/content/dam/www/public/us/en/documents/application-notes/virtualization-technology-flexmigration-application-note.pdf Can you please stick that document into the kernel bugzilla, as it's going to be on a different place before this gets merged into Linus tree? See: http://lkml.kernel.org/r/1478631281-5061-1-git-send-email-kan.liang@intel.com > + static const struct msr_bit msr_bits[] = { > + { X86_FEATURE_CPUID_FAULT, MSR_PLATFORM_INFO, 31 }, Can you please make that PLATINFO_CPUID_FAULT_BIT instead of 31? Thanks, tglx