[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-arm] [PATCH 02/15] target/arm: Don't trap WFI/WFE
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [Qemu-arm] [PATCH 02/15] target/arm: Don't trap WFI/WFE for M profile |
Date: |
Thu, 3 Aug 2017 13:46:56 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/03/2017 01:40 PM, Edgar E. Iglesias wrote:
> I don't have the spec at hand but IIRC the trap should only happen
> if the processor would have entered the low-power state (i.e if
> there's no work).
when SystemHintOp_WFE
if IsEventRegisterSet() then
ClearEventRegister();
else
if PSTATE.EL == EL0 then
AArch64.CheckForWFxTrap(EL1, TRUE);
if HaveEL(EL2) && !IsSecure()
&& PSTATE.EL IN {EL0, EL1} && !IsInHost() then
AArch64.CheckForWFxTrap(EL2, TRUE);
if HaveEL(EL3) && PSTATE.EL != EL3 then
AArch64.CheckForWFxTrap(EL3, TRUE);
WaitForEvent();
Ah, I see what you mean, since WaitForEvent is also
described as checking EventRegister.
Thanks.
r~