Skip to contentSkip to conversation

[5025] i386: Catch all non-present ptes in cpu_get_phys_page_debug ( Jan Kiszka)

Qemu-devel Anthony Liguori 1 participant 1 message Aug 18, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5025

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5025
Author:   aliguori
Date:     2008-08-18 18:00:31 +0000 (Mon, 18 Aug 2008)

Log Message:
-----------
i386: Catch all non-present ptes in cpu_get_phys_page_debug (Jan Kiszka)

It helps debugging guests when yet unmapped pages are correctly reported as, well, unmapped.

Modified Paths:
--------------

    trunk/target-i386/helper.c

Modified: trunk/target-i386/helper.c
===================================================================

target-i386/helper.c +2 -0
@@ -1192,6 +1192,8 @@
             page_size = 4096;
             pte = ldq_phys(pte_addr);
         }
+        if (!(pte & PG_PRESENT_MASK))
+            return -1;
     } else {
         uint32_t pde;