From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UekoR-0006I9-B3 for qemu-devel@nongnu.org; Tue, 21 May 2013 07:33:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UekoM-0000u4-Ea for qemu-devel@nongnu.org; Tue, 21 May 2013 07:33:03 -0400 Received: from cantor2.suse.de ([195.135.220.15]:53455 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UekoM-0000u0-7p for qemu-devel@nongnu.org; Tue, 21 May 2013 07:32:58 -0400 Message-ID: <519B5B66.2000806@suse.de> Date: Tue, 21 May 2013 13:32:54 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1369105221-26307-1-git-send-email-qiaonuohan@cn.fujitsu.com> <519B112E.7040100@linux.vnet.ibm.com> In-Reply-To: <519B112E.7040100@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Fix mask of pte index List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qiao Nuohan Cc: aliguori@us.ibm.com, Jesse Larrew , qemu-devel@nongnu.org Nuohan, Am 21.05.2013 08:16, schrieb Jesse Larrew: > On 05/20/2013 10:00 PM, Qiao Nuohan wrote: >> Function walk_pte needs pte index to calculate virtual address. Howeve= r, pte >> index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0= x1ff. >> --- >> target-i386/arch_memory_mapping.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memo= ry_mapping.c >> index 844893f..a2eb7e7 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= pte_start_addr, >> continue; >> } >> >> - 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 > Verified that this agrees with the spec for IA-32e/PAE paging. Note tha= t > walk_pte2() is correct; only walk_pte() has the typo. >=20 > Reviewed by: Jesse Larrew This patch is missing a Signed-off-by! If you can reply with one, I'd fix up the subject for you (it should indicate where you are fixing it) and queue it together with my CPU'ish memory_mapping refactorings, if no one objects. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg