From: Marcelo Tosatti Date: Wed, 11 Jun 2008 22:52:53 +0000 (-0300) Subject: KVM: only abort guest entry if timer count goes from 0->1 X-Git-Tag: v2.6.27-rc1~968^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=622395a9e63bf87a16faecf555ed02375cbae5b7;p=pandora-kernel.git KVM: only abort guest entry if timer count goes from 0->1 Only abort guest entry if the timer count went from 0->1, since for 1->2 or larger the bit will either be set already or a timer irq will have been injected. Using atomic_inc_and_test() for it also introduces an SMP barrier to the LAPIC version (thought it was unecessary because of timer migration, but guest can be scheduled to a different pCPU between exit and kvm_vcpu_block(), so there is the possibility for a race). Noticed by Avi. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity --- Reading git-diff-tree failed