From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiQA4-0006KG-Lg for qemu-devel@nongnu.org; Fri, 31 May 2013 10:18:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UiQA2-0005KY-Sv for qemu-devel@nongnu.org; Fri, 31 May 2013 10:18:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UiQA2-0005KQ-L0 for qemu-devel@nongnu.org; Fri, 31 May 2013 10:18:30 -0400 From: Luiz Capitulino Date: Fri, 31 May 2013 10:18:25 -0400 Message-Id: <1370009905-4255-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1370009905-4255-1-git-send-email-lcapitulino@redhat.com> References: <1370009905-4255-1-git-send-email-lcapitulino@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 3/3] target-i386: Fix mask of pte index in memory mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com From: Qiao Nuohan Function walk_pte() needs pte index to calculate virtual address. However, pte index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff. Signed-off-by: Qiao Nuohan Reviewed-by: Jesse Larrew Signed-off-by: Andreas F=C3=A4rber Signed-off-by: Luiz Capitulino --- target-i386/arch_memory_mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_= mapping.c index 24884bd..5096fbd 100644 --- a/target-i386/arch_memory_mapping.c +++ b/target-i386/arch_memory_mapping.c @@ -38,7 +38,7 @@ static void walk_pte(MemoryMappingList *list, hwaddr pt= e_start_addr, continue; } =20 - start_vaddr =3D start_line_addr | ((i & 0x1fff) << 12); + start_vaddr =3D start_line_addr | ((i & 0x1ff) << 12); memory_mapping_list_add_merge_sorted(list, start_paddr, start_vaddr, 1 << 12); } --=20 1.8.1.4