From: Sean Christopherson Date: Wed, 18 Feb 2026 23:09:54 +0000 (-0800) Subject: KVM: nSVM: Directly (re)calc vmcb02 intercepts from nested_vmcb02_prepare_control() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a80c4bc1f10645fe3fc51d4c116f69096340683;p=thirdparty%2Flinux.git KVM: nSVM: Directly (re)calc vmcb02 intercepts from nested_vmcb02_prepare_control() 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 Link: https://patch.msgid.link/20260218230958.2877682-5-seanjc@google.com Signed-off-by: Sean Christopherson --- diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index 75e7deef51a52..5ee77a5130d36 100644 --- a/arch/x86/kvm/svm/nested.c +++ b/arch/x86/kvm/svm/nested.c @@ -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)