On Sun, Jun 08, 2008 at 10:17:15AM +0300, Avi Kivity wrote:
>> Index: kvm/arch/x86/kvm/i8254.c
>> ===================================================================
>> --- kvm.orig/arch/x86/kvm/i8254.c
>> +++ kvm/arch/x86/kvm/i8254.c
>> @@ -200,9 +200,12 @@ static int __pit_timer_fn(struct kvm_kpi
>>      atomic_inc(&pt->pending);
>>      smp_mb__after_atomic_inc();
>> -    if (vcpu0 && waitqueue_active(&vcpu0->wq)) {
>> -            vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
>> -            wake_up_interruptible(&vcpu0->wq);
>> +    if (vcpu0) {
>> +            set_bit(KVM_REQ_PENDING_TIMER, &vcpu0->requests);
>> +            if (waitqueue_active(&vcpu0->wq)) {
>> +                    vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
>> +                    wake_up_interruptible(&vcpu0->wq);
>> +            }
>>      }
>>    
>
> We probably ought to wakeup only if pt->pending was zero, no?

Yep, same for LAPIC. 
--
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

Reply via email to