lkml.org 
[lkml]   [2014]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/4] KVM: ioapic: reinject pending interrupts on KVM_SET_IRQCHIP
Il 24/03/2014 18:58, Radim Krčmář ha scritto:
>> > + rtc_irq_eoi_tracking_reset(ioapic);
>> > + for_each_set_bit(idx, &irr, IOAPIC_NUM_PINS)
>> > + ioapic_set_irq(ioapic, idx, 1, true);
>> > +
>> > + kvm_rtc_eoi_tracking_restore_all(ioapic);
> (We shouldn't have RTC interrupt with pending EOI in irr, so the
> function could be independent.

If the RTC state gets out of sync you get a BUG_ON, so I preferred to be
safe and first inject the interrupts without any recorded recipient of
GSI 8; and then put everything together based on both LAPIC and IOAPIC
state.

> I'd prefer 'ioapic->irr = 0' here ...)

The point is that "ioapic->irr = 0" is overriding the previous memcpy,
because state->irr is used as argument to kvm_ioapic_inject_all instead.
So I think "iopic->irr = 0" should stay close to the memcpy.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-03-24 20:01    [W:0.124 / U:3.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site