[PATCH 0/3] KVM: Mark vendor module param read-only after init

From: Sean Christopherson
Date: Wed Nov 09 2022 - 20:30:10 EST


Mark the read-only VMX and SVM module params, and a few other global
variables, read-only after init. In many cases, KVM is royally hosed if
a configuration knob changes while VMs are running, e.g. toggling the TDP
knob would result in spectacular fireworks.

This series is probably best queued very early in a cycle, as the result
of mis-labeled variable is an unexpected kernel #PF.

Sean Christopherson (3):
KVM: VMX: Make module params and other variables read-only after init
KVM: SVM: Make MSR permission bitmap offsets read-only after init
KVM: SVM: Make module params and other variables read-only after init

arch/x86/kvm/svm/svm.c | 38 ++++++++++++++++-----------------
arch/x86/kvm/svm/svm.h | 2 +-
arch/x86/kvm/vmx/capabilities.h | 16 +++++++-------
arch/x86/kvm/vmx/nested.c | 4 ++--
arch/x86/kvm/vmx/sgx.c | 2 +-
arch/x86/kvm/vmx/sgx.h | 2 +-
arch/x86/kvm/vmx/vmx.c | 36 +++++++++++++++----------------
7 files changed, 50 insertions(+), 50 deletions(-)


base-commit: d663b8a285986072428a6a145e5994bc275df994
--
2.38.1.431.g37b22c650d-goog