All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] KVM: x86: Require EFER.NX support unless EPT is on
@ 2021-06-15 16:45 Sean Christopherson
  2021-06-15 16:45 ` [PATCH 1/4] KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled Sean Christopherson
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-06-15 16:45 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel

KVM has silently required EFER.NX support for shadow paging for well over
a year, and for NPT for roughly the same amount of time.  Attempting to
run any VM with shadow paging on a system without NX support will fail due
to invalid state, while enabling nx_huge_pages with NPT and no NX will
explode due to setting a reserved bit in the page tables.

I really, really wanted to require NX across the board, because the lack
of bug reports for the shadow paging change strongly suggests no one is
running KVM on a CPU that truly doesn't have NX.  But, Intel CPUs let
firmware disable NX via MISC_ENABLES, so it's plausible that there are
users running KVM with EPT and no NX.

Sean Christopherson (4):
  KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled
  KVM: SVM: Refuse to load kvm_amd if NX support is not available
  KVM: x86: WARN and reject loading KVM if NX is supported but not
    enabled
  KVM: x86: Simplify logic to handle lack of host NX support

 arch/x86/kvm/cpuid.c   | 13 +++++--------
 arch/x86/kvm/svm/svm.c | 13 ++++++++++---
 arch/x86/kvm/vmx/vmx.c |  6 ++++++
 arch/x86/kvm/x86.c     |  3 +++
 4 files changed, 24 insertions(+), 11 deletions(-)

-- 
2.32.0.272.g935e593368-goog


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

end of thread, other threads:[~2021-07-07 14:15 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 16:45 [PATCH 0/4] KVM: x86: Require EFER.NX support unless EPT is on Sean Christopherson
2021-06-15 16:45 ` [PATCH 1/4] KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled Sean Christopherson
2021-06-15 22:26   ` Jim Mattson
2021-06-15 16:45 ` [PATCH 2/4] KVM: SVM: Refuse to load kvm_amd if NX support is not available Sean Christopherson
2021-06-15 22:30   ` Jim Mattson
2021-06-15 16:45 ` [PATCH 3/4] KVM: x86: WARN and reject loading KVM if NX is supported but not enabled Sean Christopherson
2021-06-15 22:39   ` Jim Mattson
2021-06-18 10:27     ` Paolo Bonzini
2021-06-24 22:33   ` Sean Christopherson
2021-06-25  9:04     ` Paolo Bonzini
2021-07-07 12:09       ` Naresh Kamboju
2021-07-07 12:09         ` Naresh Kamboju
2021-07-07 14:15         ` Paolo Bonzini
2021-06-15 16:45 ` [PATCH 4/4] KVM: x86: Simplify logic to handle lack of host NX support Sean Christopherson
2021-06-15 22:58   ` Jim Mattson
2021-06-15 23:33     ` Sean Christopherson
2021-06-18 10:31       ` Paolo Bonzini
2021-06-18 10:32 ` [PATCH 0/4] KVM: x86: Require EFER.NX support unless EPT is on 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.