qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 03/16] target/riscv: save and restore elp state on priv tr


From: Deepak Gupta
Subject: Re: [PATCH v4 03/16] target/riscv: save and restore elp state on priv transitions
Date: Thu, 15 Aug 2024 23:45:04 -0700

On Fri, Aug 16, 2024 at 12:59:43PM +1000, Richard Henderson wrote:
On 8/16/24 11:06, Deepak Gupta wrote:
@@ -546,6 +575,15 @@ void riscv_cpu_swap_hypervisor_regs(CPURISCVState *env)
     }
     bool current_virt = env->virt_enabled;
+    /*
+     * If zicfilp extension available and henvcfg.LPE = 1,
+     * then apply SPELP mask on mstatus
+     */
+    if (env_archcpu(env)->cfg.ext_zicfilp &&
+        get_field(env->henvcfg, HENVCFG_LPE)) {
+        mstatus_mask |= SSTATUS_SPELP;
+    }
+

I think this hunk belongs with the previous patch.


I kept it here because this save/restore of vsstatus with effective sstatus 
during
VS/VU <--> HS transition. ELP also needs to get saved/restored during these 
transitions.

Otherwise.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~




reply via email to

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