mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-02-02 05:20:59 +00:00
target/riscv: Only flush TLB if SATP.ASID changes
There is an analogous change for ARM here: https://patchwork.kernel.org/patch/10649857 Backports commit 1e0d985fa9136a563168a3da66f3d17820404ee2 from qemu
This commit is contained in:
parent
7922aa54c0
commit
1d6acaa604
|
@ -734,7 +734,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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue