From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLt1Z-0004ku-5u for qemu-devel@nongnu.org; Mon, 25 Aug 2014 08:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLt1T-0002hI-KV for qemu-devel@nongnu.org; Mon, 25 Aug 2014 08:05:25 -0400 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:55261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLt1T-0002hD-G2 for qemu-devel@nongnu.org; Mon, 25 Aug 2014 08:05:19 -0400 Received: by mail-qg0-f53.google.com with SMTP id z60so9451560qgd.40 for ; Mon, 25 Aug 2014 05:05:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53FB267A.2080903@redhat.com> Date: Mon, 25 Aug 2014 14:05:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1407752887-6351-1-git-send-email-m.ilin@samsung.com> <53FB21C1.2020304@redhat.com> In-Reply-To: <53FB21C1.2020304@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] translate-all.c: fix debug memory maps printing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mikhail Ilyin , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Riku Voipio , rth@twiddle.net, afaerber@suse.de, mst@redhat.com Il 25/08/2014 13:45, Paolo Bonzini ha scritto: > Il 11/08/2014 12:28, Mikhail Ilyin ha scritto: >> 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; >> } >> > > Thanks, this is simple enough that I've queued it. Ouch, I spoke too soon. This patch fails to compile for MIPS N32 (a 32-bit ABI with a 64-bit virtual address space). I'm not sure if there is a simple fix. walk_memory_regions and its user should be changed to use target_ulong instead of abi_ulong. access_ok probably needs to be changed in the same way too. Riku, do you have any ideas (or free cycles to do the change)? Paolo