Skip to content

RISC-V: Convert to do_transaction_failed hook

Alistair Francis qemu-devel qemu-riscv 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesIn review
  2. v12 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on master

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2RISC-V: Handle bus errors in the page table walkertarget/riscv/cpu_helper.c+9 -30 replies
2/2RISC-V: Implement cpu_do_transaction_failedtarget/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_helper.c+13 -70 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchRichard HendersonPhilippe Mathieu-Daudé
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] RISC-V: Convert to do_transaction_failed hook

The do_unassigned_access hook has been deprecated and RISC-V is the last user of it. Let's instead update the RISC-V implementation to use do_transaction_failed instead.

After this series I used the 'git grep' regexes in docs/devel/loads-stores.rst and these are the memory accesses inside target/riscv:

monitor.c:102: cpu_physical_memory_read(pte_addr, &pte, ptesize);

cpu_helper.c:262: target_ulong pte = address_space_ldl(cs->as, pte_addr, attrs, &res);
cpu_helper.c:264: target_ulong pte = address_space_ldq(cs->as, pte_addr, attrs, &res);

translate.c:782: ctx->opcode = cpu_ldl_code(env, ctx->base.pc_next);

gdbstub.c:328: env->fpr[n] = ldq_p(mem_buf); /* always 64-bit */

All of these look safe to me.

v2:
- Rebase on master

Palmer Dabbelt (2):
RISC-V: Handle bus errors in the page table walker
RISC-V: Implement cpu_do_transaction_failed

 target/riscv/cpu.c        |  2 +-
 target/riscv/cpu.h        |  7 +++++--
 target/riscv/cpu_helper.c | 23 ++++++++++++++++-------
 3 files changed, 22 insertions(+), 10 deletions(-)
Signature · 1 line
2.23.0