linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64: Disable fine grained traps on boot
Date: Thu, 1 Apr 2021 16:48:05 +0100	[thread overview]
Message-ID: <20210401154805.GL4758@sirena.org.uk> (raw)
In-Reply-To: <87sg4aox44.wl-maz@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 1129 bytes --]

On Thu, Apr 01, 2021 at 04:14:35PM +0100, Marc Zyngier wrote:
> On Thu, 01 Apr 2021 13:49:36 +0100,
> Mark Brown <broonie@kernel.org> wrote:

> > +	msr_s	SYS_HFGRTR_EL2, xzr
> > +	msr_s	SYS_HFGITR_EL2, xzr
> > +	msr_s	SYS_HFGWTR_EL2, xzr

> nit: consider grouping SYS_HFGWTR_EL2 and SYS_HFGRTR_EL2 together,
> since they affect the same registers.

Ack, I'd sorted them numerically IIRC.

> > +	mrs	x1, id_aa64pfr0_el1		// AMU traps UNDEF without AMU
> > +	ubfx	x1, x1, #ID_AA64PFR0_AMU_SHIFT, #4
> > +	cbz	x1, .Lskip_fgt_\@

> > +	msr_s	SYS_HAFGRTR_EL2, xzr

> Do we need to document the need for SCR_EL3.FGTEn to be set so that
> these register accesses don't trap? That'd be consistent with what we
> do for other features (PtrAuth, AMU...).

Yes, good point.  We should if this is going in - this is the result of
some other stuff I've been sending to document disabling these on boot,
Will wanted to have code doing that, so I'll pull that into there.  It
does end up being a bit weird that we demand this be enabled so we can
explicitly not use it, but better to do that so we can in future decide
to take advantage of it.

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

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-04-01 15:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 12:49 [PATCH] arm64: Disable fine grained traps on boot Mark Brown
2021-04-01 15:14 ` Marc Zyngier
2021-04-01 15:48   ` Mark Brown [this message]
2021-04-01 17:03     ` Marc Zyngier

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=20210401154805.GL4758@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).