Re: [PATCH] target/riscv: Check PMP rules num before propagation

2021-11-19 Thread Alistair Francis
On Wed, Nov 17, 2021 at 10:42 AM LIU Zhiwei wrote: > > 0 > > On 2021/11/17 上午8:03, Alistair Francis wrote: > > On Wed, Nov 17, 2021 at 1:12 AM LIU Zhiwei wrote: > >> If PMP rules number is zero, it should not influence the TLB entry for > >> M-mode program. > > This doesn't sound right. From what

Re: [PATCH] target/riscv: Check PMP rules num before propagation

2021-11-16 Thread LIU Zhiwei
0 On 2021/11/17 上午8:03, Alistair Francis wrote: On Wed, Nov 17, 2021 at 1:12 AM LIU Zhiwei wrote: If PMP rules number is zero, it should not influence the TLB entry for M-mode program. This doesn't sound right. From what I can tell if we have no rules pmp_is_range_in_tlb() shouldn't have an e

Re: [PATCH] target/riscv: Check PMP rules num before propagation

2021-11-16 Thread Alistair Francis
On Wed, Nov 17, 2021 at 1:12 AM LIU Zhiwei wrote: > > If PMP rules number is zero, it should not influence the TLB entry for > M-mode program. This doesn't sound right. From what I can tell if we have no rules pmp_is_range_in_tlb() shouldn't have an effect on the tlb_size. What error are you seei

[PATCH] target/riscv: Check PMP rules num before propagation

2021-11-16 Thread LIU Zhiwei
If PMP rules number is zero, it should not influence the TLB entry for M-mode program. Signed-off-by: LIU Zhiwei --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 9eeed38c7e..48da872d39 10