Re: [RFC PATCH 3/3] arm64: hibernate: idmap the single page that holds the copy page routines
From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2020-03-20 21:22:38
From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2020-03-20 21:22:38
Hi James, Sorry, for a slow response. Soon, I will send out updated MMU enabled kexec series which will have this work included. I appreciate your help with this.
Today the address it uses for this mapping is arbitrary, but to allow kexec to reuse this code, it needs to be idmapped. To idmap the page we must avoid the kernel helpers that have VA_BITS baked in.
Makes sense.
Convert create_single_mapping() to take a single PA, and idmap it.
I like the idea of using idmap in both places!
The page tables are built in the reverse order to normal using pfn_pte() to stir in any bits between 52:48. T0SZ is always increased to cover 48bits, or 52 if the copy code has bits 52:48 in its PA.
I do not think this will work for kexec case. In hibernate we map only one page, so we can allocate every level from bottom to top, but in kexec we map many pages. So, upper levels might already exist. I think we will need to modify the loop to still go from top to bottom. Otherwise, this work makes sense. I will integrate it into my series. Thank you, Pasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel