diff options
author | Bin Meng <bmeng@tinylab.org> | 2022-12-05 14:53:03 +0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-01-06 10:42:55 +1000 |
commit | 4c48aad122b9dd4d96184828d7172cc62dae01c5 (patch) | |
tree | 212161ecc4fff5e54baf6564ad5552e51d921c19 /qemu-keymap.c | |
parent | bb22d391121fc0de42a04d1ed99f602441ea70e1 (diff) | |
download | qemu-4c48aad122b9dd4d96184828d7172cc62dae01c5.zip qemu-4c48aad122b9dd4d96184828d7172cc62dae01c5.tar.gz qemu-4c48aad122b9dd4d96184828d7172cc62dae01c5.tar.bz2 |
target/riscv: Fix mret exception cause when no pmp rule is configured
The priv spec v1.12 says:
If no PMP entry matches an M-mode access, the access succeeds. If
no PMP entry matches an S-mode or U-mode access, but at least one
PMP entry is implemented, the access fails. Failed accesses generate
an instruction, load, or store access-fault exception.
At present the exception cause is set to 'illegal instruction' but
should have been 'instruction access fault'.
Fixes: d102f19a2085 ("target/riscv/pmp: Raise exception if no PMP entry is configured")
Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20221205065303.204095-1-bmeng@tinylab.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'qemu-keymap.c')
0 files changed, 0 insertions, 0 deletions