Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bradley Morgan <brads@mainlining.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	James Morse <james.morse@arm.com>, Marc Zyngier <maz@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] arm64: hibernate: dust off the suspend/cleanup rework
Date: Wed, 02 Sep 2026 14:51:22 +0100	[thread overview]
Message-ID: <B23E199A-2D3D-48B4-A7E9-9664371A7361@mainlining.org> (raw)
In-Reply-To: <apgpnjnJ4suhHh-v@J2N7QTR9R3.cambridge.arm.com>

On 2 September 2026 14:50:22 BST, Mark Rutland <mark.rutland@arm.com>
wrote:
>On Tue, Aug 25, 2026 at 08:58:32PM +0000, Bradley Morgan wrote:
>> This comes out of the hibernate resume discussion where Will asked if
>> the restored kernel's hyp vectors are reinstalled before we come back
>> from swsusp_arch_suspend() and free the reserved pages. Rather than
>> answer with a one off fix, this series reworks resume to look like a
>> resume from idle, which makes the answer fall out on its own.
>> 
>> The series leans on Mark Rutland's old work for inspiration, he had the
>> same end goal in a branch from back then:
>> 
>>  
>https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/suspend/cleanup
>
>Most of the series seems to be a rebased of those patches, just with
>paraphrased commit messages and my S-o-B lines dropped. As commented on
>patch 4, I do not think that is appropriate.

Same question as patch 2

If you want your S-O-B added, ok fine, but yeah.

Do you think this series itself is good? 

>
>I'll take a more in-depth look shortly.

thanks!

>
>Catalin, Will, for the moment please do not pick these up.
>
>Mark.
>
>> The short answer to the question: yes, but only because the rework makes
>> resume look like a resume from idle. We enter cpu_resume() at the
>highest
>> available EL with the MMU off, and the resumed kernel installs its own
>> hyp stub vectors into VBAR_EL2 through init_kernel_el() before anything
>> else runs, so by the time swsusp_free() releases the trans_pgd copies
>> nothing points at them anymore.
>> 
>> The series is structured so the first patch stands alone as a stable
>> worthy fix for the missing hvc arguments. The rest is the cleanup: the
>> stale init_kernel_el() comment gets corrected, MTE tag pages get freed
>> after save instead of leaking on failed hibernates, the fragile
>> _cpu_resume() calling convention gets split, and the last patch reworks
>> hibernate to use the regular cpu_resume() logic end to end.
>> 
>> Everything object compiles and passes checkpatch and sparse. I could not
>> boot or run a hibernate cycle on real hardware here, so that still wants
>> doing before anyone gets excited.
>> 
>> Bradley Morgan (7):
>>   arm64: hibernate: pass HVC_SET_VECTORS args to the resume hvc
>>   arm64: head: correct comment for init_kernel_el()
>>   arm64: hibernate: free MTE tag pages after saving
>>   arm64: hibernate: fix _cpu_resume() calling convention
>>   arm64: hibernate: use dcache_by_myline_op
>>   arm64: hibernate: only clean to PoC
>>   arm64: hibernate: use regular cpu_resume() logic
>> 
>>  arch/arm64/include/asm/suspend.h  |  1 -
>>  arch/arm64/kernel/head.S          |  6 +--
>>  arch/arm64/kernel/hibernate-asm.S | 87 +++++++++++++++++++------------
>>  arch/arm64/kernel/hibernate.c     | 66 +++++++++++------------
>>  arch/arm64/kernel/sleep.S         |  6 +--
>>  5 files changed, 88 insertions(+), 78 deletions(-)
>> 
>> -- 
>> 2.47.3

--- Thanks!
https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@grrlz.net/


  reply	other threads:[~2026-09-02 13:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25 20:58 [PATCH 0/7] arm64: hibernate: dust off the suspend/cleanup rework Bradley Morgan
2026-08-25 20:58 ` [PATCH 1/7] arm64: hibernate: pass HVC_SET_VECTORS args to the resume hvc Bradley Morgan
2026-08-25 20:58 ` [PATCH 2/7] arm64: head: correct comment for init_kernel_el() Bradley Morgan
2026-09-02 13:46   ` Mark Rutland
2026-09-02 13:49     ` Bradley Morgan
2026-09-02 13:58       ` Mark Rutland
2026-09-02 14:01         ` Bradley Morgan
2026-08-25 20:58 ` [PATCH 3/7] arm64: hibernate: free MTE tag pages after saving Bradley Morgan
2026-08-25 20:58 ` [PATCH 4/7] arm64: hibernate: fix _cpu_resume() calling convention Bradley Morgan
2026-08-25 20:58 ` [PATCH 5/7] arm64: hibernate: use dcache_by_myline_op Bradley Morgan
2026-08-25 20:58 ` [PATCH 6/7] arm64: hibernate: only clean to PoC Bradley Morgan
2026-08-25 20:58 ` [PATCH 7/7] arm64: hibernate: use regular cpu_resume() logic Bradley Morgan
2026-08-28 10:32 ` [PATCH 0/7] arm64: hibernate: dust off the suspend/cleanup rework Ard Biesheuvel
2026-08-28 11:31   ` Bradley Morgan
2026-09-02 13:50 ` Mark Rutland
2026-09-02 13:51   ` Bradley Morgan [this message]
2026-09-02 14:03     ` Mark Rutland
2026-09-02 14:06       ` Bradley Morgan
2026-09-03 10:53       ` Will Deacon
2026-09-03 11:26         ` Bradley Morgan
2026-09-03 12:16           ` Will Deacon

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=B23E199A-2D3D-48B4-A7E9-9664371A7361@mainlining.org \
    --to=brads@mainlining.org \
    --cc=ardb@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=will@kernel.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