]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: SVM: Mark VMCB_NPT as dirty on nested VMRUN
authorJim Mattson <jmattson@google.com>
Mon, 22 Sep 2025 16:29:23 +0000 (09:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:20 +0000 (12:57 +0100)
commit201b4a7ebbe0bcc67010ee364a4f93b0e7e18984
treef2a259f10ddba96bd3890e11293ac13fb1aae112
parentc1f8d4d41ed3c0f8b429cfbe2c6d4ca5477ad418
KVM: SVM: Mark VMCB_NPT as dirty on nested VMRUN

commit 7c8b465a1c91f674655ea9cec5083744ec5f796a upstream.

Mark the VMCB_NPT bit as dirty in nested_vmcb02_prepare_save()
on every nested VMRUN.

If L1 changes the PAT MSR between two VMRUN instructions on the same
L1 vCPU, the g_pat field in the associated vmcb02 will change, and the
VMCB_NPT clean bit should be cleared.

Fixes: 4bb170a5430b ("KVM: nSVM: do not mark all VMCB02 fields dirty on nested vmexit")
Cc: stable@vger.kernel.org
Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20250922162935.621409-3-jmattson@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/svm/nested.c