Skip to content

Commit

Permalink
KVM: add kvm_arch_vcpu_runnable() test to kvm_vcpu_on_spin() loop
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Christian Borntraeger <[email protected]>
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
mimu001 authored and bonzini committed Feb 26, 2014
1 parent f87618e commit 98f4a14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98f4a14

Please sign in to comment.