On 07/01/2026 14.07, Philippe Mathieu-Daudé wrote:
Keep address_space_read/write() API to access blob of memory.
When the access size is known, use the address_space_ld/st()
API which can directly swap endianness.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/s390x/mmu_helper.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index 026502a3e40..9ee1d778876 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -108,6 +108,7 @@ static inline bool read_table_entry(CPUS390XState *env,
hwaddr gaddr,
uint64_t *entry)
{
CPUState *cs = env_cpu(env);
+ MemTxResult ret;
/*
* According to the PoP, these table addresses are "unpredictably real
@@ -116,13 +117,9 @@ static inline bool read_table_entry(CPUS390XState *env,
hwaddr gaddr,
*
* We treat them as absolute addresses and don't wrap them.
*/
- if (unlikely(address_space_read(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED,
- entry, sizeof(*entry)) !=
- MEMTX_OK)) {
- return false;
- }
- *entry = be64_to_cpu(*entry);
- return true;
+ *entry = address_space_ldl_be(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED, &ret);
+
+ return ret == MEMTX_OK;
}
Hi Philippe,
this patch seems to break "make check-functional-s390x" ... looks like there
is a bug somewhere, please have a look!
Thanks,
Thomas