From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@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, 01 Apr 2021 18:03:09 +0100 [thread overview]
Message-ID: <87h7kqey42.wl-maz@kernel.org> (raw)
In-Reply-To: <20210401154805.GL4758@sirena.org.uk>
On Thu, 01 Apr 2021 16:48:05 +0100,
Mark Brown <broonie@kernel.org> wrote:
>
> 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.
I definitely have plans for this feature right now, as some of the
traps that KVM uses could be minimised using FGT, so I don't believe
the feature will stay unused for too long.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2021-04-01 17:04 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
2021-04-01 17:03 ` Marc Zyngier [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=87h7kqey42.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.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;
as well as URLs for NNTP newsgroup(s).