From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu9Pu-0005fj-CA for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:55:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu9Pp-000064-IV for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:55:54 -0400 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:58843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu9Pp-00005f-Bi for qemu-devel@nongnu.org; Mon, 09 Jun 2014 19:55:49 -0400 Received: by mail-pa0-f54.google.com with SMTP id rd3so30137pab.41 for ; Mon, 09 Jun 2014 16:55:47 -0700 (PDT) Date: Tue, 10 Jun 2014 01:47:55 +0200 From: "Edgar E. Iglesias" Message-ID: <20140609234755.GI3378@toto> References: <1402234502.15729.200.camel@hastur.hellion.org.uk> <1402235597-12655-1-git-send-email-ijc@hellion.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] target-arm: A64: Correct handling of UXN bit. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Rob Herring , Greg Bellows , Claudio Fontana , QEMU Developers , Ian Campbell On Mon, Jun 09, 2014 at 02:40:59PM +0100, Peter Maydell wrote: > On 8 June 2014 14:53, Ian Campbell wrote: > > In v8 page tables bit 54 in the PTE is UXN in the EL0/EL1 translation regimes > > and XN elsewhere. In v7 the bit is always XN. Since we only emulate EL0/EL1 we > > can just treat this bit as UXN whenever we are in v8 mode. > > > > Also correctly extract the upper attributes from the PTE entry, the v8 version > > tried to avoid extracting the CONTIG bit and ended up with the upper bits being > > off-by-one. Instead behave the same as v7 and extract (but ignore) the CONTIG > > bit. > > > > This fixes "Bad mode in Synchronous Abort handler detected, code 0x8400000f" > > seen when modprobing modules under Linux. > > > > Signed-off-by: Ian Campbell > > Cc: Peter Maydell > > Cc: Claudio Fontana > > Cc: Rob Herring > > Thanks, applied to target-arm.next. > To those interested in EL2/EL3 support: what's the > plan for telling the get_phys_addr() functions which > translation regime they should be operating in? My ARMv8 S2 MMU code is a bit of a mess at the moment but I'm thinking to add translation_el and stage arguments to get_phys_addr(). We can work out the details later but basically we need get_phys_addr() to be able to do translation for the various ELs, Stage 1 and/or Stage 2 and to be able to do the translations independent from the current CPU state. We need the latter to support the various address translation regs (e.g ATS12E0R from El3). Cheers, Edgar > > (since that is what indicates whether this bit is UXN or XN, > as well as having various other effects). > > thanks > -- PMM