KVM: LAPIC: make sure IRR bitmap is scanned after vm load
authorMarcelo Tosatti <mtosatti@redhat.com>
Mon, 14 Dec 2009 19:37:35 +0000 (17:37 -0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jan 2010 23:04:01 +0000 (15:04 -0800)
commit 6e24a6eff4571002cd48b99a2b92dc829ce39cb9 upstream.

The vcpus are initialized with irr_pending set to false, but
loading the LAPIC registers with pending IRR fails to reset
the irr_pending variable.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/lapic.c

index 23c217692ea9ac958295a1c1a64190a45bf07f92..41659fb080ba7d213bab5c05271398ac25246af0 100644 (file)
@@ -1156,6 +1156,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu)
        hrtimer_cancel(&apic->lapic_timer.timer);
        update_divide_count(apic);
        start_apic_timer(apic);
+       apic->irr_pending = true;
 }
 
 void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu)