Re: [Qemu-devel] [PATCH 02/15] target/arm: Don't trap WFI/WFE for M profile

2017-08-03 Thread Peter Maydell
On 3 August 2017 at 21:28, Richard Henderson wrote: > While looking at this, I think there's an error in helper_wfi. The early exit > for cpu_has_work should happen after the exception check. No, that's deliberate; as Edgar says, the trap only happens "if the instruction would otherwise have cau

Re: [Qemu-devel] [PATCH 02/15] target/arm: Don't trap WFI/WFE for M profile

2017-08-03 Thread Richard Henderson
On 08/02/2017 09:43 AM, Peter Maydell wrote: > M profile cores can never trap on WFI or WFE instructions. Check for > M profile in check_wfx_trap() to ensure this. > > The existing code will do the right thing for v7M cores because > the hcr_el2 and scr_el3 registers will be all-zeroes and so we >

Re: [Qemu-devel] [PATCH 02/15] target/arm: Don't trap WFI/WFE for M profile

2017-08-02 Thread Edgar E. Iglesias
On Wed, Aug 02, 2017 at 05:43:48PM +0100, Peter Maydell wrote: > M profile cores can never trap on WFI or WFE instructions. Check for > M profile in check_wfx_trap() to ensure this. > > The existing code will do the right thing for v7M cores because > the hcr_el2 and scr_el3 registers will be all-

[Qemu-devel] [PATCH 02/15] target/arm: Don't trap WFI/WFE for M profile

2017-08-02 Thread Peter Maydell
M profile cores can never trap on WFI or WFE instructions. Check for M profile in check_wfx_trap() to ensure this. The existing code will do the right thing for v7M cores because the hcr_el2 and scr_el3 registers will be all-zeroes and so we won't attempt to trap, but when we start setting ARM_FEA