From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KV91v-0001fi-EB for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:00:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KV91v-0001fU-1Y for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:00:35 -0400 Received: from [199.232.76.173] (port=55404 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KV91u-0001fR-Ux for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:00:34 -0400 Received: from savannah.gnu.org ([199.232.41.3]:37084 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KV91u-0006iZ-JO for qemu-devel@nongnu.org; Mon, 18 Aug 2008 14:00:34 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KV91t-0003M8-Tj for qemu-devel@nongnu.org; Mon, 18 Aug 2008 18:00:34 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KV91t-0003Ly-Hd for qemu-devel@nongnu.org; Mon, 18 Aug 2008 18:00:33 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Mon, 18 Aug 2008 18:00:33 +0000 Subject: [Qemu-devel] [5025] i386: Catch all non-present ptes in cpu_get_phys_page_debug ( Jan Kiszka) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. Signed-off-by: Jan Kiszka Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/target-i386/helper.c Modified: trunk/target-i386/helper.c =================================================================== --- trunk/target-i386/helper.c 2008-08-18 14:19:42 UTC (rev 5024) +++ trunk/target-i386/helper.c 2008-08-18 18:00:31 UTC (rev 5025) @@ -1192,6 +1192,8 @@ page_size = 4096; pte = ldq_phys(pte_addr); } + if (!(pte & PG_PRESENT_MASK)) + return -1; } else { uint32_t pde;