linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/7] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
@ 2016-11-06 20:57 Kyle Huey
  2016-11-06 20:57 ` [PATCH v9 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Kyle Huey @ 2016-11-06 20:57 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 v8:
Patch 7: KVM: x86: virtualize cpuid faulting
- Moved vcpu->arch.cpuid_fault initialization to the '!init_event' block.
- Added support for hypervisors writing to MSR_PLATFORM_INFO to disable the
  cpuid faulting feature.
- Added MSR_MISC_FEATURES_ENABLES to emulated_msrs[] to allow hypervisors
  to save/restore the msr.

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

end of thread, other threads:[~2016-11-08 18:00 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-06 20:57 [PATCH v9 0/7] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-11-06 20:57 ` [PATCH v9 1/7] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
2016-11-06 20:57 ` [PATCH v9 2/7] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey
2016-11-06 20:57 ` [PATCH v9 3/7] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey
2016-11-06 20:57 ` [PATCH v9 4/7] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey
2016-11-06 20:57 ` [PATCH v9 5/7] x86/cpufeature: Detect CPUID faulting support Kyle Huey
2016-11-06 20:57 ` [PATCH v9 6/7] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey
2016-11-06 20:57 ` [PATCH v9 7/7] KVM: x86: virtualize cpuid faulting Kyle Huey
2016-11-07 20:13   ` David Matlack
2016-11-08 17:42     ` Kyle Huey
2016-11-08 17:53       ` Thomas Gleixner
2016-11-08 18:00         ` Kyle Huey
2016-11-08 17:58       ` Kyle Huey
2016-11-08 17:58         ` Kyle Huey

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).