[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/31] target/s390x: Push trigger_pgm_exception lower in s390_cpu_
From: |
David Hildenbrand |
Subject: |
[PULL 17/31] target/s390x: Push trigger_pgm_exception lower in s390_cpu_tlb_fill |
Date: |
Thu, 10 Oct 2019 13:33:42 +0200 |
From: Richard Henderson <address@hidden>
Delay triggering an exception until the end, after we have
determined ultimate success or failure, and also taken into
account whether this is a non-faulting probe.
Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
---
target/s390x/excp_helper.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index dbff772d34..552098be5f 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -127,7 +127,7 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
CPUS390XState *env = &cpu->env;
target_ulong vaddr, raddr;
uint64_t asc;
- int prot, fail;
+ int prot, fail, excp;
qemu_log_mask(CPU_LOG_MMU, "%s: addr 0x%" VADDR_PRIx " rw %d mmu_idx %d\n",
__func__, address, access_type, mmu_idx);
@@ -141,12 +141,14 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
vaddr &= 0x7fffffff;
}
fail = mmu_translate(env, vaddr, access_type, asc, &raddr, &prot,
true);
+ excp = 0; /* exception already raised */
} else if (mmu_idx == MMU_REAL_IDX) {
/* 31-Bit mode */
if (!(env->psw.mask & PSW_MASK_64)) {
vaddr &= 0x7fffffff;
}
fail = mmu_translate_real(env, vaddr, access_type, &raddr, &prot);
+ excp = 0; /* exception already raised */
} else {
g_assert_not_reached();
}
@@ -159,7 +161,7 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
qemu_log_mask(CPU_LOG_MMU,
"%s: raddr %" PRIx64 " > ram_size %" PRIx64 "\n",
__func__, (uint64_t)raddr, (uint64_t)ram_size);
- trigger_pgm_exception(env, PGM_ADDRESSING, ILEN_AUTO);
+ excp = PGM_ADDRESSING;
fail = 1;
}
@@ -175,6 +177,9 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int
size,
return false;
}
+ if (excp) {
+ trigger_pgm_exception(env, excp, ILEN_AUTO);
+ }
cpu_restore_state(cs, retaddr, true);
/*
--
2.21.0
- [PULL 06/31] s390x/mmu: DAT table definition overhaul, (continued)
- [PULL 06/31] s390x/mmu: DAT table definition overhaul, David Hildenbrand, 2019/10/10
- [PULL 10/31] s390x/mmu: Implement Instruction-Execution-Protection Facility, David Hildenbrand, 2019/10/10
- [PULL 07/31] s390x/mmu: Convert to non-recursive page table walk, David Hildenbrand, 2019/10/10
- [PULL 11/31] s390x/cpumodel: Prepare for changes of QEMU model, David Hildenbrand, 2019/10/10
- [PULL 09/31] s390x/mmu: Implement ESOP-2 and access-exception-fetch/store-indication facility, David Hildenbrand, 2019/10/10
- [PULL 12/31] s390x/cpumodel: Add new TCG features to QEMU cpu model, David Hildenbrand, 2019/10/10
- [PULL 13/31] target/s390x: Add ilen to unwind data, David Hildenbrand, 2019/10/10
- [PULL 14/31] target/s390x: Remove ilen parameter from tcg_s390_program_interrupt, David Hildenbrand, 2019/10/10
- [PULL 15/31] target/s390x: Remove ilen parameter from s390_program_interrupt, David Hildenbrand, 2019/10/10
- [PULL 16/31] target/s390x: Use tcg_s390_program_interrupt in TCG helpers, David Hildenbrand, 2019/10/10
- [PULL 17/31] target/s390x: Push trigger_pgm_exception lower in s390_cpu_tlb_fill,
David Hildenbrand <=
- [PULL 18/31] target/s390x: Handle tec in s390_cpu_tlb_fill, David Hildenbrand, 2019/10/10
- [PULL 19/31] target/s390x: Return exception from mmu_translate_real, David Hildenbrand, 2019/10/10
- [PULL 20/31] target/s390x: Remove exc argument to mmu_translate_asce, David Hildenbrand, 2019/10/10
- [PULL 21/31] target/s390x: Return exception from mmu_translate, David Hildenbrand, 2019/10/10
- [PULL 22/31] target/s390x: Return exception from translate_pages, David Hildenbrand, 2019/10/10
- [PULL 23/31] target/s390x: Remove fail variable from s390_cpu_tlb_fill, David Hildenbrand, 2019/10/10
- [PULL 24/31] target/s390x: Simplify helper_lra, David Hildenbrand, 2019/10/10