linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: VMX: Sanitize VM-Entry/VM-Exit pairs during setup
@ 2022-05-27 17:06 Sean Christopherson
  2022-05-27 17:06 ` [PATCH v2 1/2] KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load time Sean Christopherson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sean Christopherson @ 2022-05-27 17:06 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li, Jim Mattson,
	Joerg Roedel, kvm, linux-kernel, Chenyi Qiang, Lei Wang

Sanitize the VM-Entry/VM-Exit load+load and load+clear pairs when kvm_intel
is loaded instead of checking both controls at runtime.  Not sanitizing
means KVM ends up setting non-dynamic bits in the VMCS.

Add an on-by-default knob to reject kvm_intel if an inconsistent VMCS
config is detected instead of using a degraded and/or potentially broken
setup.

v2:
  - Drop the macros. [Paolo]
  - Tweak the module param name to try to capture that KVM doesn't check
    for all possible inconsistencies. [Jim]
  - Enable the knob by default. [Paolo]

v1: https://lore.kernel.org/all/20220525210447.2758436-1-seanjc@google.com

Sean Christopherson (2):
  KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load
    time
  KVM: VMX: Reject kvm_intel if an inconsistent VMCS config is detected

 arch/x86/kvm/vmx/capabilities.h | 13 +++------
 arch/x86/kvm/vmx/vmx.c          | 52 +++++++++++++++++++++++++++++++--
 2 files changed, 53 insertions(+), 12 deletions(-)


base-commit: 90bde5bea810d766e7046bf5884f2ccf76dd78e9
-- 
2.36.1.255.ge46751e96f-goog


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

end of thread, other threads:[~2022-06-01 11:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 17:06 [PATCH v2 0/2] KVM: VMX: Sanitize VM-Entry/VM-Exit pairs during setup Sean Christopherson
2022-05-27 17:06 ` [PATCH v2 1/2] KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load time Sean Christopherson
2022-05-27 17:06 ` [PATCH v2 2/2] KVM: VMX: Reject kvm_intel if an inconsistent VMCS config is detected Sean Christopherson
2022-06-01 11:44 ` [PATCH v2 0/2] KVM: VMX: Sanitize VM-Entry/VM-Exit pairs during setup 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).