[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/29] s390x/mmu: Check bit 52 in page table entry
From: |
Christian Borntraeger |
Subject: |
[Qemu-devel] [PULL 15/29] s390x/mmu: Check bit 52 in page table entry |
Date: |
Wed, 18 Feb 2015 21:22:09 +0100 |
From: Thomas Huth <address@hidden>
Bit 52 in a page table entry has always to be zero, or a translation
specification exception is to be recognized.
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: Jens Freimann <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Reviewed-by: Cornelia Huck <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
---
target-s390x/cpu.h | 1 +
target-s390x/mmu_helper.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 08cdb15..c24ca5f 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -853,6 +853,7 @@ struct sysib_322 {
#define _PAGE_RO 0x200 /* HW read-only bit */
#define _PAGE_INVALID 0x400 /* HW invalid bit */
+#define _PAGE_RES0 0x800 /* bit must be zero */
#define SK_C (0x1 << 1)
#define SK_R (0x1 << 2)
diff --git a/target-s390x/mmu_helper.c b/target-s390x/mmu_helper.c
index 7dc9900..c183958 100644
--- a/target-s390x/mmu_helper.c
+++ b/target-s390x/mmu_helper.c
@@ -112,7 +112,10 @@ static int mmu_translate_pte(CPUS390XState *env,
target_ulong vaddr,
trigger_page_fault(env, vaddr, PGM_PAGE_TRANS, asc, rw, exc);
return -1;
}
-
+ if (pt_entry & _PAGE_RES0) {
+ trigger_page_fault(env, vaddr, PGM_TRANS_SPEC, asc, rw, exc);
+ return -1;
+ }
if (pt_entry & _PAGE_RO) {
*flags &= ~PAGE_WRITE;
}
--
1.9.3
- [Qemu-devel] [PULL 28/29] s390x/pci: Rework memory access in zpci instruction, (continued)
- [Qemu-devel] [PULL 28/29] s390x/pci: Rework memory access in zpci instruction, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 11/29] s390x/mmu: Fix exception types when checking the ASCEs, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 24/29] s390x/ioinst: Rework memory access in TSCH instruction, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 17/29] s390x/kvm: Add function for injecting pgm access exceptions, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 23/29] s390x/ioinst: Set condition code in ioinst_handle_tsch() handler, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 06/29] s390x/mmu: Fix the check for the real-space designation bit, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 22/29] s390x/ioinst: Rework memory access in STSCH instruction, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 10/29] s390x/mmu: Fix translation exception code in lowcore, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 26/29] s390x/ioinst: Rework memory access in CHSC instruction, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 07/29] s390x/mmu: Fix the handling of the table levels, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 15/29] s390x/mmu: Check bit 52 in page table entry,
Christian Borntraeger <=
- [Qemu-devel] [PULL 29/29] s390x/helper: Remove s390_cpu_physical_memory_map, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 20/29] s390x/ioinst: Rework memory access in MSCH instruction, Christian Borntraeger, 2015/02/18
- [Qemu-devel] [PULL 27/29] s390x/ioinst: Rework memory access in TPI instruction, Christian Borntraeger, 2015/02/18
- Re: [Qemu-devel] [PULL 00/29] s390x guest reipl and page table handling, Peter Maydell, 2015/02/26