Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-04-10 Thread Tom Rini
On Mon, 18 Mar 2024 19:35:49 +, Pierre-Clément Tosi wrote: > The implementation of map_range() creates the requested mapping by > walking the page tables, iterating over multiple PTEs and/or descending > into existing table mappings as needed. When doing so, it assumes any > pre-existing

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-04-10 Thread Fabio Estevam
Hi Tom, On Sat, Mar 30, 2024 at 5:03 PM Fabio Estevam wrote: > > Hi Tom, > > On Mon, Mar 25, 2024 at 5:37 PM Hiago De Franco wrote: > > > > How much testing has this seen outside of imx? > > > > Tom, I tested with the AM62 TI arm processor (Toradex Verdin AM62) and > > it works fine. > > Do you

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-30 Thread Fabio Estevam
Hi Tom, On Mon, Mar 25, 2024 at 5:37 PM Hiago De Franco wrote: > > How much testing has this seen outside of imx? > > Tom, I tested with the AM62 TI arm processor (Toradex Verdin AM62) and > it works fine. Do you think this one can be applied to next? Then we would have time for more testing

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-26 Thread Marc Zyngier
On Tue, 19 Mar 2024 12:39:26 +, Pierre-Clément Tosi wrote: > > Hi Fabio, > > On Tue, Mar 19, 2024 at 09:13:12AM -0300, Fabio Estevam wrote: > > Hi Pierre, > > > > On Tue, Mar 19, 2024 at 8:39 AM Pierre-Clément Tosi > > wrote: > > > > > This means gd->arch.tlb_addr pointing to the live

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-25 Thread Hiago De Franco
On Mon, Mar 18, 2024 at 04:46:55PM -0300, Fabio Estevam wrote: > Hi Pierre, > > On Mon, Mar 18, 2024 at 4:35 PM Pierre-Clément Tosi wrote: > > > > The implementation of map_range() creates the requested mapping by > > walking the page tables, iterating over multiple PTEs and/or descending > >

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-23 Thread Tom Rini
On Fri, Mar 22, 2024 at 04:33:03PM -0300, Fabio Estevam wrote: > On Fri, Mar 22, 2024 at 4:31 PM Fabio Estevam wrote: > > > As Pierre's explanation addresses Marc's concern, > > do you think this can go to 2024.01 to fix the boot regression on > > imx8qxp/8qm? > > I meant 2024.04, sorry. How

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-22 Thread Fabio Estevam
On Fri, Mar 22, 2024 at 4:31 PM Fabio Estevam wrote: > As Pierre's explanation addresses Marc's concern, > do you think this can go to 2024.01 to fix the boot regression on imx8qxp/8qm? I meant 2024.04, sorry.

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-22 Thread Fabio Estevam
Hi Tom, On Tue, Mar 19, 2024 at 9:39 AM Pierre-Clément Tosi wrote: > For most AArch64 U-Boot ports (including the i.MX family), the answer is > trivial > because they use the arch code i.e. setup_all_pgtables(). However, as > fsl-layerscape re-implements mmu_setup(), it had to be looked at

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-19 Thread Pierre-Clément Tosi
Hi Fabio, On Tue, Mar 19, 2024 at 09:13:12AM -0300, Fabio Estevam wrote: > Hi Pierre, > > On Tue, Mar 19, 2024 at 8:39 AM Pierre-Clément Tosi wrote: > > > This means gd->arch.tlb_addr pointing to the live PTs during > > setup_pgtables(). > > > > In arch/arm/cpu/armv8, setup_all_pgtables()

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-19 Thread Fabio Estevam
Hi Pierre, On Tue, Mar 19, 2024 at 8:39 AM Pierre-Clément Tosi wrote: > This means gd->arch.tlb_addr pointing to the live PTs during setup_pgtables(). > > In arch/arm/cpu/armv8, setup_all_pgtables() runs with SCTLR_ELx.M unset. > > In arch/arm/cpu/armv8/fsl-layerscape, setup_pgtables() is

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-19 Thread Pierre-Clément Tosi
Hi Marc, On Tue, Mar 19, 2024 at 09:43:03AM +, Marc Zyngier wrote: > This seems pretty reasonable, thanks for looking into this. However, I > can't help but notice that this is done without any BBM, and no TLBI > either. > > Are we guaranteed that the updated page tables are not live at the

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-19 Thread Marc Zyngier
On Mon, 18 Mar 2024 19:35:49 +, Pierre-Clément Tosi wrote: > > The implementation of map_range() creates the requested mapping by > walking the page tables, iterating over multiple PTEs and/or descending > into existing table mappings as needed. When doing so, it assumes any > pre-existing

Re: [PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-18 Thread Fabio Estevam
Hi Pierre, On Mon, Mar 18, 2024 at 4:35 PM Pierre-Clément Tosi wrote: > > The implementation of map_range() creates the requested mapping by > walking the page tables, iterating over multiple PTEs and/or descending > into existing table mappings as needed. When doing so, it assumes any >

[PATCH] arm64: Fix map_range() not splitting mapped blocks

2024-03-18 Thread Pierre-Clément Tosi
The implementation of map_range() creates the requested mapping by walking the page tables, iterating over multiple PTEs and/or descending into existing table mappings as needed. When doing so, it assumes any pre-existing valid PTE to be a table mapping. This assumption is wrong if the platform