]> git.proxmox.com Git - mirror_qemu.git/commit
s390x/mmu_helper: move address validation into mmu_translate*()
authorDavid Hildenbrand <david@redhat.com>
Fri, 3 Sep 2021 15:55:08 +0000 (17:55 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 6 Sep 2021 14:24:05 +0000 (16:24 +0200)
commit390191c6f6e2e912f45bc312464d59b84ca12db3
tree49e33c28e31f787b43c1f7e3638c3528d4db53eb
parente0b11f2df19c1e9341e9cec78429e45e5af5901b
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>
target/s390x/mmu_helper.c
target/s390x/s390x-internal.h
target/s390x/tcg/excp_helper.c
target/s390x/tcg/mem_helper.c