From patchwork Mon Aug 11 10:28:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikhail Ilin X-Patchwork-Id: 378941 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D9320140142 for ; Mon, 11 Aug 2014 20:28:53 +1000 (EST) Received: from localhost ([::1]:34847 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGmqR-0007FG-Vy for incoming@patchwork.ozlabs.org; Mon, 11 Aug 2014 06:28:51 -0400 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) X-AuditID: cbfec7f4-b7f156d0000063c7-21-53e89ac0b5d5 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 3F.AB.25543.0CA98E35; Mon, 11 Aug 2014 11:28:16 +0100 (BST) Received: from michail.rnd.samsung.ru ([106.109.9.224]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NA500A4Z133P330@eusync3.samsung.com>; Mon, 11 Aug 2014 11:28:16 +0100 (BST) From: Mikhail Ilyin To: qemu-devel@nongnu.org Date: Mon, 11 Aug 2014 14:28:07 +0400 Message-id: <1407752887-6351-1-git-send-email-m.ilin@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrEJMWRmVeSWpSXmKPExsVy+t/xq7oHZr0INpj9gNWieVOxxYJD69ks /v96xWqxf9s/Vos5Zx6wWBzv3cFiMe3UHVYHdo871/aweTy5tpnJ4/2+q2wefVtWMXpsPl3t 0Tf9A3MAWxSXTUpqTmZZapG+XQJXxvZDG1kKZrJXnH3Ywt7AuIK1i5GTQ0LARGLD3vNsELaY xIV764FsLg4hgaWMEg+vzWWGcHqZJGb/XMUCUsUmoCHxcNd+MFtEQFLid9dpsCJmgS5GiZ3N n8FGCQs4SHRd3w1WxCKgKnFuzjKmLkYODl4BR4lHvYoQ2+QkTh6bzDqBkXsBI8MqRtHU0uSC 4qT0XEO94sTc4tK8dL3k/NxNjJBw+bKDcfExq0OMAhyMSjy8BqfvBguxJpYVV+YeYpTgYFYS 4V0y40WwEG9KYmVValF+fFFpTmrxIUYmDk6pBsagU3Mbfy6XcGE+znd6Qs9d/2d7XW8ycfR3 hE85s6n8bqz71NmFLN1xuyT1Ll52K806InUnozW+sEoxUfCRg3Gdmu66CLaPTp//Jdk4bpOb G2GYyZvQM29DpXDhYvaDAhJTWPffkfOe1TEhZG8x/8p03UXWP/ae/72v/JTVGQel9/ZXa3gc OpRYijMSDbWYi4oTATwdp231AQAA X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 210.118.77.11 Cc: Mikhail Ilyin , peter.maydell@linaro.org, mst@redhat.com, pbonzini@redhat.com, afaerber@suse.de, rth@twiddle.net Subject: [Qemu-devel] [PATCH] translate-all.c: fix debug memory maps printing X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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; }