Skip to content

Commit 322d79f

Browse files
committed
KVM: x86: Clean up directed yield API for "has pending interrupt"
Directly return the boolean result of whether or not a vCPU has a pending interrupt instead of effectively doing: if (true) return true; return false; Reviewed-by: Yuan Yao <yuan.yao@intel.com> Link: https://lore.kernel.org/r/20240110003938.490206-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 9b8615c commit 322d79f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

arch/x86/kvm/x86.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13046,11 +13046,8 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
1304613046

1304713047
bool kvm_arch_dy_has_pending_interrupt(struct kvm_vcpu *vcpu)
1304813048
{
13049-
if (kvm_vcpu_apicv_active(vcpu) &&
13050-
static_call(kvm_x86_dy_apicv_has_pending_interrupt)(vcpu))
13051-
return true;
13052-
13053-
return false;
13049+
return kvm_vcpu_apicv_active(vcpu) &&
13050+
static_call(kvm_x86_dy_apicv_has_pending_interrupt)(vcpu);
1305413051
}
1305513052

1305613053
bool kvm_arch_vcpu_preempted_in_kernel(struct kvm_vcpu *vcpu)

0 commit comments

Comments
 (0)