Commit ca1c9e154b3b077aadf459a8aaf90196c0726452

Authored by aliguori
1 parent 681f8c29

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 <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5025 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 0 deletions
target-i386/helper.c
... ... @@ -1192,6 +1192,8 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
1192 1192 page_size = 4096;
1193 1193 pte = ldq_phys(pte_addr);
1194 1194 }
  1195 + if (!(pte & PG_PRESENT_MASK))
  1196 + return -1;
1195 1197 } else {
1196 1198 uint32_t pde;
1197 1199  
... ...