> > -if ((env->priv == PRV_S &&
> > -get_field(env->mstatus, MSTATUS_TW)) ||
> > -riscv_cpu_virt_enabled(env)) {
> > +if ((!riscv_cpu_virt_enabled(env) && env->priv == PRV_U) ||
>
> > +(env->priv == PRV_S && get_field(env->mstatus, MSTATUS_TW))) {
>
> Shouldn't we ch
On Sun, Apr 11, 2021 at 5:41 AM Jose Martins wrote:
>
> The wfi exception trigger behavior was not taking into account the fact
> that user mode is not allowed to execute wfi instructions or the effect
> of the hstatus.vtw bit. It was also always generating virtual instruction
> exceptions when th
The wfi exception trigger behavior was not taking into account the fact
that user mode is not allowed to execute wfi instructions or the effect
of the hstatus.vtw bit. It was also always generating virtual instruction
exceptions when this should only happen when the wfi instruction is
executed when