Re: [PATCH] target/riscv: Fix PMP propagation for tlb

2022-10-23 Thread Alistair Francis
On Wed, Oct 12, 2022 at 4:01 PM LIU Zhiwei wrote: > > Only the pmp index that be checked by pmp_hart_has_privs can be used > by pmp_get_tlb_size to avoid an error pmp index. > > Before modification, we may use an error pmp index. For example, > we check address 0x4fc, and the size 0x4 in pmp_hart_

Re: [PATCH] target/riscv: Fix PMP propagation for tlb

2022-10-23 Thread Alistair Francis
On Wed, Oct 12, 2022 at 4:01 PM LIU Zhiwei wrote: > > Only the pmp index that be checked by pmp_hart_has_privs can be used > by pmp_get_tlb_size to avoid an error pmp index. > > Before modification, we may use an error pmp index. For example, > we check address 0x4fc, and the size 0x4 in pmp_hart_

Re: [PATCH] target/riscv: Fix PMP propagation for tlb

2022-10-20 Thread LIU Zhiwei
ping On 2022/10/12 14:00, LIU Zhiwei wrote: Only the pmp index that be checked by pmp_hart_has_privs can be used by pmp_get_tlb_size to avoid an error pmp index. Before modification, we may use an error pmp index. For example, we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If t

[PATCH] target/riscv: Fix PMP propagation for tlb

2022-10-11 Thread LIU Zhiwei
Only the pmp index that be checked by pmp_hart_has_privs can be used by pmp_get_tlb_size to avoid an error pmp index. Before modification, we may use an error pmp index. For example, we check address 0x4fc, and the size 0x4 in pmp_hart_has_privs. If there is an pmp rule, valid range is [0x4fc, 0x5