Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-29 Thread Greg Bellows
On Wed, Jan 28, 2015 at 4:30 PM, Peter Maydell wrote: > On 28 January 2015 at 21:37, Greg Bellows wrote: > > > >> +/* Return true if the translation regime is using LPAE format page > tables > >> */ > >> +static inline bool regime_using_lpae_format(CPUARMState *env, > >> +

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-28 Thread Peter Maydell
On 28 January 2015 at 21:37, Greg Bellows wrote: > >> +/* Return true if the translation regime is using LPAE format page tables >> */ >> +static inline bool regime_using_lpae_format(CPUARMState *env, >> +ARMMMUIdx mmu_idx) >> +{ >> +int el = regime_

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-28 Thread Greg Bellows
On Fri, Jan 23, 2015 at ​​ 12:20 PM, Peter Maydell wrote: > Now we have the mmu_idx in get_phys_addr(), use it correctly to > determine the behaviour of virtual to physical address translations, > rather than using just an is_user flag and the current CPU state. > > Some TODO comments have been a

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Peter Maydell
On 27 January 2015 at 19:49, Greg Bellows wrote: > On Tue, Jan 27, 2015 at 12:12 PM, Peter Maydell > wrote: >> g_assert_not_reached(), but it didn't seem worth cluttering >> the switch with a bunch of extra labels just to assert that >> they weren't reachable. >> > > I see how it could clutter t

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Greg Bellows
On Tue, Jan 27, 2015 at 12:12 PM, Peter Maydell wrote: > On 27 January 2015 at 17:57, Greg Bellows wrote: > > > > > > On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell < > peter.mayd...@linaro.org> > > wrote: > >> +/* Return the exception level which controls this address translation > >> regime *

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Peter Maydell
On 27 January 2015 at 17:57, Greg Bellows wrote: > > > On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell > wrote: >> +/* Return the exception level which controls this address translation >> regime */ >> +static inline uint32_t regime_el(CPUARMState *env, ARMMMUIdx mmu_idx) >> +{ >> +switch (mm

Re: [Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-27 Thread Greg Bellows
On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell wrote: > Now we have the mmu_idx in get_phys_addr(), use it correctly to > determine the behaviour of virtual to physical address translations, > rather than using just an is_user flag and the current CPU state. > > Some TODO comments have been adde

[Qemu-devel] [PATCH 09/11] target-arm: Use mmu_idx in get_phys_addr()

2015-01-23 Thread Peter Maydell
Now we have the mmu_idx in get_phys_addr(), use it correctly to determine the behaviour of virtual to physical address translations, rather than using just an is_user flag and the current CPU state. Some TODO comments have been added to indicate where changes will need to be made to add EL2 and 64