mirror of https://gitee.com/openkylin/qemu.git
target/riscv: Disable guest FP support based on virtual status
When the Hypervisor extension is in use we only enable floating point support when both status and vsstatus have enabled floating point support. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
parent
e28eaed879
commit
29409c1d92
|
@ -99,6 +99,9 @@ bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
|||
bool riscv_cpu_fp_enabled(CPURISCVState *env)
|
||||
{
|
||||
if (env->mstatus & MSTATUS_FS) {
|
||||
if (riscv_cpu_virt_enabled(env) && !(env->mstatus_hs & MSTATUS_FS)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue