On 05/02/2026 22.49, Eric Farman wrote:
On Thu, 2026-02-05 at 22:37 +0100, Philippe Mathieu-Daudé wrote:
Hi Eric,
On 5/2/26 22:23, Eric Farman wrote:
On Wed, 2026-02-04 at 19:27 +0100, Philippe Mathieu-Daudé wrote:
Use the %vaddr type for virtual addresses.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/s390x/s390x-internal.h | 5 +++--
target/s390x/helper.c | 2 +-
target/s390x/mmu_helper.c | 6 +++---
target/s390x/tcg/excp_helper.c | 3 ++-
4 files changed, 9 insertions(+), 7 deletions(-)
@@ -376,9 +377,9 @@ 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,
+int mmu_translate_real(CPUS390XState *env, vaddr raddr, int rw,
I think this one should remain target_ulong, and become hwaddr in the next
patch, no?
Without s390x background, I don't understand well what real addresses
are. IFAICT the single caller s390_cpu_tlb_fill() provides a virtual
address. But then indeed mmu_real2abs() consumes a hwaddr as real addr.
Hi Philippe,
Ah, I didn't go the other direction (my bad). The usage of "real" here is kind
of halfway between
virtual and -really- real.
Yes, real addresses are like physical addresses in s390 land - except for
the two so-called low-core pages that might be swapped with two other pages
in memory.
I suspect the caller is mistaken here, but I think that's a research
project for tomorrow.
The caller s390_cpu_tlb_fill() seems to deal with both, real a virtual
addresses, and uses the same variable for both, so I think that's fine there.
But I agree with Eric mmu_translate_real() should use "hwaddr" for the raddr
parameter instead. Philippe, could you please adjust the patch?
Thanks,
Thomas