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

Re: [Xen-devel] [PATCH v10] xen/arm: trap guest WFI



On Wed, 2013-05-01 at 11:32 +0100, Stefano Stabellini wrote:
> Trap guest WFI, block the guest VCPU unless it has pending interrupts
> (WFI should return if any interrupts arrive even if interrupts are
> disabled).
> 
> Awake the guest vcpu when a new interrupt for it arrives.
> 
> Introduce gic_events_need_delivery: it checks whether the current vcpu
> has any interrupts that need to be delivered either on the lrs or in
> lr_pending.
> 
> Properly implement local_events_need_delivery: check if the guest
> disabled interrupts, if they aren't disabled, return positive if
> gic_events_need_delivery returns positive. Otherwise we still need to
> check whether evtchn_upcall_pending is set but no
> VGIC_IRQ_EVTCHN_CALLBACK irqs are in flight: it could be the race
> described by commit db453468d92369e7182663fb13e14d83ec4ce456 "arm: vgic:
> fix race between evtchn upcall and evtchnop_send". If that is the case
> it means that an event needs to be injected.
> If all these tests are negative then no events need to be delivered.
> 
> Implement local_event_delivery_enable by clearing PSR_IRQ_MASK.
> 
> 
> Changes on v10:
> - improve comment in code.
> 
> Changes in v9:
> - rename _local_events_need_delivery to
> local_events_need_delivery_nomask;
> - remove evtchn_upcall_mask checks and comments.
> 
> Changes in v8:
> - remove the mask check from _local_events_need_delivery, add an
> unconditional mask check in local_events_need_delivery.
> 
> Changes in v7:
> - clear PSR_IRQ_MASK in the implementation of
> local_event_delivery_enable.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

Acked + applied.



_______________________________________________
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®.