qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anup Patel <anup.patel@wdc.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <Alistair.Francis@wdc.com>,
	Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Atish Patra <atish.patra@wdc.com>,
	Anup Patel <anup.patel@wdc.com>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
	Anup Patel <anup@brainfault.org>
Subject: [PATCH 0/3] Trapped instruction encoding support
Date: Wed, 29 Jul 2020 16:57:58 +0530	[thread overview]
Message-ID: <20200729112801.108985-1-anup.patel@wdc.com> (raw)

With RISC-V H-extension support, a RISC-V implementation can provide trapped
instruction encoding for almost all traps/exceptions.

For illegal/virtual instruction traps, the instruction encoding is available
in STVAL/MTVAL CSR.

For load/store faults, a transformed encoding of the trapped instruction is
available in MTINST/HTINST CSR.

This series implements optional RISC-V HART feature to provide trapped
instruction encoding in appropriate CSR.

These patches can be found in riscv_trap_insn_v1, branch at:
https://github.com/avpatel/qemu.git

Anup Patel (3):
  target/riscv: Optional feature to provide trapped instruction in CSRs
  target/riscv: Fix write_htinst() implementation
  target/riscv: Update MTINST/HTINST CSR in riscv_cpu_do_interrupt()

 target/riscv/cpu.c        |   7 ++
 target/riscv/cpu.h        |  11 ++-
 target/riscv/cpu_helper.c | 172 +++++++++++++++++++++++++++++++++++++-
 target/riscv/csr.c        |   1 +
 target/riscv/instmap.h    |  41 +++++++++
 target/riscv/translate.c  |  14 +++-
 6 files changed, 241 insertions(+), 5 deletions(-)

-- 
2.25.1



             reply	other threads:[~2020-07-29 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 11:27 Anup Patel [this message]
2020-07-29 11:27 ` [PATCH 1/3] target/riscv: Optional feature to provide trapped instruction in CSRs Anup Patel
2020-08-12 22:37   ` Alistair Francis
2020-07-29 11:28 ` [PATCH 2/3] target/riscv: Fix write_htinst() implementation Anup Patel
2020-08-10 22:37   ` Alistair Francis
2020-07-29 11:28 ` [PATCH 3/3] target/riscv: Update MTINST/HTINST CSR in riscv_cpu_do_interrupt() Anup Patel
2020-08-12 23:16   ` Alistair Francis
2020-08-13 15:52     ` 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=20200729112801.108985-1-anup.patel@wdc.com \
    --to=anup.patel@wdc.com \
    --cc=Alistair.Francis@wdc.com \
    --cc=anup@brainfault.org \
    --cc=atish.patra@wdc.com \
    --cc=palmer@dabbelt.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    /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).