From ca1c9e154b3b077aadf459a8aaf90196c0726452 Mon Sep 17 00:00:00 2001 From: aliguori Date: Mon, 18 Aug 2008 18:00:31 +0000 Subject: [PATCH] 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. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5025 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-i386/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-i386/helper.c b/target-i386/helper.c index 7962d6b381..2b59f2368a 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1192,6 +1192,8 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr) page_size = 4096; pte = ldq_phys(pte_addr); } + if (!(pte & PG_PRESENT_MASK)) + return -1; } else { uint32_t pde;