]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: nSVM: Directly (re)calc vmcb02 intercepts from nested_vmcb02_prepare_control()
authorSean Christopherson <seanjc@google.com>
Wed, 18 Feb 2026 23:09:54 +0000 (15:09 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 5 Mar 2026 00:08:59 +0000 (16:08 -0800)
Now that nested_vmcb02_recalc_intercepts() provides guardrails against it
being incorrectly called without vmcb02 active, invoke it directly from
nested_vmcb02_recalc_intercepts() instead of bouncing through
svm_mark_intercepts_dirty(), which unnecessarily marks vmcb01 as dirty.

Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20260218230958.2877682-5-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c

index 75e7deef51a52090601ae5893f14ee57bc5024fc..5ee77a5130d361fcd27010ffae4bfae9bd2266c0 100644 (file)
@@ -960,7 +960,7 @@ static void nested_vmcb02_prepare_control(struct vcpu_svm *svm)
         * Merge guest and host intercepts - must be called with vcpu in
         * guest-mode to take effect.
         */
-       svm_mark_intercepts_dirty(svm);
+       nested_vmcb02_recalc_intercepts(svm);
 }
 
 static void nested_svm_copy_common_state(struct vmcb *from_vmcb, struct vmcb *to_vmcb)