From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVlOo-00087C-RF for qemu-devel@nongnu.org; Wed, 11 Mar 2015 14:30:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVlOh-0004Xo-O0 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 14:30:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVlOh-0004XZ-Gn for qemu-devel@nongnu.org; Wed, 11 Mar 2015 14:30:23 -0400 Date: Wed, 11 Mar 2015 19:30:17 +0100 From: Andrew Jones Message-ID: <20150311183017.GC10903@hawk.usersys.redhat.com> References: <1426021590-4834-1-git-send-email-drjones@redhat.com> <1426021590-4834-4-git-send-email-drjones@redhat.com> <20150311174241.GA10903@hawk.usersys.redhat.com> <20150311181011.GB10903@hawk.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On Wed, Mar 11, 2015 at 06:15:47PM +0000, Peter Maydell wrote: > On 11 March 2015 at 18:10, Andrew Jones wrote: > > On Wed, Mar 11, 2015 at 05:49:39PM +0000, Peter Maydell wrote: > >> Still confused. If the page isn't readable or writable > >> then WXN isn't going to kick in anyway because WXN only > >> affects writable pages. I don't see what the case is > >> where this bit of code will make a difference. > >> > > > > Ah, that is true. Too bad I didn't read this before sending v3, > > as I could have removed it, if you prefer. I had it here to > > be explicit about the ignoring of wxn - matching the spec, but > > you're right, it's useless code. Should I send a v4? > > Yes, please send a v4. > > I don't see what you mean about matching the spec, though. > The spec doesn't say anything about "ignore WXN if the > page isn't readable". It just straightforwardly says "if > the WXN bit is set then writable regions are treated as > XN", which is exactly what the code at the bottom of your > function does. > My interpretation of SCTLR_EL1.WXN was just wrong. There is talks about "EL1&0", and I assumed it meant that when WXN is on, then both EL1 and EL0 should lose executability. However it can certainly be interpreted as applying to them both, but based on their respective access permissions, which is how I guess I should have interpreted it. v4 coming drew