Received: from eggs.gnu.org ([2001:4830:134:3::10]:38468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGmq4-0006xT-B0 for qemu-devel@nongnu.org; Mon, 11 Aug 2014 06:28:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGmpx-0003O8-4B for qemu-devel@nongnu.org; Mon, 11 Aug 2014 06:28:28 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:50518) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGmpw-0003Nk-UM for qemu-devel@nongnu.org; Mon, 11 Aug 2014 06:28:21 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NA5009Q012YU290@mailout1.w1.samsung.com> for qemu-devel@nongnu.org; Mon, 11 Aug 2014 11:28:10 +0100 (BST) From: Mikhail Ilyin Date: Mon, 11 Aug 2014 14:28:07 +0400 Message-id: <1407752887-6351-1-git-send-email-m.ilin@samsung.com> Subject: [Qemu-devel] [PATCH] translate-all.c: fix debug memory maps printing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Mikhail Ilyin , peter.maydell@linaro.org, mst@redhat.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Fix memory maps textualizing function. The output was not correct because of wrong base address calculation. The initial address has to be shifted also for TARGET_PAGE_BITS. Signed-off-by: Mikhail Ilyin --- translate-all.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index 8f7e11b..cb7a33d 100644 --- a/translate-all.c +++ b/translate-all.c @@ -1728,9 +1728,8 @@ int walk_memory_regions(void *priv, walk_memory_regions_fn fn) data.prot = 0; for (i = 0; i < V_L1_SIZE; i++) { - int rc = walk_memory_regions_1(&data, (abi_ulong)i << V_L1_SHIFT, + int rc = walk_memory_regions_1(&data, (abi_ulong)i << (V_L1_SHIFT + TARGET_PAGE_BITS), V_L1_SHIFT / V_L2_BITS - 1, l1_map + i); - if (rc != 0) { return rc; } -- 1.9.1