KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Mar 2014 10:39:23 +0000 (11:39 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Mar 2014 14:10:43 +0000 (15:10 +0100)
commit673f7b4257a1fe7b181e1a1182ecc2b6b2b795f1
treeaa47a8e993bcef11b663f3ad1180ee39ac36511f
parent44847dea79751e95665a439f8c63a65e51da8e1f
KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP

After the previous patches, an interrupt whose bit is set in the IRR
register will never be in the LAPIC's IRR and has never been injected
on the migration source.  So inject it on the destination.

This fixes migration of Windows guests without HPET (they use the RTC
to trigger the scheduler tick, and lose it after migration).

Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/ioapic.c