All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v13 0/8] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
@ 2016-11-28  3:05 ` Kyle Huey
  0 siblings, 0 replies; 26+ messages in thread
From: Kyle Huey @ 2016-11-28  3:05 UTC (permalink / raw)
  To: Robert O'Callahan, Thomas Gleixner, Andy Lutomirski,
	Ingo Molnar, H. Peter Anvin, x86, Paolo Bonzini,
	Radim Krčmář,
	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, Andi Kleen
  Cc: linux-kernel, user-mode-linux-devel, user-mode-linux-user,
	linux-fsdevel, linux-kselftest, kvm

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 v12:
Patch 4: x86/syscalls/32: Wire up arch_prctl on x86-32
- compat_sys_arch_prctl prototype has argument names.

Patch 5: x86/cpufeature: Detect CPUID faulting support
- s/init_intel_misc_features_enables/init_intel_misc_features/.
- Added Reviewed-by Borislav.

Patch 6: x86/arch_prctl: Add ARCH_[GET|SET]_CPUID
- Selftest was split out into Patch 7.
- s/msr_misc_features_enables_shadow/msr_misc_features_shadow/.
- ARCH_GET_CPUID now returns its value directly, not in an outparam.
- ARCH_SET_CPUID now takes a simple 0/1 value, ARCH_CPUID_ENABLE and
  ARCH_CPUID_SIGSEGV are gone.
- ARCH_[GET|SET]_CPUID now operate on the enabledness of the CPUID
  instruction, not the CPUID faulting bit. Thus the default return
  value of ARCH_GET_CPUID is 1, and calling ARCH_SET_CPUID with 0
  activates CPUID faulting (and thus disabling the CPUID instruction).

Patch 7: x86/arch_prctl: Selftest for ARCH_[GET|SET]_CPUID
- The self test was updated for the API changes.

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-12-03 15:55 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28  3:05 [PATCH v13 0/8] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-11-28  3:05 ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 1/8] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 2/8] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 3/8] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 4/8] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 5/8] x86/cpufeature: Detect CPUID faulting support Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 6/8] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28 14:06   ` Thomas Gleixner
2016-11-28 14:06     ` Thomas Gleixner
2016-11-28 16:13     ` Kyle Huey
2016-11-28 16:13       ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 7/8] x86/arch_prctl: Selftest for ARCH_[GET|SET]_CPUID Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-11-28  3:05 ` [PATCH v13 8/8] KVM: x86: virtualize cpuid faulting Kyle Huey
2016-11-28  3:05   ` Kyle Huey
2016-12-02 10:29 ` [PATCH v13 0/8] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Ingo Molnar
2016-12-02 10:29   ` Ingo Molnar
2016-12-03 15:37   ` Kyle Huey
2016-12-03 15:37     ` Kyle Huey

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.