KVM: handle last_boosted_vcpu = 0 case
authorRik van Riel <riel@redhat.com>
Tue, 19 Jun 2012 20:51:04 +0000 (16:51 -0400)
committerMarcelo Tosatti <mtosatti@redhat.com>
Fri, 6 Jul 2012 17:11:18 +0000 (14:11 -0300)
commit5cfc2aabcb282f4554e7086c9893b386ad6ba9d4
tree81b9989c069f54e42a748c8af6a2989bdbe6a8b9
parent21b26c08535c992802402c7ba2d789ca9e1a5707
KVM: handle last_boosted_vcpu = 0 case

If last_boosted_vcpu == 0, then we fall through all test cases and
may end up with all VCPUs pouncing on vcpu 0.  With a large enough
guest, this can result in enormous runqueue lock contention, which
can prevent vcpu0 from running, leading to a livelock.

Changing < to <= makes sure we properly handle that case.

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c