mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-22 14:45:35 +00:00
target/riscv: flush TLB pages if PMP permission has been changed
If PMP permission of any address has been changed by updating PMP entry, flush all TLB pages to prevent from getting old permission. Backports 2c2e0f2842520bcd25472285cfce39696e52e662
This commit is contained in:
parent
7dad65cea1
commit
85ccd1a71e
|
@ -28,6 +28,7 @@
|
|||
#include "qapi/error.h"
|
||||
#include "cpu.h"
|
||||
#include "qemu-common.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
|
||||
|
@ -350,6 +351,9 @@ void pmpcfg_csr_write(CPURISCVState *env, uint32_t reg_index,
|
|||
cfg_val = (val >> 8 * i) & 0xff;
|
||||
pmp_write_cfg(env, (reg_index * 4) + i, cfg_val);
|
||||
}
|
||||
|
||||
/* If PMP permission of any addr has been changed, flush TLB pages. */
|
||||
tlb_flush(env_cpu(env));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue