From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH v14 0/9] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Date: Fri, 10 Feb 2017 14:07:03 +0100 (CET) Message-ID: References: <20170208080917.24320-1-khuey@kylehuey.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 , Nadav Amit , To: Kyle Huey Return-path: Received: from Galois.linutronix.de ([146.0.238.70]:60356 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750994AbdBJNKy (ORCPT ); Fri, 10 Feb 2017 08:10:54 -0500 In-Reply-To: <20170208080917.24320-1-khuey@kylehuey.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, 8 Feb 2017, Kyle Huey wrote: > rr (http://rr-project.org/), a userspace record-and-replay reverse- > execution debugger, would like to trap and emulate the CPUID instruction. > This would allow us to a) mask away certain hardware features that rr does > not support (e.g. RDRAND) and b) enable trace portability across machines > by providing constant results. > > Newer Intel CPUs (Ivy Bridge and later) can fault when CPUID is executed at > CPL > 0. Expose this capability to userspace as a new pair of arch_prctls, > ARCH_GET_CPUID and ARCH_SET_CPUID. > > Since v13: > All: rebased on top of tglx's __switch_to_xtra patches > (https://lkml.org/lkml/2016/12/15/432) That doesn't help because that patchset is stale and it has unresolved comments. I don't know when I have cycles to revisit it, but if you want to have a try feel free to do so. Thanks, tglx