target/riscv: Set VS* bits to one in mideleg when H-Ext is enabled
With H-Ext supported, VS bits are all hardwired to one in MIDELEG denoting always delegated interrupts. This is being done in rmw_mideleg but given mideleg is used in other places when routing interrupts this change initializes it in riscv_cpu_realize to be on the safe side. Signed-off-by: Rajnesh Kanwal <rkanwal@rivosinc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20231016111736.28721-4-rkanwal@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
d17bcae5f7
commit
b901c7eb70
@ -618,7 +618,12 @@ static bool tcg_cpu_realize(CPUState *cs, Error **errp)
|
||||
cpu->pmu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
|
||||
riscv_pmu_timer_cb, cpu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* With H-Ext, VSSIP, VSTIP, VSEIP and SGEIP are hardwired to one. */
|
||||
if (riscv_has_ext(env, RVH)) {
|
||||
env->mideleg = MIP_VSSIP | MIP_VSTIP | MIP_VSEIP | MIP_SGEIP;
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user