]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: ioapic: try to recover if pending_eoi goes out of range
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 Mar 2014 19:41:51 +0000 (20:41 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Apr 2014 15:17:24 +0000 (17:17 +0200)
commit60ed0f5a32f996ab65025b79a80e63a009daeff1
tree05b431aec59a1d17fbbd9d29c46fd1e51831e260
parent5cf5027134daaeebdb2c26d26fa1db8f7e18b57c
KVM: ioapic: try to recover if pending_eoi goes out of range

The RTC tracking code tracks the cardinality of rtc_status.dest_map
into rtc_status.pending_eoi.  It has some WARN_ONs that trigger if
pending_eoi ever becomes negative; however, these do not do anything
to recover, and it bad things will happen soon after they trigger.

When the next RTC interrupt is triggered, rtc_check_coalesced() will
return false, but ioapic_service will find pending_eoi != 0 and
do a BUG_ON.  To avoid this, should pending_eoi ever be nonzero,
call kvm_rtc_eoi_tracking_restore_all to recompute a correct
dest_map and pending_eoi.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/ioapic.c