[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH-4.5 0/4] remove maintenance interrupts



On Fri, 7 Feb 2014, Julien Grall wrote:
> On 07/02/14 18:56, Stefano Stabellini wrote:
> > Hi all,
> 
> Hi Stefano,
> 
> > this patch series removes any needs for maintenance interrupts for both
> > hardware and software interrupts in Xen.
> > It achieves the goal by using the GICH_LR_HW bit for hardware interrupts
> > and by checking the status of the GICH_LR registers on return to guest,
> > clearing the registers that are invalid and handling the lifecycle of
> > the corresponding interrupts in Xen data structures.
> 
> After reading your patch series I see a possible race condition with the timer
> interrupt.
> 
> As you know, Xen can re-inject the timer interrupt before the previous one is
> EOIed. As it's the timer, the IRQ is injected on the current running VCPU.
> 
> vgic_vcpu_inject_irq(timer)
>   -> IRQ already visible to the guest -> set PENDING
> return to guest context
> <--------------------- Guest EOI the IRQ
> .... few milleseconds
> going to hyp mode
>   -> doing stuff
>   -> reinject the timer IRQ
> 
> If I'm not mistaken, with your solution, the next IRQ can be delayed for few
> milliseconds. That could be fixed by updating the Lrs.

You are right, this race exists. I'll work on a fix for the next
iteration of the series.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.