linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Tatashin <pasha.tatashin@soleen.com>
To: James Morse <james.morse@arm.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 3/3] arm64: hibernate: idmap the single page that holds the copy page routines
Date: Fri, 20 Mar 2020 17:22:20 -0400	[thread overview]
Message-ID: <CA+CK2bAEyp7Kcc_qEOfchNvyEHSVnjAXD-LB9NGbUOJ_xZV1AQ@mail.gmail.com> (raw)
In-Reply-To: <20200115143322.214247-4-james.morse@arm.com>

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

  reply	other threads:[~2020-03-20 21:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 14:33 [RFC PATCH 0/3] arm64: hibernate: idmap the single page that holds the copy page routines James Morse
2020-01-15 14:33 ` [RFC PATCH 1/3] arm64: mm: Always update TCR_EL1 from __cpu_set_tcr_t0sz() James Morse
2020-01-15 14:33 ` [RFC PATCH 2/3] arm64: hibernate: Split create_safe_exec_page() and its mapping code James Morse
2020-01-15 14:33 ` [RFC PATCH 3/3] arm64: hibernate: idmap the single page that holds the copy page routines James Morse
2020-03-20 21:22   ` Pavel Tatashin [this message]
2020-03-25  9:58     ` James Morse
2020-03-25 13:29       ` Pavel Tatashin
2020-03-25 13:41         ` Pavel Tatashin
2020-03-25 17:08         ` James Morse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+CK2bAEyp7Kcc_qEOfchNvyEHSVnjAXD-LB9NGbUOJ_xZV1AQ@mail.gmail.com \
    --to=pasha.tatashin@soleen.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).