aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/cpu.h
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2017-09-26 20:33:14 +0200
committerCornelia Huck <cohuck@redhat.com>2017-10-06 10:53:02 +0200
commitfb66944df92f4cf28b6f66232f82b9dd46ddcdb2 (patch)
tree3fe9b7de69a395e979920daa85742a28c50e5ca8 /target/s390x/cpu.h
parent0bd695a960bf05f27ad6d710d2b64059037574ce (diff)
s390x/tcg: add MMU for real addresses
This makes it easy to access real addresses (prefix) and in addition checks for valid memory addresses, which is missing when using e.g. stl_phys(). We can later reuse it to implement low address protection checks (then we might even decide to introduce yet another MMU for absolute addresses, just for handling storage keys and low address protection). Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20170926183318.12995-3-david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu.h')
-rw-r--r--target/s390x/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 5e2504d679..c57ef71f6d 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -43,12 +43,13 @@
#include "fpu/softfloat.h"
-#define NB_MMU_MODES 3
+#define NB_MMU_MODES 4
#define TARGET_INSN_START_EXTRA_WORDS 1
#define MMU_MODE0_SUFFIX _primary
#define MMU_MODE1_SUFFIX _secondary
#define MMU_MODE2_SUFFIX _home
+#define MMU_MODE3_SUFFIX _real
#define MMU_USER_IDX 0
@@ -351,6 +352,7 @@ extern const struct VMStateDescription vmstate_s390_cpu;
#define MMU_PRIMARY_IDX 0
#define MMU_SECONDARY_IDX 1
#define MMU_HOME_IDX 2
+#define MMU_REAL_IDX 3
static inline int cpu_mmu_index(CPUS390XState *env, bool ifetch)
{