[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH 06/20] target/arm: Check for xPSR mis
From: |
Richard Henderson |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH 06/20] target/arm: Check for xPSR mismatch usage faults earlier for v8M |
Date: |
Thu, 5 Oct 2017 12:25:56 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/22/2017 10:59 AM, Peter Maydell wrote:
> ARM v8M specifies that the INVPC usage fault for mismatched
> xPSR exception field and handler mode bit should be checked
> before updating the PSR and SP, so that the fault is taken
> with the existing stack frame rather than by pushing a new one.
> Perform this check in the right place for v8M.
>
> Since v7M specifies in its pseudocode that this usage fault
> check should happen later, we have to retain the original
> code for that check rather than being able to merge the two.
> (The distinction is architecturally visible but only in
> very obscure corner cases like attempting an invalid exception
> return with an exception frame in read only memory.)
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> target/arm/helper.c | 30 +++++++++++++++++++++++++++---
> 1 file changed, 27 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <address@hidden>
r~
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-arm] [Qemu-devel] [PATCH 06/20] target/arm: Check for xPSR mismatch usage faults earlier for v8M,
Richard Henderson <=