qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 04/27] target/arm: Add PAuth helpers
Date: Fri, 4 Jan 2019 16:25:12 +0000

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?

It might be cleaner to have a raise_exception_ra() anyway,
to preserve the "all exception throwing goes through here" rule.

> +}

thanks
-- PMM



reply via email to

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