]> git.proxmox.com Git - mirror_qemu.git/commitdiff
s390x/mmu: Check bit 52 in page table entry
authorThomas Huth <thuth@linux.vnet.ibm.com>
Thu, 12 Feb 2015 17:09:28 +0000 (18:09 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 18 Feb 2015 08:37:14 +0000 (09:37 +0100)
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 <thuth@linux.vnet.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
target-s390x/cpu.h
target-s390x/mmu_helper.c

index 08cdb1529edf4629aeecb414f893ad605b5ebe6f..c24ca5f7fcb28dceeaf033490ede33081343d6d8 100644 (file)
@@ -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)
index 7dc9900e7348c062246bd1b32a119e61b7486a22..c183958787d399d7a762f336ba9891d461416351 100644 (file)
@@ -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;
     }