On 05/04/2010 07:42 PM, Avi Kivity wrote:
@@ -5470,7 +5473,7 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu)me = get_cpu(); if (cpu != me&& (unsigned)cpu< nr_cpu_ids&& cpu_online(cpu)) - if (!test_and_set_bit(KVM_REQ_KICK,&vcpu->requests)) + if (atomic_xchg(&vcpu->guest_mode, 0)) smp_send_reschedule(cpu); put_cpu();The atomic_xchg() does the trick.
btw, things like this should go into locking.txt. It's definitely tricky. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
