Message ID | 20230324123809.107714-5-liweiwei@iscas.ac.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | target/riscv: Simplification for RVH related check and code style fix | expand |
On 3/24/23 05:38, Weiwei Li wrote: > In current implementation, riscv_cpu_set_virt_enabled is only called when > RVH is enabled. > > Signed-off-by: Weiwei Li<liweiwei@iscas.ac.cn> > Signed-off-by: Junqiang Wang<wangjunqiang@iscas.ac.cn> > --- > target/riscv/cpu_helper.c | 4 ---- > 1 file changed, 4 deletions(-) Perhaps assert, or assert under CONFIG_DEBUG. Otherwise the function deserves a comment about the interface. With that, Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 62fd2c90f1..3862e7b677 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -565,10 +565,6 @@ bool riscv_cpu_virt_enabled(CPURISCVState *env) void riscv_cpu_set_virt_enabled(CPURISCVState *env, bool enable) { - if (!riscv_has_ext(env, RVH)) { - return; - } - /* Flush the TLB on all virt mode changes. */ if (get_field(env->virt, VIRT_ONOFF) != enable) { tlb_flush(env_cpu(env));