All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Fix Zjpm implementation
@ 2025-11-21  5:04 frank.chang
  2025-11-21  5:04 ` [PATCH v2 1/6] target/riscv: fix address masking frank.chang
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: frank.chang @ 2025-11-21  5:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
	Daniel Henrique Barboza, Liu Zhiwei, open list:RISC-V TCG CPUs,
	Frank Chang

From: Frank Chang <frank.chang@sifive.com>

The current Zjpm implementation has the following issues:

1. The address is shifted before obtaining the correct PMLEN value.
2. riscv_pm_get_pmm() does not handle effective privilege mode correctly.
3. mstatus.MPRV does not affect virtual-machine load/store instructions.
4. Sign extension for virtual-machine load/store instructions (HLV.* and
   HSV.*) must be performed when vsatp.MODE != Bare.

This patchset fixes the above issues and also renames
riscv_pm_get_virt_pmm() to riscv_pm_get_vm_ldst_pmm(), as the helper
is only used when checking the PMM configuration for virtual-machine
load/store instructions, rather than for VS/VU modes.

Frank Chang (5):
  target/riscv: Add a helper to return the current effective priv mode
  target/riscv: Fix pointer masking PMM field selection logic
  target/riscv: Fix pointer masking for virtual-machine load/store insns
  target/riscv: Rename riscv_pm_get_virt_pmm() to
    riscv_pm_get_vm_ldst_pmm()
  target/riscv: Fix pointer masking translation mode check bug

Yong-Xuan Wang (1):
  target/riscv: fix address masking

 target/riscv/cpu.h         |   5 +-
 target/riscv/cpu_helper.c  | 164 +++++++++++++++++++++++++++++--------
 target/riscv/internals.h   |   8 +-
 target/riscv/tcg/tcg-cpu.c |   4 +-
 4 files changed, 138 insertions(+), 43 deletions(-)

--
2.43.0



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-12-11 16:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-21  5:04 [PATCH v2 0/6] Fix Zjpm implementation frank.chang
2025-11-21  5:04 ` [PATCH v2 1/6] target/riscv: fix address masking frank.chang
2025-11-21  5:04 ` [PATCH v2 2/6] target/riscv: Add a helper to return the current effective priv mode frank.chang
2025-11-25 14:59   ` Radim Krčmář
2025-12-11 16:39     ` Frank Chang
2025-11-21  5:04 ` [PATCH v2 3/6] target/riscv: Fix pointer masking PMM field selection logic frank.chang
2025-11-25 15:25   ` Radim Krčmář
2025-12-11 16:41     ` Frank Chang
2025-11-21  5:04 ` [PATCH v2 4/6] target/riscv: Fix pointer masking for virtual-machine load/store insns frank.chang
2025-11-25 15:28   ` Radim Krčmář
2025-11-21  5:04 ` [PATCH v2 5/6] target/riscv: Rename riscv_pm_get_virt_pmm() to riscv_pm_get_vm_ldst_pmm() frank.chang
2025-11-21  5:04 ` [PATCH v2 6/6] target/riscv: Fix pointer masking translation mode check bug frank.chang
2025-11-25 15:41   ` Radim Krčmář

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.