Thread (27 messages) 27 messages, 1 author, 2019-10-17

Re: [PATCH v7 00/25] arm64: MMU enabled kexec relocation

flat view

From: Pavel Tatashin <pasha.tatashin@soleen.com>
Date: 2019-10-17 14:26:48
Also in: kexec, linux-mm, lkml

https://lore.kernel.org/lkml/45a2f0b8-5bac-8b5d-d595-f92e9acb27ad@arm.com (local)
quoted
+     /* Map relocation function va == pa */
+     rc = trans_pgd_map_page(&info, trans_ttbr0,  __va(kern_reloc),
+                             kern_reloc, PAGE_KERNEL_EXEC);
+     if (rc)
+             return rc;
James wrote:
You can't do this with the page table helpers. We support platforms
with no memory in range of TTBR0's VA space. See dd006da21646f

You will need some idmapped memory to turn the MMU off on a system
that booted at EL1. This will need to be in a set of page tables
that the helpers can't easily touch - so it should only be a single
page. (like the arch code's existing idmap - although that may
have been overwritten).

(I have a machine where this is a problem, if I get the time I will
have a stab at making hibernate's safe page idmaped).
---

As I understand, there are platforms where TTBR0 cannot include all
physical memory for idmap. However, kexec must have at least one page
idmapped (kimage->control_code_page) to be able to relocate kernel
while MMU is enabled:

I am still trying to fully understand the problem:
CONFIG_ARM64_VA_BITS must be smaller than 48 and physical memory must
start at a high address for this problem to occur.

Why can't we simply decrease T0SZ to cover all physical memory?
Is there a way to reproduce this platform with qemu?

Pasha

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help