summaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/helper.c2
1 files changed, 2 insertions, 0 deletions
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;