@samitouri / QOSamiQemu / commits / 5cd4d34a85

target/riscv: Rename riscv_pm_get_virt_pmm() to riscv_pm_get_vm_ldst_pmm()

Rename riscv_pm_get_virt_pmm() to riscv_pm_get_vm_ldst_pmm() to better reflect its actual usage. This function is used when checking the PMM field for virtual-machine load/store instructions (HLV.* and HSV.*), rather than for VS/VU modes. Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20260421093715.2995067-6-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Frank Chang committed Apr 21, 2026 at 17:37 UTC 5cd4d34a8566c1e84cc71ea6213c885a3c3c7519
3 files changed +3 -3
target/riscv/cpu.h
+1 -1
@@ -890,7 +890,7 @@ bool riscv_cpu_is_32bit(RISCVCPU *cpu);
890
891 bool riscv_cpu_virt_mem_enabled(CPURISCVState *env);
892 RISCVPmPmm riscv_pm_get_pmm(CPURISCVState *env);
893 -RISCVPmPmm riscv_pm_get_virt_pmm(CPURISCVState *env);
893 +RISCVPmPmm riscv_pm_get_vm_ldst_pmm(CPURISCVState *env);
894 uint32_t riscv_pm_get_pmlen(RISCVPmPmm pmm);
895
896 RISCVException riscv_csrr(CPURISCVState *env, int csrno,
target/riscv/cpu_helper.c
+1 -1
@@ -214,7 +214,7 @@ RISCVPmPmm riscv_pm_get_pmm(CPURISCVState *env)
214 #endif
215 }
216
217 -RISCVPmPmm riscv_pm_get_virt_pmm(CPURISCVState *env)
217 +RISCVPmPmm riscv_pm_get_vm_ldst_pmm(CPURISCVState *env)
218 {
219 #ifndef CONFIG_USER_ONLY
220 int priv_mode;
target/riscv/internals.h
+1 -1
@@ -209,7 +209,7 @@ static inline target_ulong adjust_addr_body(CPURISCVState *env,
209
210 /* get pmm field depending on whether addr is */
211 if (is_virt_addr) {
212 - pmm = riscv_pm_get_virt_pmm(env);
212 + pmm = riscv_pm_get_vm_ldst_pmm(env);
213 } else {
214 pmm = riscv_pm_get_pmm(env);
215 }