[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 04/27] target/arm: Add PAuth helpers
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 04/27] target/arm: Add PAuth helpers |
Date: |
Tue, 8 Jan 2019 12:32:48 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 1/5/19 2:25 AM, Peter Maydell wrote:
> On Fri, 14 Dec 2018 at 05:24, Richard Henderson
> <address@hidden> wrote:
>>
>> The cryptographic internals are stubbed out for now,
>> but the enable and trap bits are checked.
>>
>> Signed-off-by: Richard Henderson <address@hidden>
>> ----
>
>> +static void QEMU_NORETURN pauth_trap(CPUARMState *env, int target_el,
>> + uintptr_t ra)
>> +{
>> + CPUState *cs = ENV_GET_CPU(env);
>> +
>> + cs->exception_index = EXCP_UDEF;
>> + env->exception.syndrome = syn_pactrap();
>> + env->exception.target_el = target_el;
>> + cpu_loop_exit_restore(cs, ra);
>
> This should use raise_exception(), or some variant on it that
> lets you pass in the ra, because otherwise you lose the
> "redirect EL1 exceptions to EL2" HCR.TGE behaviour.
> Or can we only ever call this for a target_el of 2 or 3?
This particular usage can only ever target EL 2 or 3,
in response to {SCR,HCR}.API being clear. AFAICS that
trap is properly directed already.
But, yes, raise_exception_ra would be useful.
r~