linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/4] KVM: Emulate UMIP (or almost do so)
@ 2016-07-12 19:20 Paolo Bonzini
  2016-07-12 19:20 ` [RFC PATCH 1/4] x86: add UMIP feature and CR4 bit Paolo Bonzini
                   ` (5 more replies)
  0 siblings, 6 replies; 32+ messages in thread
From: Paolo Bonzini @ 2016-07-12 19:20 UTC (permalink / raw)
  To: linux-kernel, kvm

UMIP (User-Mode Instruction Prevention) is a feature of future
Intel processors (Cannonlake?) that blocks SLDT, SGDT, STR, SIDT
and SMSW from user-mode processes.

The idea here is to use virtualization intercepts to emulate UMIP; it
slows down the instructions when they're executed in ring 0, but they
are really never executed in practice.  On AMD systems it's possible
to emulate it entirely; instead on Intel systems it's *almost* possible
to emulate it, because SMSW doesn't cause a vmexit, and hence SMSW will
not fault.

This patch series provides the infrastructure and implements it on
Intel.  I tested it through kvm-unit-tests.

Still I think the idea is interesting, even if it's buggy for current
Intel processors.  Any opinions?

Paolo

Paolo Bonzini (4):
  x86: add UMIP feature and CR4 bit
  KVM: x86: emulate sldt and str
  KVM: x86: add support for emulating UMIP
  KVM: vmx: add support for emulating UMIP

 arch/x86/include/asm/cpufeatures.h          |  1 +
 arch/x86/include/asm/kvm_host.h             |  3 ++-
 arch/x86/include/asm/vmx.h                  |  1 +
 arch/x86/include/uapi/asm/processor-flags.h |  2 ++
 arch/x86/include/uapi/asm/vmx.h             |  4 +++
 arch/x86/kvm/cpuid.c                        |  5 +++-
 arch/x86/kvm/cpuid.h                        |  8 ++++++
 arch/x86/kvm/emulate.c                      | 40 ++++++++++++++++++++++++-----
 arch/x86/kvm/svm.c                          |  6 +++++
 arch/x86/kvm/vmx.c                          | 40 ++++++++++++++++++++++++++++-
 arch/x86/kvm/x86.c                          |  3 +++
 11 files changed, 104 insertions(+), 9 deletions(-)

-- 
1.8.3.1

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

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

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-12 19:20 [RFC PATCH 0/4] KVM: Emulate UMIP (or almost do so) Paolo Bonzini
2016-07-12 19:20 ` [RFC PATCH 1/4] x86: add UMIP feature and CR4 bit Paolo Bonzini
2016-07-12 19:20 ` [RFC PATCH 2/4] KVM: x86: emulate sldt and str Paolo Bonzini
2016-07-12 19:20 ` [RFC PATCH 3/4] KVM: x86: add support for emulating UMIP Paolo Bonzini
2016-07-13 20:03   ` Radim Krčmář
2016-07-14  7:00     ` Paolo Bonzini
2016-07-14 12:24       ` Radim Krčmář
2016-07-12 19:20 ` [RFC PATCH 4/4] KVM: vmx: " Paolo Bonzini
2016-07-13  9:21   ` Yang Zhang
2016-07-13  9:35     ` Paolo Bonzini
2016-07-13  9:54       ` Yang Zhang
2016-07-13  9:35     ` Paolo Bonzini
2016-07-13 10:02       ` Yang Zhang
2016-07-13 10:21         ` Paolo Bonzini
2016-07-13 20:30   ` Radim Krčmář
2016-07-14  8:09     ` Paolo Bonzini
2016-07-14 12:36       ` Radim Krčmář
2016-07-14 12:54         ` Paolo Bonzini
2016-07-31  2:32       ` Wanpeng Li
2016-08-01 15:01         ` Paolo Bonzini
2016-08-02  1:05           ` Wanpeng Li
2016-07-13  8:29 ` [RFC PATCH 0/4] KVM: Emulate UMIP (or almost do so) Yang Zhang
2016-07-13  9:34   ` Paolo Bonzini
2016-12-13  4:03 ` Li, Liang Z
2016-12-13 11:03   ` Paolo Bonzini
2017-03-01  9:04     ` Yu Zhang
2017-03-06 21:07       ` Paolo Bonzini
2017-03-10  8:02       ` Yu Zhang
2017-03-10  8:36         ` Paolo Bonzini
2017-03-10  9:31           ` Yu Zhang
2017-03-10 11:28             ` Yu Zhang
2017-03-10 15:00             ` Paolo Bonzini

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