qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v7 13/42] target/arm: Define arm_cpu_do_unaligned_access for


From: Richard Henderson
Subject: Re: [PATCH v7 13/42] target/arm: Define arm_cpu_do_unaligned_access for user-only
Date: Thu, 18 Jun 2020 10:03:56 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 6/18/20 6:31 AM, Peter Maydell wrote:
> On Wed, 3 Jun 2020 at 02:13, Richard Henderson
> <richard.henderson@linaro.org> wrote:
>>
>> We need this to raise unaligned exceptions from user mode.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>> v6: Use EXCP_UNALIGNED for user-only and update cpu_loop.c.
> 
> Could you update the comment in cpu.h, maybe something like:
> #define EXCP_UNALIGNED      22   /* v7M UNALIGNED UsageFault; also linux-user 
> */
> 
> and also update the string printed by arm_log_exception():
> #ifdef CONFIG_USER_ONLY
>             [EXCP_UNALIGNED] = "linux-user unaligned access fault",
> #else
>             [EXCP_UNALIGNED] = "v7M UNALIGNED UsageFault",
> #endif
> 
> Otherwise
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

First, this could definitely be delayed to the follow-on linux-user patch set.

Second, in the linux-user patch set, I decode the syndrome data to determine
what kind of segv to deliver for MTE synchronous faults.  It would be easy to
extend that just a little to notice the usual syndrome for unaligned accesses.
 Which may be less confusing than abusing the v7m exception code?


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]