From: Alistair Francis <alistair.francis@opensource.wdc.com>
To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: Alistair Francis <alistair.francis@wdc.com>,
palmer@dabbelt.com, alistair23@gmail.com,
Bin Meng <bin.meng@windriver.com>,
bmeng.cn@gmail.com
Subject: [PATCH 0/2] RISC-V: Populate mtval and stval
Date: Fri, 10 Dec 2021 16:26:36 +1000 [thread overview]
Message-ID: <20211210062638.824672-1-alistair.francis@opensource.wdc.com> (raw)
From: Alistair Francis <alistair.francis@wdc.com>
Populate mtval and stval when taking an illegal instruction exception.
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.
*** BLURB HERE ***
Alistair Francis (2):
target/riscv: Set the opcode in DisasContext
target/riscv: Implement the stval/mtval illegal instruction
target/riscv/cpu.h | 2 ++
target/riscv/cpu_helper.c | 25 +++++++++++--------------
target/riscv/translate.c | 5 +++++
3 files changed, 18 insertions(+), 14 deletions(-)
--
2.31.1
next reply other threads:[~2021-12-10 6:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-10 6:26 Alistair Francis [this message]
2021-12-10 6:26 ` [PATCH 1/2] target/riscv: Set the opcode in DisasContext Alistair Francis
2021-12-10 15:28 ` Richard Henderson
2021-12-10 6:26 ` [PATCH 2/2] target/riscv: Implement the stval/mtval illegal instruction Alistair Francis
2021-12-10 15:11 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211210062638.824672-1-alistair.francis@opensource.wdc.com \
--to=alistair.francis@opensource.wdc.com \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).