Re: [PATCH v9 07/18] arm64: trans_pgd: hibernate: idmap the single page that holds the copy page routines
From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2021-01-23 00:37:02
Also in:
kexec, linux-mm, lkml
On Wed, Apr 29, 2020 at 1:01 PM James Morse [off-list ref] wrote:
Hi Pavel, On 26/03/2020 03:24, Pavel Tatashin wrote:quoted
From: James Morse <james.morse@arm.com> To resume from hibernate, the contents of memory are restored from the swap image. This may overwrite any page, including the running kernel and its page tables. Hibernate copies the code it uses to do the restore into a single page that it knows won't be overwritten, and maps it with page tables built from pages that won't be overwritten. 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. Convert create_single_mapping() to take a single PA, and idmap it. 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. Pasha: The original patch from James inux-arm-kernel/20200115143322.214247-4-james.morse@arm.com-EBROKENLINK The convention is to use a 'Link:' tag in the signed-off area. e.g. 5a3577039cbe
OK Fixed.
quoted
Adopted it to trans_pgd, so it can be commonly used by both Kexec and Hibernate. Some minor clean-ups.Please describe your changes just before your SoB. This means each author sign's off on the stuff above their SoB, and its obvious who made which changes. Search for 'Lucky K Maintainer' in process/submitting-patches.rst for an example.
OK, Fixed. eed the maximum T0SZ.
quoted
+ * + * Returns 0 on success, and -ENOMEM on failure. + * On success trans_ttbr0 contains page table with idmapped page, t0sz is set toquoted
+ * maxumum T0SZ for this page.maxumum
Ok. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel