kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] KVM: x86: Disallow writes to feature MSRs post-KVM_RUN
@ 2022-08-05 17:29 Sean Christopherson
  2022-08-05 17:29 ` [RFC PATCH 1/3] KVM: x86: Add macros to track first...last VMX feature MSRs Sean Christopherson
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Sean Christopherson @ 2022-08-05 17:29 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, Like Xu

Give feature MSRs that same treatment as CPUID and disallow changing said
MSRs after KVM_RUN.

RFC as this is lightly tested and should come with a selftests update to
verify it actually works.  Posting early to get feedback on the overall
idea, and on the VMX MSRs trickery (though I think patches 1-2 are a good
idea irrespective of trying to reduce the overhead of the new check).

Sean Christopherson (3):
  KVM: x86: Add macros to track first...last VMX feature MSRs
  KVM: x86: Generate set of VMX feature MSRs using first/last
    definitions
  KVM: x86: Disallow writes to immutable feature MSRs after KVM_RUN

 arch/x86/kvm/svm/svm.c |  2 +-
 arch/x86/kvm/vmx/vmx.c |  8 ++--
 arch/x86/kvm/x86.c     | 90 +++++++++++++++++++++++++++---------------
 arch/x86/kvm/x86.h     |  8 ++++
 4 files changed, 72 insertions(+), 36 deletions(-)


base-commit: 93472b79715378a2386598d6632c654a2223267b
-- 
2.37.1.559.g78731f0fdb-goog


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

end of thread, other threads:[~2022-08-10 19:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05 17:29 [RFC PATCH 0/3] KVM: x86: Disallow writes to feature MSRs post-KVM_RUN Sean Christopherson
2022-08-05 17:29 ` [RFC PATCH 1/3] KVM: x86: Add macros to track first...last VMX feature MSRs Sean Christopherson
2022-08-05 17:29 ` [RFC PATCH 2/3] KVM: x86: Generate set of VMX feature MSRs using first/last definitions Sean Christopherson
2022-08-10 12:52   ` Paolo Bonzini
2022-08-10 14:40     ` Sean Christopherson
2022-08-10 19:16       ` Paolo Bonzini
2022-08-05 17:29 ` [RFC PATCH 3/3] KVM: x86: Disallow writes to immutable feature MSRs after KVM_RUN Sean Christopherson
2022-08-10  6:29   ` Xiaoyao Li
2022-08-10 14:45     ` Sean Christopherson
2022-08-10 12:52 ` [RFC PATCH 0/3] KVM: x86: Disallow writes to feature MSRs post-KVM_RUN 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).