diff options
author | Weiwei Li <liweiwei@iscas.ac.cn> | 2023-03-27 16:08:49 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-05-05 10:49:50 +1000 |
commit | 2136b6c30c0f0a4653163dd2f72a01a96ad778d2 (patch) | |
tree | 60022be1c548673bd7564b9c82d9dcdc53e32b3a /target | |
parent | df3ac6da476e346a17bad5bc843de1135a269229 (diff) | |
download | qemu-2136b6c30c0f0a4653163dd2f72a01a96ad778d2.zip qemu-2136b6c30c0f0a4653163dd2f72a01a96ad778d2.tar.gz qemu-2136b6c30c0f0a4653163dd2f72a01a96ad778d2.tar.bz2 |
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>
Diffstat (limited to 'target')
-rw-r--r-- | target/riscv/cpu_helper.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 824f0cb..e140d6a 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -1706,9 +1706,7 @@ void riscv_cpu_do_interrupt(CPUState *cs) riscv_cpu_swap_hypervisor_regs(env); env->hstatus = set_field(env->hstatus, HSTATUS_SPVP, env->priv); - env->hstatus = set_field(env->hstatus, HSTATUS_SPV, - riscv_cpu_virt_enabled(env)); - + env->hstatus = set_field(env->hstatus, HSTATUS_SPV, true); htval = env->guest_phys_fault_addr; |