]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: nSVM: Use vmcb12_is_intercept() in nested_sync_control_from_vmcb02()
authorYosry Ahmed <yosry.ahmed@linux.dev>
Wed, 18 Feb 2026 23:09:56 +0000 (15:09 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 5 Mar 2026 00:09:01 +0000 (16:09 -0800)
Use vmcb12_is_intercept() instead of open-coding the intercept check.

No functional change intended.

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

index 46804b54200d23016ef4c044e1c19ff1ee896e6b..c965d10f31875d7842890441d77b428232f442e2 100644 (file)
@@ -570,7 +570,7 @@ void nested_sync_control_from_vmcb02(struct vcpu_svm *svm)
         * int_ctl (because it was never recognized while L2 was running).
         */
        if (svm_is_intercept(svm, INTERCEPT_VINTR) &&
-           !test_bit(INTERCEPT_VINTR, (unsigned long *)svm->nested.ctl.intercepts))
+           !vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_VINTR))
                mask &= ~V_IRQ_MASK;
 
        if (nested_vgif_enabled(svm))