Re: [PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-22 Thread Catalin Marinas
On Mon, Sep 22, 2014 at 04:56:58PM +0100, Joel Schopp wrote: > > The TCR_EL2.PS setting should be done based on the ID_A64MMFR0_EL1 > > but you can do this in __do_hyp_init (it looks like this function > > handles VTCR_EL2.PS already, not sure why it does do it for TCR_EL2 as > > well). > > > > So

Re: [PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-22 Thread Joel Schopp
>>> -#define VTTBR_BADDR_SHIFT (VTTBR_X - 1) >>> -#define VTTBR_BADDR_MASK (((1LLU << (40 - VTTBR_X)) - 1) << >>> VTTBR_BADDR_SHIFT) > Actually, after some more thinking, why don't we just make the upper > limit of this mask 48-bit always or even 64-bit. That's a physical mask > for checking whe

Re: [PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-19 Thread Catalin Marinas
On Fri, Sep 19, 2014 at 04:28:54PM +0100, Catalin Marinas wrote: > On Tue, Sep 09, 2014 at 12:08:52AM +0100, Joel Schopp wrote: > > The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current > > systems. Rather than just add a bit it seems like a good time to also set > > things a

Re: [PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-19 Thread Catalin Marinas
On Tue, Sep 09, 2014 at 12:08:52AM +0100, Joel Schopp wrote: > The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current > systems. Rather than just add a bit it seems like a good time to also set > things at run-time instead of compile time to accomodate more hardware. > > This

[PATCH v6] arm64: fix VTTBR_BADDR_MASK

2014-09-08 Thread Joel Schopp
The current VTTBR_BADDR_MASK only masks 39 bits, which is broken on current systems. Rather than just add a bit it seems like a good time to also set things at run-time instead of compile time to accomodate more hardware. This patch sets TCR_EL2.PS, VTCR_EL2.T0SZ and vttbr_baddr_mask in runtime,