linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/7] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
@ 2016-11-08 18:39 Kyle Huey
  2016-11-08 18:39 ` [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
                   ` (6 more replies)
  0 siblings, 7 replies; 29+ messages in thread
From: Kyle Huey @ 2016-11-08 18:39 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
  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, with two values, ARCH_CPUID_ENABLE and
ARCH_CPUID_SIGSEGV.

Since v9:
Patch 7: KVM: x86: virtualize cpuid faulting
- Fixed wrong condition when testing for a hypervisor disabling cpuid
  faulting while it is active.
- Now stores MSRs as u64 for future extensibility.
- Added cpuid_fault_enabled and supports_cpuid_fault helper functions.
- Style nits.

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

end of thread, other threads:[~2017-03-15  9:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-08 18:39 [PATCH v10 0/7] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-11-08 18:39 ` [PATCH v10 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
2016-11-09  9:47   ` Borislav Petkov
2016-11-10 18:17     ` Kyle Huey
2016-11-08 18:39 ` [PATCH v10 2/7] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey
2016-11-09  9:58   ` Borislav Petkov
2016-11-08 18:39 ` [PATCH v10 3/7] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey
2016-11-09 10:31   ` Borislav Petkov
2016-11-08 18:39 ` [PATCH v10 4/7] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey
2016-11-09 11:04   ` Borislav Petkov
2016-11-08 18:39 ` [PATCH v10 5/7] x86/cpufeature: Detect CPUID faulting support Kyle Huey
2016-11-08 19:06   ` Thomas Gleixner
2016-11-08 19:38     ` Kyle Huey
2016-11-09 11:14   ` Borislav Petkov
2016-11-08 18:39 ` [PATCH v10 6/7] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey
2016-11-08 20:06   ` Thomas Gleixner
2016-11-09 13:21     ` Borislav Petkov
2016-11-09 13:34       ` Thomas Gleixner
2016-11-10 23:38         ` Kyle Huey
2016-11-10 23:26       ` Kyle Huey
2016-11-09 13:12   ` Borislav Petkov
2017-03-14 19:01   ` H. Peter Anvin
2017-03-14 19:08     ` Kyle Huey
2017-03-14 20:06       ` H. Peter Anvin
2017-03-14 19:17     ` H. Peter Anvin
2017-03-14 19:23     ` Andy Lutomirski
2017-03-15  9:11       ` H. Peter Anvin
2016-11-08 18:39 ` [PATCH v10 7/7] KVM: x86: virtualize cpuid faulting Kyle Huey
2016-11-08 22:12   ` David Matlack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).