mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-02 06:32:54 -10:00
target/riscv: Only flush TLB if SATP.ASID changes
There is an analogous change for ARM here: https://patchwork.kernel.org/patch/10649857 Signed-off-by: Jonathan Behrens <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
This commit is contained in:
1 parent
087b051a51
commit
1e0d985fa9
1 file changed
+3
-1
+3
-1
@@ -723,7 +723,9 @@ static int write_satp(CPURISCVState *env, int csrno, target_ulong val)
|
||||
if (env->priv == PRV_S && get_field(env->mstatus, MSTATUS_TVM)) {
|
||||
return -1;
|
||||
} else {
|
||||
tlb_flush(CPU(riscv_env_get_cpu(env)));
|
||||
if((val ^ env->satp) & SATP_ASID) {
|
||||
tlb_flush(CPU(riscv_env_get_cpu(env)));
|
||||
}
|
||||
env->satp = val;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user