]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT
authorJim Mattson <jmattson@google.com>
Tue, 7 Apr 2026 19:03:24 +0000 (12:03 -0700)
committerSean Christopherson <seanjc@google.com>
Thu, 14 May 2026 12:45:07 +0000 (05:45 -0700)
commit822790ab01495d67b14174063ba46fcc19ff0aa8
tree80c9e26af18742e7b9a5b73ad24184135ffa4b7f
parentb7fbe9a1bf9ee6c967ef77d366ca58c35fcf1887
KVM: x86: Define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT

Define a quirk to control whether nested SVM shares L1's PAT with L2
(legacy behavior) or gives L2 its own independent gPAT (correct behavior
per the APM).

When the quirk is enabled (default), L2 shares L1's PAT, preserving the
legacy KVM behavior. When userspace disables the quirk, KVM correctly
virtualizes the PAT for nested SVM guests, giving L2 a separate gPAT as
specified in the AMD architecture.

Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://patch.msgid.link/20260407190343.325299-2-jmattson@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Documentation/virt/kvm/api.rst
arch/x86/include/asm/kvm_host.h
arch/x86/include/uapi/asm/kvm.h
arch/x86/kvm/svm/svm.h