Re: [PATCH] kvm: x86: correctly reset dest_map->vector when restoring LAPIC state

From: Joerg Roedel
Date: Mon Sep 19 2016 - 09:16:21 EST


On Wed, Sep 14, 2016 at 11:48:32PM +0200, Paolo Bonzini wrote:
> When userspace sends KVM_SET_LAPIC, KVM schedules a check between
> the vCPU's IRR and ISR and the IOAPIC redirection table, in order
> to re-establish the IOAPIC's dest_map (the list of CPUs servicing
> the real-time clock interrupt with the corresponding vectors).
>
> However, __rtc_irq_eoi_tracking_restore_one was forgetting to
> set dest_map->vectors. Because of this, the IOAPIC did not process
> the real-time clock interrupt EOI, ioapic->rtc_status.pending_eoi
> got stuck at a non-zero value, and further RTC interrupts were
> reported to userspace as coalesced.
>
> Fixes: 9e4aabe2bb3454c83dac8139cf9974503ee044db
> Fixes: 4d99ba898dd0c521ca6cdfdde55c9b58aea3cb3d
> Cc: Joerg Roedel <jroedel@xxxxxxx>
> Cc: David Gilbert <dgilbert@xxxxxxxxxx>
> Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>

Good catch, thanks for fixing this.