mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Dave Martin <Dave.Martin@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Jackson Cooper-Driver <Jackson.Cooper-Driver@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] arm64/sme: Restore SMCR on exit from suspend
Date: Tue, 30 Jan 2024 12:25:04 +0000	[thread overview]
Message-ID: <e48c714e-8ea5-49f1-82d3-8d55dc89ce37@sirena.org.uk> (raw)
In-Reply-To: <ZbjVNggOxxoQXitV@e133380.arm.com>

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Tue, Jan 30, 2024 at 10:53:42AM +0000, Dave Martin wrote:
> On Tue, Jan 30, 2024 at 12:02:48AM +0000, Mark Brown wrote:
> > The fields in SMCR_EL1 reset to an architecturally UNKNOWN value. Since we
> > do not otherwise manage the traps configured in this register at runtime we
> > need to reconfigure them after a suspend in case nothing else was kind
> > enough to preserve them for us.

> Are any other regs affected?  

> What about SMPRI_EL1?  That seems to be initialised once and for all in
> cpufeatures, so I'd guess it might be affected.

Ah, yes - we should do that too, thanks.  At present we map SMPRI_EL1
out using EL2 controls and just set it to 0 on init so I keep forgetting
about it, I wrote a few lines of code years ago.

> Also, what about the _EL2 regs if the kernel is resuming at EL2
> (without VHE -- or if SME && !VHE not a thing?)

Yeah, I was somewhat confused about where the EL2 handling was in the
resume path and was hoping that if we weren't just rerunning the initial
setup someone would tell me what I'm missing (which appeared to be what
was happening).

The hardware will always have VHE but we could be running nVHE (eg, for
pKVM) so not using it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2024-01-30 12:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  0:02 [PATCH 0/2] arm64/sme: Fix handling of traps on resume Mark Brown
2024-01-30  0:02 ` [PATCH 1/2] arm64/sme: Restore SMCR on exit from suspend Mark Brown
2024-01-30 10:53   ` Dave Martin
2024-01-30 12:25     ` Mark Brown [this message]
2024-01-30 12:42     ` Mark Brown
2024-01-30  0:02 ` [PATCH 2/2] arm64/sme: Restore SMCR_EL1.EZT0 " Mark Brown
2024-01-30 10:54   ` Dave Martin
2024-01-30 14:34     ` Mark Brown
2024-01-30 15:10       ` Dave Martin

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=e48c714e-8ea5-49f1-82d3-8d55dc89ce37@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Dave.Martin@arm.com \
    --cc=Jackson.Cooper-Driver@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®