提交 4a55dd72 编写于 作者: S Scott Wood 提交者: Paolo Bonzini

kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub

Commit 7940876e ("kvm: make local
functions static") broke KVM PPC builds due to removing (rather than
moving) the stub version of kvm_vcpu_eligible_for_directed_yield().

This patch reintroduces it.
Signed-off-by: NScott Wood <scottwood@freescale.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Alexander Graf <agraf@suse.de>
[Move the #ifdef inside the function. - Paolo]
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 e81d1ad3
...@@ -1735,7 +1735,6 @@ bool kvm_vcpu_yield_to(struct kvm_vcpu *target) ...@@ -1735,7 +1735,6 @@ bool kvm_vcpu_yield_to(struct kvm_vcpu *target)
} }
EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to); EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to);
#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
/* /*
* Helper that checks whether a VCPU is eligible for directed yield. * Helper that checks whether a VCPU is eligible for directed yield.
* Most eligible candidate to yield is decided by following heuristics: * Most eligible candidate to yield is decided by following heuristics:
...@@ -1760,6 +1759,7 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to); ...@@ -1760,6 +1759,7 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to);
*/ */
static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu) static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
{ {
#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
bool eligible; bool eligible;
eligible = !vcpu->spin_loop.in_spin_loop || eligible = !vcpu->spin_loop.in_spin_loop ||
...@@ -1770,8 +1770,10 @@ static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu) ...@@ -1770,8 +1770,10 @@ static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible); kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible);
return eligible; return eligible;
} #else
return true;
#endif #endif
}
void kvm_vcpu_on_spin(struct kvm_vcpu *me) void kvm_vcpu_on_spin(struct kvm_vcpu *me)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册