On Fri, Mar 08, 2019 at 10:56:15AM +0800, Baoquan He wrote: > The current code builds identity mapping for real mode treampoline by > borrowing page tables from the direct mapping section if KASLR is > enabled. It will copy present entries of the first PUD table in 4-level > paging mode, or the first P4D table in 5-level paging mode. > > However, there's only a very small area under low 1 MB reserved > for real mode trampoline in reserve_real_mode(). Makes no sense > to build up so large area of mapping for it. Since the randomization > granularity in 4-level is 1 GB, and 512 GB in 5-level, only copying > one PUD entry is enough. > > Hence, only copy one PUD entry of area where physical address 0 > resides. And this is preparation for later changing the randomization > granularity of 5-level paging mode from 512 GB to 1 GB. > > Signed-off-by: Baoquan He <b...@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com> -- Kirill A. Shutemov