Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: tarunsahu@google.com
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	Pratyush Yadav <pratyush@kernel.org>,
	Mike Rapoport <rppt@kernel.org>,
	will@kernel.org, changyuanl@google.com,
	Alexander Graf <graf@amazon.com>,
	mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org,
	kexec@lists.infradead.org
Subject: Re: QNS: ARM64: Cache coherency while doing Kexec for KHO
Date: Tue, 11 Aug 2026 16:30:31 -0300	[thread overview]
Message-ID: <20260811193031.GA638489@nvidia.com> (raw)
In-Reply-To: <9huzldaczcr4.fsf@tarunix.c.googlers.com>

On Tue, Aug 11, 2026 at 07:19:11PM +0000, tarunsahu@google.com wrote:
> 
> Hi,
> 
> I have a question regarding cache maintenance for Kernel Handover (KHO)
> preserved memory across kexec reboots on arm64.
> 
> During kexec, all other CPUs gets hot-unplugged where they flush all
> of their caches so there will be no issues with any KHO data preserved
> having caches on these CPUs.
> 
> But CPU0 still has not been flushed its D-cache (Is this correct?) and
> it will only do flushing for specific area by kexec_segment_flush().
> 
> So for KHO preserved memory, if its caches still marked dirty on CPU0
> they will not be flushed?
> 
> Is my understanding correct? or AM I missing something?
> Also if this true, This will be a problem?
> 
> PS: Pardon my less knowledge on ARM64 cache coherency.

Yes, I think what you outline is correct, but I don't think it is a
problem.

As long as the CPU cache implementation is physically tagged and
everything kexec runs during boot with paging and caching disabled is
flushed it should be fine.

Once the new kernel comes up and installs a page table with cachable
attributes everything will still be consistent from the CPU's
perspective.

Anything in the new kernel that needs forced coherence, like DMA, will
be doing flushes anyhow.

Jason


      parent reply	other threads:[~2026-08-11 19:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 19:19 QNS: ARM64: Cache coherency while doing Kexec for KHO tarunsahu
2026-08-11 19:23 ` tarunsahu
2026-08-11 19:30 ` Jason Gunthorpe [this message]

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=20260811193031.GA638489@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=changyuanl@google.com \
    --cc=graf@amazon.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=tarunsahu@google.com \
    --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