Closed wxjstz closed 5 years ago
I'm closing this as we have updated the interface to take the request size and the TLB size (inout) which is updated if the matching rule is smaller than the initial TLB size (PAGE_SIZE). Check qemu-for-upstream. It includes our co-authored work including your fixes and mine.
I try to test PMP by qemu/riscv-probe. But I found this issues.
Function riscv_cpu_handle_mmu_fault in
target/riscv/cpu_helper.c
.PMP granularity can be less than one page, so in my test it cause error. I change TARGET_PAGE_SIZE to real size. It passed.
I try to monitor all PMP check (dump info in function pmp_hart_has_privs). I found that only a few fetch will perform a PMP check.