]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: nSVM: Cache and validate vmcb12 g_pat
authorJim Mattson <jmattson@google.com>
Tue, 7 Apr 2026 19:03:26 +0000 (12:03 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 14 May 2026 12:45:10 +0000 (05:45 -0700)
commit4b83e4ba836eadaf369e9af016e20cd74b7fa011
treed912246369cd54774815e6586313a7159f58f042
parent0a8aeb15848ea1c873fd20e1ad3aeba689aeafa8
KVM: x86: nSVM: Cache and validate vmcb12 g_pat

When KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT is disabled and nested paging is
enabled in vmcb12, validate g_pat at emulated VMRUN and cause an immediate
VMEXIT with exit code VMEXIT_INVALID if it is invalid, as specified in the
APM, volume 2: "Nested Paging and VMRUN/VMEXIT."

Fixes: 3d6368ef580a ("KVM: SVM: Add VMRUN handler")
Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://patch.msgid.link/20260407190343.325299-4-jmattson@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.h