linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: VMX: Sanitize VM-Entry/VM-Exit pairs during setup
@ 2022-05-25 21:04 Sean Christopherson
  2022-05-25 21:04 ` [PATCH 1/2] KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load time Sean Christopherson
  2022-05-25 21:04 ` [PATCH 2/2] KVM: VMX: Add knob to allow rejecting kvm_intel on inconsistent VMCS config Sean Christopherson
  0 siblings, 2 replies; 13+ messages in thread
From: Sean Christopherson @ 2022-05-25 21:04 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 opt-in knob to force kvm_intel to bail if an inconsistent pair is
detected instead of using a degraded and/or potentially broken setup.

Arguably patch 01 is stable material, but my mental coin flip came up
negative and I didn't Cc: stable.

And for patch 02, I'd definitely be favor of making it opt-out instead of
opt-in, but there's a non-zero chance that someone out there is running
KVM in a misconfigured VM...

Sean Christopherson (2):
  KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load
    time
  KVM: VMX: Add knob to allow rejecting kvm_intel on inconsistent VMCS
    config

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


base-commit: 90bde5bea810d766e7046bf5884f2ccf76dd78e9
-- 
2.36.1.124.g0e6072fb45-goog


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

end of thread, other threads:[~2022-05-27  9:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25 21:04 [PATCH 0/2] KVM: VMX: Sanitize VM-Entry/VM-Exit pairs during setup Sean Christopherson
2022-05-25 21:04 ` [PATCH 1/2] KVM: VMX: Sanitize VM-Entry/VM-Exit control pairs at kvm_intel load time Sean Christopherson
2022-05-25 23:27   ` Yuan Yao
2022-05-26  0:42     ` Sean Christopherson
2022-05-26  1:04       ` Yuan Yao
2022-05-26 10:39   ` Paolo Bonzini
2022-05-26 21:35     ` Sean Christopherson
2022-05-27  9:44       ` Paolo Bonzini
2022-05-25 21:04 ` [PATCH 2/2] KVM: VMX: Add knob to allow rejecting kvm_intel on inconsistent VMCS config Sean Christopherson
2022-05-25 21:17   ` Jim Mattson
2022-05-26  0:45     ` Sean Christopherson
2022-05-26  1:00       ` Jim Mattson
2022-05-26 10:39   ` 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).