aboutsummaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2014-01-09 19:43:16 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-01-15 06:03:23 -0500
commit4a55dd7273c95b4a19fbcf0ae1bbd1cfd09dfc36 (patch)
tree09dadcf8fe69df1b1148698dea0b5e772e8d1019 /virt/kvm
parente81d1ad32753cdeaef56b9bffe3b8ab7b5c776e5 (diff)
kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub
Commit 7940876e1330671708186ac3386aa521ffb5c182 ("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: Scott 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: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/kvm_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b28579e84248..9ed9c8c7b874 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1735,7 +1735,6 @@ bool kvm_vcpu_yield_to(struct kvm_vcpu *target)
1735} 1735}
1736EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to); 1736EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to);
1737 1737
1738#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
1739/* 1738/*
1740 * Helper that checks whether a VCPU is eligible for directed yield. 1739 * Helper that checks whether a VCPU is eligible for directed yield.
1741 * Most eligible candidate to yield is decided by following heuristics: 1740 * Most eligible candidate to yield is decided by following heuristics:
@@ -1760,6 +1759,7 @@ EXPORT_SYMBOL_GPL(kvm_vcpu_yield_to);
1760 */ 1759 */
1761static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu) 1760static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
1762{ 1761{
1762#ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT
1763 bool eligible; 1763 bool eligible;
1764 1764
1765 eligible = !vcpu->spin_loop.in_spin_loop || 1765 eligible = !vcpu->spin_loop.in_spin_loop ||
@@ -1770,8 +1770,10 @@ static bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
1770 kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible); 1770 kvm_vcpu_set_dy_eligible(vcpu, !vcpu->spin_loop.dy_eligible);
1771 1771
1772 return eligible; 1772 return eligible;
1773} 1773#else
1774 return true;
1774#endif 1775#endif
1776}
1775 1777
1776void kvm_vcpu_on_spin(struct kvm_vcpu *me) 1778void kvm_vcpu_on_spin(struct kvm_vcpu *me)
1777{ 1779{