]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: SVM: Mark VMCB_PERM_MAP as dirty on nested VMRUN
authorJim Mattson <jmattson@google.com>
Mon, 22 Sep 2025 16:29:22 +0000 (09:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:22 +0000 (10:14 +0100)
commit4dac2f321e05fde6074372be58336ce1e3e0748a
treecf425cffdd1dad82996464bcbad6afb7d50526c4
parent5d018c1eac353a30454c40663ceac73768ec660a
KVM: SVM: Mark VMCB_PERM_MAP as dirty on nested VMRUN

commit 93c9e107386dbe1243287a5b14ceca894de372b9 upstream.

Mark the VMCB_PERM_MAP bit as dirty in nested_vmcb02_prepare_control()
on every nested VMRUN.

If L1 changes MSR interception (INTERCEPT_MSR_PROT) between two VMRUN
instructions on the same L1 vCPU, the msrpm_base_pa in the associated
vmcb02 will change, and the VMCB_PERM_MAP clean bit should be cleared.

Fixes: 4bb170a5430b ("KVM: nSVM: do not mark all VMCB02 fields dirty on nested vmexit")
Reported-by: Matteo Rizzo <matteorizzo@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jim Mattson <jmattson@google.com>
Link: https://lore.kernel.org/r/20250922162935.621409-2-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