summaryrefslogtreecommitdiff
path: root/virt/kvm/kvm_main.c
diff options
context:
space:
mode:
authorMichael Mueller <mimu@linux.vnet.ibm.com>2014-02-26 16:14:18 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-26 17:32:05 +0100
commit98f4a14676127397c54cab7d6119537ed4d113a2 (patch)
tree3944ab31f91fc469efb60626ad242d69490c725a /virt/kvm/kvm_main.c
parentf87618e870d03ac114dd5496b23f6f628af54152 (diff)
downloadlinux-exynos-98f4a14676127397c54cab7d6119537ed4d113a2.tar.gz
linux-exynos-98f4a14676127397c54cab7d6119537ed4d113a2.tar.bz2
linux-exynos-98f4a14676127397c54cab7d6119537ed4d113a2.zip
KVM: add kvm_arch_vcpu_runnable() test to kvm_vcpu_on_spin() loop
Use the arch specific function kvm_arch_vcpu_runnable() to add a further criterium to identify a suitable vcpu to yield to during undirected yield processing. Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r--virt/kvm/kvm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f5668a431d54..5fd4cf8e8888 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1801,7 +1801,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
continue;
if (vcpu == me)
continue;
- if (waitqueue_active(&vcpu->wq))
+ if (waitqueue_active(&vcpu->wq) && !kvm_arch_vcpu_runnable(vcpu))
continue;
if (!kvm_vcpu_eligible_for_directed_yield(vcpu))
continue;