Re: [PATCH 1/2] target/riscv: prioritize pmp errors in raise_mmu_exception()

2024-05-13 Thread Alistair Francis
On Sat, Apr 13, 2024 at 9:00 PM Alexei Filippov wrote: > > From: Daniel Henrique Barboza > > raise_mmu_exception(), as is today, is prioritizing guest page faults by > checking first if virt_enabled && !first_stage, and then considering the > regular inst/load/store faults. > > There's no

Re: [PATCH 1/2] target/riscv: prioritize pmp errors in raise_mmu_exception()

2024-04-15 Thread Joseph Chan
Digging more in Priv-v1.12/riscv-privileged-20211203.pdf : Page 82, Section 4.3.2 Virtual Address Translation Process. The spec actually mentions an address translation algorithm. Step 2

Re: [PATCH 1/2] target/riscv: prioritize pmp errors in raise_mmu_exception()

2024-04-15 Thread Joseph Chan
FYI Priv-v1.12/riscv-privileged-20211203.pdf defines exception priorities on Page 40, Table 3.7 Page 130, Table 8.7 There is a sentence under Table 3.7: "When a virtual address is translated

[PATCH 1/2] target/riscv: prioritize pmp errors in raise_mmu_exception()

2024-04-13 Thread Alexei Filippov
From: Daniel Henrique Barboza raise_mmu_exception(), as is today, is prioritizing guest page faults by checking first if virt_enabled && !first_stage, and then considering the regular inst/load/store faults. There's no mention in the spec about guest page fault being a higher priority that PMP