projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b8615c
)
KVM: x86: Clean up directed yield API for "has pending interrupt"
author
Sean Christopherson
<seanjc@google.com>
Wed, 10 Jan 2024 00:39:37 +0000
(16:39 -0800)
committer
Sean Christopherson
<seanjc@google.com>
Fri, 23 Feb 2024 00:27:40 +0000
(16:27 -0800)
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>
arch/x86/kvm/x86.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/x86.c
b/arch/x86/kvm/x86.c
index ab7d2baaae7ad71428ec84e6b31203c7ebda6dc3..e6283628fd53ccb5c49eac3709606bbc9a29a1f9 100644
(file)
--- a/
arch/x86/kvm/x86.c
+++ b/
arch/x86/kvm/x86.c
@@
-13046,11
+13046,8
@@
int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
bool kvm_arch_dy_has_pending_interrupt(struct kvm_vcpu *vcpu)
{
- if (kvm_vcpu_apicv_active(vcpu) &&
- static_call(kvm_x86_dy_apicv_has_pending_interrupt)(vcpu))
- return true;
-
- return false;
+ return kvm_vcpu_apicv_active(vcpu) &&
+ static_call(kvm_x86_dy_apicv_has_pending_interrupt)(vcpu);
}
bool kvm_arch_vcpu_preempted_in_kernel(struct kvm_vcpu *vcpu)