From: Philippe Mathieu-Daudé Date: Wed, 7 Jan 2026 08:49:16 +0000 (+0100) Subject: target/s390x: Replace %target_ulong -> %vaddr where appropriate X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ba04414cce79d14c32407f89c3410438c54b80b;p=thirdparty%2Fqemu.git target/s390x: Replace %target_ulong -> %vaddr where appropriate Use the %vaddr type for virtual addresses. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20260206181953.18683-4-philmd@linaro.org> --- diff --git a/target/s390x/helper.c b/target/s390x/helper.c index d0c36d4a53..5002eebd4c 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -71,7 +71,7 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr) hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr v_addr) { hwaddr phys_addr; - target_ulong page; + vaddr page; page = v_addr & TARGET_PAGE_MASK; phys_addr = cpu_get_phys_page_debug(cs, page); diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 30f09ec3de..39ff42da3a 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -122,7 +122,7 @@ static inline bool read_table_entry(CPUS390XState *env, hwaddr gaddr, return ret == MEMTX_OK; } -static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, +static int mmu_translate_asce(CPUS390XState *env, vaddr vaddr, uint64_t asc, uint64_t asce, target_ulong *raddr, int *flags) { @@ -381,7 +381,7 @@ static void mmu_handle_skey(target_ulong addr, int rw, int *flags) * there is an exception to raise * @return 0 = success, != 0, the exception to raise */ -int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc, +int mmu_translate(CPUS390XState *env, vaddr vaddr, int rw, uint64_t asc, target_ulong *raddr, int *flags, uint64_t *tec) { uint64_t asce; diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index a4b54dc441..31e164c9b5 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -10,6 +10,7 @@ #ifndef S390X_INTERNAL_H #define S390X_INTERNAL_H +#include "exec/vaddr.h" #include "cpu.h" #include "fpu/softfloat.h" @@ -376,7 +377,7 @@ void probe_write_access(CPUS390XState *env, uint64_t addr, uint64_t len, bool mmu_absolute_addr_valid(target_ulong addr, bool is_write); /* Special access mode only valid for mmu_translate() */ #define MMU_S390_LRA -1 -int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t asc, +int mmu_translate(CPUS390XState *env, vaddr vaddr, int rw, uint64_t asc, target_ulong *raddr, int *flags, uint64_t *tec); int mmu_translate_real(CPUS390XState *env, target_ulong raddr, int rw, target_ulong *addr, int *flags, uint64_t *tec); diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 019eb4fba1..292d130d03 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -147,7 +147,8 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int size, bool probe, uintptr_t retaddr) { CPUS390XState *env = cpu_env(cs); - target_ulong vaddr, raddr; + vaddr vaddr; + target_ulong raddr; uint64_t asc, tec; int prot, excp;