mirror of
https://github.com/qemu/qemu.git
synced 2024-12-03 16:53:53 +08:00
48eaeb56de
The stval and mtval registers can optionally contain the faulting instruction on an illegal instruction exception. This patch adds support for setting the stval and mtval registers. The RISC-V spec states that "The stval register can optionally also be used to return the faulting instruction bits on an illegal instruction exception...". In this case we are always writing the value on an illegal instruction. This doesn't match all CPUs (some CPUs won't write the data), but in QEMU let's just populate the value on illegal instructions. This won't break any guest software, but will provide more information to guests. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Message-id: 20211220064916.107241-4-alistair.francis@opensource.wdc.com |
||
---|---|---|
.. | ||
insn_trans | ||
arch_dump.c | ||
bitmanip_helper.c | ||
cpu_bits.h | ||
cpu_helper.c | ||
cpu_user.h | ||
cpu-param.h | ||
cpu.c | ||
cpu.h | ||
csr.c | ||
fpu_helper.c | ||
gdbstub.c | ||
helper.h | ||
insn16.decode | ||
insn32.decode | ||
instmap.h | ||
internals.h | ||
Kconfig | ||
m128_helper.c | ||
machine.c | ||
meson.build | ||
monitor.c | ||
op_helper.c | ||
pmp.c | ||
pmp.h | ||
trace-events | ||
trace.h | ||
translate.c | ||
vector_helper.c |