[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/13] s390x/tcg: convert real to absolute address for RRBE, S
From: |
David Hildenbrand |
Subject: |
[PATCH v3 03/13] s390x/tcg: convert real to absolute address for RRBE, SSKE and ISKE |
Date: |
Fri, 3 Sep 2021 17:55:04 +0200 |
For RRBE, SSKE, and ISKE, we're dealing with real addresses, so we have to
convert to an absolute address first.
In the future, when adding EDAT1 support, we'll have to pay attention to
SSKE handling, as we'll be dealing with absolute addresses when the
multiple-block control is one.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
target/s390x/tcg/mem_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index 3c0820dd74..dd506d8d17 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -2177,6 +2177,7 @@ uint64_t HELPER(iske)(CPUS390XState *env, uint64_t r2)
uint64_t addr = wrap_address(env, r2);
uint8_t key;
+ addr = mmu_real2abs(env, addr);
if (addr > ms->ram_size) {
return 0;
}
@@ -2201,6 +2202,7 @@ void HELPER(sske)(CPUS390XState *env, uint64_t r1,
uint64_t r2)
uint64_t addr = wrap_address(env, r2);
uint8_t key;
+ addr = mmu_real2abs(env, addr);
if (addr > ms->ram_size) {
return;
}
@@ -2228,6 +2230,7 @@ uint32_t HELPER(rrbe)(CPUS390XState *env, uint64_t r2)
static S390SKeysClass *skeyclass;
uint8_t re, key;
+ addr = mmu_real2abs(env, addr);
if (addr > ms->ram_size) {
return 0;
}
--
2.31.1
- [PATCH v3 00/13] s390x: skey related fixes, cleanups, and memory device preparations, David Hildenbrand, 2021/09/03
- [PATCH v3 01/13] s390x/tcg: wrap address for RRBE, David Hildenbrand, 2021/09/03
- [PATCH v3 02/13] s390x/tcg: fix ignoring bit 63 when setting the storage key in SSKE, David Hildenbrand, 2021/09/03
- [PATCH v3 03/13] s390x/tcg: convert real to absolute address for RRBE, SSKE and ISKE,
David Hildenbrand <=
- [PATCH v3 04/13] s390x/tcg: check for addressing exceptions for RRBE, SSKE and ISKE, David Hildenbrand, 2021/09/03
- [PATCH v3 05/13] s390x/mmu_helper: no need to pass access type to mmu_translate_asce(), David Hildenbrand, 2021/09/03
- [PATCH v3 06/13] s390x/mmu_helper: fixup mmu_translate() documentation, David Hildenbrand, 2021/09/03
- [PATCH v3 07/13] s390x/mmu_helper: move address validation into mmu_translate*(), David Hildenbrand, 2021/09/03
- [PATCH v3 08/13] s390x/mmu_helper: avoid setting the storage key if nothing changed, David Hildenbrand, 2021/09/03
- [PATCH v3 09/13] hw/s390x/s390-skeys: use memory mapping to detect which storage keys to migrate, David Hildenbrand, 2021/09/03
- [PATCH v3 10/13] hw/s390x/s390-skeys: use memory mapping to detect which storage keys to dump, David Hildenbrand, 2021/09/03
- [PATCH v3 11/13] hw/s390x/s390-skeys: check if an address is valid before dumping the key, David Hildenbrand, 2021/09/03