target/riscv: Remove redundant call to riscv_cpu_virt_enabled

The assignment is done under the condition riscv_cpu_virt_enabled()=true.

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230327080858.39703-2-liweiwei@iscas.ac.cn>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Weiwei Li 2023-03-27 16:08:49 +08:00 committed by Alistair Francis
parent df3ac6da47
commit 2136b6c30c

View File

@ -1706,9 +1706,7 @@ void riscv_cpu_do_interrupt(CPUState *cs)
riscv_cpu_swap_hypervisor_regs(env); riscv_cpu_swap_hypervisor_regs(env);
env->hstatus = set_field(env->hstatus, HSTATUS_SPVP, env->hstatus = set_field(env->hstatus, HSTATUS_SPVP,
env->priv); env->priv);
env->hstatus = set_field(env->hstatus, HSTATUS_SPV, env->hstatus = set_field(env->hstatus, HSTATUS_SPV, true);
riscv_cpu_virt_enabled(env));
htval = env->guest_phys_fault_addr; htval = env->guest_phys_fault_addr;