qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix Zjpm implementation
@ 2025-11-18 10:59 frank.chang
  2025-11-18 10:59 ` [PATCH 1/3] target/riscv: fix address masking frank.chang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: frank.chang @ 2025-11-18 10:59 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 two issues:

1. The address is shifted before obtaining the correct PMLEN value.
2. riscv_pm_get_pmm() does not handle VS/VU modes correctly.

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 (HLV.* and HSV.*), rather than for VS/VU modes.

Frank Chang (2):
  target/riscv: Fix pointer masking PMM field selection logic
  target/riscv: Rename riscv_pm_get_virt_pmm() to
    riscv_pm_get_vm_ldst_pmm()

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

 target/riscv/cpu.h        |  2 +-
 target/riscv/cpu_helper.c | 24 ++++++++++++++++--------
 target/riscv/internals.h  |  4 ++--
 3 files changed, 19 insertions(+), 11 deletions(-)

--
2.43.0



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

end of thread, other threads:[~2025-11-21  5:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18 10:59 [PATCH 0/3] Fix Zjpm implementation frank.chang
2025-11-18 10:59 ` [PATCH 1/3] target/riscv: fix address masking frank.chang
2025-11-18 11:19   ` Daniel Henrique Barboza
2025-11-18 10:59 ` [PATCH 2/3] target/riscv: Fix pointer masking PMM field selection logic frank.chang
2025-11-18 11:21   ` Daniel Henrique Barboza
2025-11-18 13:42   ` Radim Krčmář
2025-11-21  5:07     ` Frank Chang
2025-11-18 10:59 ` [PATCH 3/3] target/riscv: Rename riscv_pm_get_virt_pmm() to riscv_pm_get_vm_ldst_pmm() frank.chang
2025-11-18 11:21   ` Daniel Henrique Barboza

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).