mbox series

[RFC,0/3] arm64: hibernate: idmap the single page that holds the copy page routines

Message ID 20200115143322.214247-1-james.morse@arm.com (mailing list archive)
Headers show
Series arm64: hibernate: idmap the single page that holds the copy page routines | expand

Message

James Morse Jan. 15, 2020, 2:33 p.m. UTC
Hello,

Pavel T wants the kexec memory-copy to happen with the MMU on to take
advantage of the caches. Hibernate pulls some tricks in this area
which should be re-used.

Kexec needs to turn the MMU off once its done, which needs to be
done from the idmap. Hibernate's memory-copy code doesn't have this
requirement, lets pretend we do.

These patches are an RFC as I don't think they make sense on their
own. The CC list is short for the same reason.


This series adds another idmap that is created during resume from
hibernate. Forcing the T0SZ up to at least 48 bits means this path
can be tested on a 4K/39 or 64K/42 configuration.

Kexec should be able to re-use his to map its copy routines low,
using a 'safe' copy of the linear map in TTBR1.

Tested on Juno and Seattle's magic 4K/39 configuration.
I haven't been able to test this with the models 52bit PA support,
but would be able to test it through kexec.


Thanks,

James Morse (3):
  arm64: mm: Always update TCR_EL1 from __cpu_set_tcr_t0sz()
  arm64: hibernate: Split create_safe_exec_page() and its mapping code
  arm64: hibernate: idmap the single page that holds the copy page
    routines

 arch/arm64/include/asm/mmu_context.h |   7 +-
 arch/arm64/kernel/hibernate.c        | 146 ++++++++++++++-------------
 2 files changed, 77 insertions(+), 76 deletions(-)