[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL v2 27/27] s390x/tcg: fix loading 31bit PSWs with the
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL v2 27/27] s390x/tcg: fix loading 31bit PSWs with the highest bit set |
Date: |
Thu, 1 Mar 2018 14:02:01 +0100 |
From: David Hildenbrand <address@hidden>
Let's also put the 31-bit hack in front of the REAL MMU, otherwise right
now we get errors when loading a PSW where the highest bit is set (e.g.
via s390-netboot.img). The highest bit is not masked away, therefore we
inject addressing exceptions into the guest.
The proper fix will later be to do all address wrapping before accessing
the MMU - so we won't get any "wrong" entries in there (which makes
flushing also easier). But that will require more work (wrapping in
load_psw, wrapping when incrementing the PC, wrapping every memory
access).
This fixes the tests/pxe-test test.
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/excp_helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
index 411051edc3..dfee221111 100644
--- a/target/s390x/excp_helper.c
+++ b/target/s390x/excp_helper.c
@@ -107,6 +107,10 @@ int s390_cpu_handle_mmu_fault(CPUState *cs, vaddr
orig_vaddr, int size,
return 1;
}
} else if (mmu_idx == MMU_REAL_IDX) {
+ /* 31-Bit mode */
+ if (!(env->psw.mask & PSW_MASK_64)) {
+ vaddr &= 0x7fffffff;
+ }
if (mmu_translate_real(env, vaddr, rw, &raddr, &prot)) {
return 1;
}
--
2.13.6
- [qemu-s390x] [PULL v2 15/27] s390x/cpu: expose the guest crash information, (continued)
- [qemu-s390x] [PULL v2 15/27] s390x/cpu: expose the guest crash information, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 17/27] s390x/tcg: fix disabling/enabling DAT, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 18/27] s390x/tcg: add various alignment checks, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 20/27] qmp: add query-cpus-fast, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 19/27] qmp: expose s390-specific CPU info, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 22/27] qemu-doc: deprecate query-cpus, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 23/27] hmp: change hmp_info_cpus to use query-cpus-fast, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 24/27] s390x/cpumodel: document S390FeatDef.bit not applicable, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 21/27] qmp: add architecture specific cpu data for query-cpus-fast, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 25/27] s390x/sclp: remove memory hotplug support, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 27/27] s390x/tcg: fix loading 31bit PSWs with the highest bit set,
Cornelia Huck <=
- [qemu-s390x] [PULL v2 14/27] pc-bios/s390: Rebuild the s390x firmware images with the boot menu changes, Cornelia Huck, 2018/03/01
- [qemu-s390x] [PULL v2 26/27] s390x: remove s390_get_memslot_count, Cornelia Huck, 2018/03/01
- Re: [qemu-s390x] [PULL v2 00/27] s390x updates (and friends), Peter Maydell, 2018/03/01