Received: from [140.186.70.92] (port=44824 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7R6m-0002AU-0a for qemu-devel@nongnu.org; Wed, 06 Apr 2011 07:41:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7R6k-00043y-Px for qemu-devel@nongnu.org; Wed, 06 Apr 2011 07:41:11 -0400 Received: from adelie.canonical.com ([91.189.90.139]:52859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7R6k-00043n-JN for qemu-devel@nongnu.org; Wed, 06 Apr 2011 07:41:10 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q7R6i-0004W8-2t for ; Wed, 06 Apr 2011 11:41:08 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 59A6E2E890E for ; Wed, 6 Apr 2011 11:40:59 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 06 Apr 2011 11:32:00 -0000 From: Peter Maydell Sender: bounces@canonical.com References: <20110403171042.3985.63218.malonedeb@wampee.canonical.com> Message-Id: <20110406113200.22702.88341.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 749522] Re: qemu-system-arm reads wrong entry in L1 page table for cortex-a8 Reply-To: Bug 749522 <749522@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Why do you think this is wrong? The ARM ARM says that the physical address of the first level page table descriptor is (ignoring TTBCR.N) the concatenation of bits [31..14] of the TTBR with bits [31..20] of the MVA and two zero bits. In this code 'table' is initially the [31..14] bits of the TTBR, and we move bits 31..20 of 'address' into bits [13..2] with the shift by 18 and mask. If we weren't correctly calculating the first level page table descriptor address then I don't think anything that used the MMU would work... (We do seem to not quite be getting the effect of TTBCR.N right, though: if N > 0 then although we correctly take more bits from TTBR0 (by adjusting c2_base_mask) we aren't masking out the high bits [31..32-N] of the MVA. But that's a different problem.) -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/749522 Title: qemu-system-arm reads wrong entry in L1 page table for cortex-a8 Status in QEMU: New Bug description: target-arm/helper.c:920 [current] table |=3D (address >> 18) & 0x3ffc [fix] table |=3D (address >> 20) & 0xfff