All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v16 0/10] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction
@ 2017-03-20  8:16 ` Kyle Huey
  0 siblings, 0 replies; 49+ messages in thread
From: Kyle Huey @ 2017-03-20  8:16 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, Grzegorz Andrejczuk
  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 v15:
All: Patch 1 is new, and patch 2 is what was previously patch 9. What were
patches 1-8 are now 3-10, in the same order.

Patch 1: (NEW) x86/msr: Rename MISC_FEATURE_ENABLES
- While fixing the conflicts with the ring3 mwait feature, I noticed it
  introduced MSR_MISC_FEATURE_ENABLES, not MSR_MISC_FEATURES_ENABLES.
  This is corrected.

Patch 2: x86/arch_prctl: Rename 'code' argument to 'option'
- Previously patch 9/9, now moved to precede all other arch_prctl patches.
- Fixed a stale file location comment in arch/um/include/shared/os.h.

Patch 7: x86/cpufeature: Detect CPUID faulting support
- Split cpuid faulting code into a separate init_cpuid_fault.
- Gate calling both init_cpuid_fault and probe_xeon_phi_r3mwait on
  a successful rdmsrl_safe(MSR_MISC_FEATURES_ENABLES).

Patch 8: x86/arch_prctl: Add ARCH_[GET|SET]_CPUID
- Fix the bug with ring 3 mwait interactions that tglx noted by
  teaching probe_xeon_phi_r3mwait about the new MSR_MISC_FEATURES_ENABLES
  shadow, making init_intel_misc_features responsible for all MSR writes.

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

end of thread, other threads:[~2018-07-27 17:18 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20  8:16 [PATCH v16 0/10] x86/arch_prctl Add ARCH_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2017-03-20  8:16 ` Kyle Huey
2017-03-20  8:16 ` [PATCH v16 01/10] x86/msr: Rename MISC_FEATURE_ENABLES to MISC_FEATURES_ENABLES Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:31   ` [tip:x86/process] " tip-bot for Kyle Huey
2018-07-27 17:18   ` [PATCH v16 01/10] " Jim Mattson
2018-07-27 17:18     ` Jim Mattson
2018-07-27 17:18     ` Jim Mattson
2018-07-27 17:18     ` jmattson
2017-03-20  8:16 ` [PATCH v16 02/10] x86/arch_prctl: Rename 'code' argument to 'option' Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:31   ` [tip:x86/process] " tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 03/10] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:32   ` [tip:x86/process] x86/arch_prctl/64: Use SYSCALL_DEFINE2 to define sys_arch_prctl() tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 04/10] x86/arch_prctl/64: Rename do_arch_prctl to do_arch_prctl_64 Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:32   ` [tip:x86/process] x86/arch_prctl/64: Rename do_arch_prctl() to do_arch_prctl_64() tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 05/10] x86/arch_prctl: Add do_arch_prctl_common Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:33   ` [tip:x86/process] x86/arch_prctl: Add do_arch_prctl_common() tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 06/10] x86/syscalls/32: Wire up arch_prctl on x86-32 Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:33   ` [tip:x86/process] " tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 07/10] x86/cpufeature: Detect CPUID faulting support Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 16:34   ` [tip:x86/process] " tip-bot for Kyle Huey
2017-03-20  8:16 ` [PATCH v16 08/10] x86/arch_prctl: Add ARCH_[GET|SET]_CPUID Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-03-20 15:00   ` Thomas Gleixner
2017-03-20 15:00     ` Thomas Gleixner
2017-03-20 16:39     ` Kyle Huey
2017-03-20 16:39       ` Kyle Huey
2017-03-20 16:34   ` [tip:x86/process] " tip-bot for Kyle Huey
2017-03-21  8:34     ` Ingo Molnar
2017-03-21 18:33       ` Kyle Huey
2017-03-20  8:16 ` [PATCH v16 09/10] x86/arch_prctl: Selftest for ARCH_[GET|SET]_CPUID Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-10-11  3:35   ` Wanpeng Li
2017-10-11  3:35     ` Wanpeng Li
2017-10-11  3:56     ` Kyle Huey
2017-10-11  3:56       ` Kyle Huey
2017-10-11  6:25       ` Wanpeng Li
2017-10-11  6:25         ` Wanpeng Li
2017-10-20  8:53       ` Thomas Gleixner
2017-10-20  8:53         ` Thomas Gleixner
2017-03-20  8:16 ` [PATCH v16 10/10] KVM: x86: virtualize cpuid faulting Kyle Huey
2017-03-20  8:16   ` Kyle Huey
2017-04-21  9:58   ` Paolo Bonzini

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.