On 30.09.2020 13:49, Paul Durrant wrote: >> From: Xen-devel <xen-devel-boun...@lists.xenproject.org> On Behalf Of Roger >> Pau Monne >> Sent: 30 September 2020 11:41 >> >> @@ -159,8 +184,12 @@ void vlapic_set_irq(struct vlapic *vlapic, uint8_t vec, >> uint8_t trig) >> else >> vlapic_clear_vector(vec, &vlapic->regs->data[APIC_TMR]); >> >> + if ( callback ) >> + vlapic_set_callback(vlapic, vec, callback, data); >> + > > Can this not happen several times before an EOI? I.e. the vector could > already be set in IRR, right?
Yes, but I take it the assumption is that it'll always be the same callback that ought to get set here. Hence the warning printk() in that function in case it isn't. What I wonder while looking at this function is whether the TMR handling is correct. The SDM says "Upon acceptance of an interrupt into the IRR, ..." which I read as "when the IRR bit transitions from 0 to 1" (but I can see room for reading this differently). Jan