aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/tcg/mem_helper.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2021-09-03 17:55:08 +0200
committerThomas Huth <thuth@redhat.com>2021-09-06 16:24:05 +0200
commit390191c6f6e2e912f45bc312464d59b84ca12db3 (patch)
tree49e33c28e31f787b43c1f7e3638c3528d4db53eb /target/s390x/tcg/mem_helper.c
parente0b11f2df19c1e9341e9cec78429e45e5af5901b (diff)
s390x/mmu_helper: move address validation into mmu_translate*()
Let's move address validation into mmu_translate() and mmu_translate_real(). This allows for checking whether an absolute address is valid before looking up the storage key. We can now get rid of the ram_size check. Interestingly, we're already handling LOAD REAL ADDRESS wrong, because a) We're not supposed to touch storage keys b) We're not supposed to convert to an absolute address Let's use a fake, negative MMUAccessType to teach mmu_translate() to fix that handling and to not perform address validation. Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20210903155514.44772-8-david@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target/s390x/tcg/mem_helper.c')
-rw-r--r--target/s390x/tcg/mem_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index a44a107374..4f9f3e1f63 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -2455,7 +2455,7 @@ uint64_t HELPER(lra)(CPUS390XState *env, uint64_t addr)
tcg_s390_program_interrupt(env, PGM_SPECIAL_OP, GETPC());
}
- exc = mmu_translate(env, addr, 0, asc, &ret, &flags, &tec);
+ exc = mmu_translate(env, addr, MMU_S390_LRA, asc, &ret, &flags, &tec);
if (exc) {
cc = 3;
ret = exc | 0x80000000;