target/riscv: Set VS bits in mideleg for Hyp extension
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
66e594f280
commit
713d8363de
@ -448,6 +448,9 @@ static int read_mideleg(CPURISCVState *env, int csrno, target_ulong *val)
|
|||||||
static int write_mideleg(CPURISCVState *env, int csrno, target_ulong val)
|
static int write_mideleg(CPURISCVState *env, int csrno, target_ulong val)
|
||||||
{
|
{
|
||||||
env->mideleg = (env->mideleg & ~delegable_ints) | (val & delegable_ints);
|
env->mideleg = (env->mideleg & ~delegable_ints) | (val & delegable_ints);
|
||||||
|
if (riscv_has_ext(env, RVH)) {
|
||||||
|
env->mideleg |= VS_MODE_INTERRUPTS;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user