On Thu, Apr 23, 2015 at 9:30 AM, Peter Maydell <peter.mayd...@linaro.org>
wrote:

> On 23 April 2015 at 15:26, Greg Bellows <greg.bell...@linaro.org> wrote:
> > Good catch Edgar, we shouldn't trap if we are "going into a low-power
> > state".
>
> You mean "if we are not going into a low-power state".
>

​Yes, sorry.
​


>
> > It sounds like we arrived at the following:
> >
> > wfi-  check has_work before taking either the UDEF or HLT exception
> hereby
> > making it a noop.
>
> This is OK (as per the code sketch in my earlier message).
>
> > wfe - Never trap, making it always a noop.  This includes undoing the
> > existing YIELD exception.
>
> No, the YIELD behaviour is correct for WFE. This is important
> to avoid us spinning for the rest of this vcpu's timeslice
> (never making progress because the other vcpu which could
> unblock us from this spinlock doesn't run). But we don't ever
> want to trap to EL2.
>

​Ok it sounds like the primary concern is the performance impact of
constantly trapping wfe to EL2 (in which case HCR must be set to cause
this).  Should we still honor EL3 and EL1 trapping ofr wfe?  In other words
check if they are the target and allow it if !has_work?



>
> -- PMM
>

Reply via email to