mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
target/riscv: remove RISCV_FEATURE_MMU
RISCV_FEATURE_MMU is set whether cpu->cfg.mmu is set, so let's just use the flag directly instead. With this change the enum is also removed. It is worth noticing that this enum, and all the RISCV_FEATURES_* that were contained in it, predates the existence of the cpu->cfg object. Today, using cpu->cfg is an easier way to retrieve all the features and extensions enabled in the hart. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Reviewed-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Message-ID: <20230222185205.355361-10-dbarboza@ventanamicro.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
c95c9d200e
commit
dcf654a3e8
6 changed files with 5 additions and 16 deletions
|
@ -315,7 +315,7 @@ int pmp_hart_has_privs(CPURISCVState *env, target_ulong addr,
|
|||
}
|
||||
|
||||
if (size == 0) {
|
||||
if (riscv_feature(env, RISCV_FEATURE_MMU)) {
|
||||
if (riscv_cpu_cfg(env)->mmu) {
|
||||
/*
|
||||
* If size is unknown (0), assume that all bytes
|
||||
* from addr to the end of the page will be accessed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue