Re: [RFC PATCH 2/2] arm64: kpti: Update arm64_use_ng_mappings before pagetable mapping

2021-01-26 Thread Will Deacon
On Wed, Jan 13, 2021 at 09:40:47AM +0800, Jia He wrote: > There is a 10s stall in idmap_kpti_install_ng_mappings when kernel boots > on a Ampere EMAG server. > > Commit f992b4dfd58b ("arm64: kpti: Add ->enable callback to remap > swapper using nG mappings") updates the nG bit runtime if kpti is

[RFC PATCH 2/2] arm64: kpti: Update arm64_use_ng_mappings before pagetable mapping

2021-01-12 Thread Jia He
There is a 10s stall in idmap_kpti_install_ng_mappings when kernel boots on a Ampere EMAG server. Commit f992b4dfd58b ("arm64: kpti: Add ->enable callback to remap swapper using nG mappings") updates the nG bit runtime if kpti is required. But things get worse if rodata=full in map_mem().