On 11/9/20 6:10 AM, remi.denis.courm...@huawei.com wrote:
> @@ -3444,6 +3444,9 @@ static uint64_t do_ats_write(CPUARMState *env, uint64_t 
> value,
>                  target_el = 3;
>              } else {
>                  env->cp15.hpfar_el2 = extract64(fi.s2addr, 12, 47) << 4;
> +                if (fi.s1ns) {
> +                    env->cp15.hpfar_el2 |= HPFAR_NS;
> +                }

This should only be set for SEL2, not non-secure EL2.

> +        if (arm_is_secure_below_el3(env) && fi->s1ns) {
> +            env->cp15.hpfar_el2 |= HPFAR_NS;
> +        }

... like you did here.


r~

Reply via email to