Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754248AbcKHTif (ORCPT ); Tue, 8 Nov 2016 14:38:35 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:34873 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754144AbcKHTi2 (ORCPT ); Tue, 8 Nov 2016 14:38:28 -0500 MIME-Version: 1.0 In-Reply-To: References: <20161108183956.4521-1-khuey@kylehuey.com> <20161108183956.4521-6-khuey@kylehuey.com> From: Kyle Huey Date: Tue, 8 Nov 2016 11:38:25 -0800 Message-ID: Subject: Re: [PATCH v10 5/7] x86/cpufeature: Detect CPUID faulting support To: Thomas Gleixner Cc: "Robert O'Callahan" , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , 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 , open list , "open list:USER-MODE LINUX (UML)" , "open list:USER-MODE LINUX (UML)" , "open list:FILESYSTEMS (VFS and infrastructure)" , "open list:KERNEL SELFTEST FRAMEWORK" , kvm list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1132 Lines: 27 On Tue, Nov 8, 2016 at 11:06 AM, Thomas Gleixner wrote: > 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 Done. https://bugzilla.kernel.org/attachment.cgi?id=243991 > 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? Sure. - Kyle