[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH for-4.1 3/6] target/s390x: Use ilen from unwind in t
From: |
Richard Henderson |
Subject: |
[qemu-s390x] [PATCH for-4.1 3/6] target/s390x: Use ilen from unwind in tlb_fill |
Date: |
Mon, 1 Apr 2019 17:29:08 +0700 |
From: Richard Henderson <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target/s390x/mem_helper.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
index 3f76a8abfd..838c32fc96 100644
--- a/target/s390x/mem_helper.c
+++ b/target/s390x/mem_helper.c
@@ -44,7 +44,20 @@ void tlb_fill(CPUState *cs, target_ulong addr, int size,
{
int ret = s390_cpu_handle_mmu_fault(cs, addr, size, access_type, mmu_idx);
if (unlikely(ret != 0)) {
- cpu_loop_exit_restore(cs, retaddr);
+ cpu_restore_state(cs, retaddr, true);
+
+ /*
+ * Note that handle_mmu_fault sets ilen to either 2 (for code)
+ * or AUTO (for data). We can resolve AUTO now, as if it was
+ * set to UNWIND -- that will have been done via assignment
+ * in cpu_restore_state. Otherwise re-examine access_type.
+ */
+ if (access_type == MMU_INST_FETCH) {
+ CPUS390XState *env = cs->env_ptr;
+ env->int_pgm_ilen = 2;
+ }
+
+ cpu_loop_exit(cs);
}
}
--
2.17.1
- [qemu-s390x] [PATCH for-4.1 0/6] target/s390x: Clean up tcg exceptions, Richard Henderson, 2019/04/01
- [qemu-s390x] [PATCH for-4.1 1/6] target/s390x: Truncate 32-bit psw_addr before creating TB, Richard Henderson, 2019/04/01
- [qemu-s390x] [PATCH for-4.1 2/6] target/s390x: Add ilen to unwind data, Richard Henderson, 2019/04/01
- [qemu-s390x] [PATCH for-4.1 3/6] target/s390x: Use ilen from unwind in tlb_fill,
Richard Henderson <=
- [qemu-s390x] [PATCH for-4.1 4/6] target/s390x: Remove ilen parameter from tcg_s390_program_interrupt, Richard Henderson, 2019/04/01
- [qemu-s390x] [PATCH for-4.1 6/6] target/s390x: Use tcg_s390_program_interrupt in TCG helpers, Richard Henderson, 2019/04/01
- [qemu-s390x] [PATCH for-4.1 5/6] target/s390x: Remove ilen parameter from s390_program_interrupt, Richard Henderson, 2019/04/01
- Re: [qemu-s390x] [Qemu-devel] [PATCH for-4.1 0/6] target/s390x: Clean up tcg exceptions, no-reply, 2019/04/01