From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JxJ6W-00076x-MV for qemu-devel@nongnu.org; Sat, 17 May 2008 05:53:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JxJ6U-00076l-DL for qemu-devel@nongnu.org; Sat, 17 May 2008 05:53:27 -0400 Received: from [199.232.76.173] (port=60814 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JxJ6U-00076i-5e for qemu-devel@nongnu.org; Sat, 17 May 2008 05:53:26 -0400 Received: from rv-out-0708.google.com ([209.85.198.245]:32181) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JxJ6T-00017I-SY for qemu-devel@nongnu.org; Sat, 17 May 2008 05:53:26 -0400 Received: by rv-out-0708.google.com with SMTP id f25so469525rvb.22 for ; Sat, 17 May 2008 02:53:24 -0700 (PDT) From: Junjie Cai Content-Type: text/plain Date: Sat, 17 May 2008 18:53:23 +0900 Message-Id: <1211018003.30095.6.camel@cai-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [ARM] mmu table base address 0 not necessarily 16k-aligned Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Dear List, I found that in target-arm/helper.c get_phys_addr_v6() always align the mmu table base address to 16K. But it is not true if c2_mask is set. I tried to make a patch below, please consider. Index: qemu-0.9.1/target-arm/helper.c =================================================================== --- qemu-0.9.1.orig/target-arm/helper.c 2008-05-17 18:24:38.000000000 +0900 +++ qemu-0.9.1/target-arm/helper.c 2008-05-17 18:45:12.000000000 +0900 @@ -912,7 +912,7 @@ table = env->cp15.c2_base1; else table = env->cp15.c2_base0; - table = (table & 0xffffc000) | ((address >> 18) & 0x3ffc); + table = (table & 0xffffffe0) | ((address >> 18) & 0x3ffc); desc = ldl_phys(table); type = (desc & 3); if (type == 0) { Thanks.