]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: SVM: check validity of VMCB controls when returning from SMM
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 9 Mar 2026 11:40:52 +0000 (12:40 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Mar 2026 17:41:11 +0000 (18:41 +0100)
commitbe5fa8737d42c5ba16d2ea72c23681f8abbb07e8
tree7a8d313a4480b9eb9f5f091292dc045eaaa03b36
parent5a30e8aea079b3e4e79d6ce7a878f5f42efe9d0b
KVM: SVM: check validity of VMCB controls when returning from SMM

The VMCB12 is stored in guest memory and can be mangled while in SMM; it
is then reloaded by svm_leave_smm(), but it is not checked again for
validity.

Move the cached vmcb12 control and save consistency checks out of
svm_set_nested_state() and into a helper, and reuse it in
svm_leave_smm().

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h