aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/mmu_helper.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-02-13 17:12:40 +0100
committerCornelia Huck <cohuck@redhat.com>2018-02-26 12:55:26 +0100
commitf26852aa31d49bf83a8defd65538137a2f9da82c (patch)
treeeda59c67b2386c68def5cc993750103680d14bad /target/s390x/mmu_helper.c
parent571729a00a2ec8514c350dae830a73a09698a043 (diff)
s390x/tcg: fix disabling/enabling DAT
Currently, all memory accesses go via the MMU of the address space (primary, secondary, ...). This is bad, because we don't flush the TLB when disabling/enabling DAT. So we could add a tlb flush. However it is easier to simply select the MMU we already have in place for real memory access. All we have to do is point at the right MMU and allow to execute these pages. Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180213161240.19891-1-david@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> [CH: get rid of tabs] Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/mmu_helper.c')
-rw-r--r--target/s390x/mmu_helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
index f477cc006a..23fb2e7501 100644
--- a/target/s390x/mmu_helper.c
+++ b/target/s390x/mmu_helper.c
@@ -544,7 +544,7 @@ int mmu_translate_real(CPUS390XState *env, target_ulong raddr, int rw,
{
const bool lowprot_enabled = env->cregs[0] & CR0_LOWPROT;
- *flags = PAGE_READ | PAGE_WRITE;
+ *flags = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
if (is_low_address(raddr & TARGET_PAGE_MASK) && lowprot_enabled) {
/* see comment in mmu_translate() how this works */
*flags |= PAGE_WRITE_INV;