Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-12 Thread Peter Maydell
On 10 March 2015 at 21:06, Andrew Jones wrote: > This patch makes the following changes to the determination of > whether an address is executable, when translating addresses > using LPAE. > > 1. No longer assumes that PL0 can't execute when it can't read. >It can in AArch64, a difference from

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 18:30, Andrew Jones wrote: > My interpretation of SCTLR_EL1.WXN was just wrong. There is > talks about "EL1&0" That's just the name of the translation regime (ie there's a shared set of page tables that handle translation for both EL1 and EL0). > and I assumed it meant that w

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
On Wed, Mar 11, 2015 at 06:15:47PM +, Peter Maydell wrote: > On 11 March 2015 at 18:10, Andrew Jones wrote: > > On Wed, Mar 11, 2015 at 05:49:39PM +, Peter Maydell wrote: > >> Still confused. If the page isn't readable or writable > >> then WXN isn't going to kick in anyway because WXN onl

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 18:10, Andrew Jones wrote: > On Wed, Mar 11, 2015 at 05:49:39PM +, 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

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
On Wed, Mar 11, 2015 at 05:49:39PM +, Peter Maydell wrote: > On 11 March 2015 at 17:42, Andrew Jones wrote: > > On Wed, Mar 11, 2015 at 05:02:00PM +, Peter Maydell wrote: > > >> > +if (is_aa64) { > >> > +switch (regime_el(env, mmu_idx)) { > >> > +case 1: > >> > +

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Peter Maydell
On 11 March 2015 at 17:42, Andrew Jones wrote: > On Wed, Mar 11, 2015 at 05:02:00PM +, Peter Maydell wrote: >> > +if (is_aa64) { >> > +switch (regime_el(env, mmu_idx)) { >> > +case 1: >> > +if (is_user && !user_rw) { >> > +wxn = 0; >> >> I don't

Re: [Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-11 Thread Andrew Jones
On Wed, Mar 11, 2015 at 05:02:00PM +, Peter Maydell wrote: > On 10 March 2015 at 21:06, Andrew Jones wrote: > > This patch makes the following changes to the determination of > > whether an address is executable, when translating addresses > > using LPAE. > > > > 1. No longer assumes that PL0

[Qemu-devel] [PATCH v2 3/3] target-arm: get_phys_addr_lpae: more xn control

2015-03-10 Thread Andrew Jones
This patch makes the following changes to the determination of whether an address is executable, when translating addresses using LPAE. 1. No longer assumes that PL0 can't execute when it can't read. It can in AArch64, a difference from AArch32. 2. Use va_size == 64 to determine we're in AArch6