From: cdall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] arm64: KVM: Allow unaligned accesses at EL2
Date: Wed, 7 Jun 2017 11:56:46 +0200 [thread overview]
Message-ID: <20170607095646.GD24481@cbox> (raw)
In-Reply-To: <73f039f7-7597-fd34-367c-1cc6fdda3673@arm.com>
On Wed, Jun 07, 2017 at 10:16:29AM +0100, Marc Zyngier wrote:
> On 06/06/17 21:09, Christoffer Dall wrote:
> > On Tue, Jun 06, 2017 at 07:08:34PM +0100, Marc Zyngier wrote:
> >> We currently have the SCTLR_EL2.A bit set, trapping unaligned accesses
> >> at EL2, but we're not really prepared to deal with it. So far, this
> >> has been unnoticed, until GCC 7 started emitting those (in particular
> >> 64bit writes on a 32bit boundary).
> >>
> >> Since the rest of the kernel is pretty happy about that, let's follow
> >> its example and set SCTLR_EL2.A to zero. Modern CPUs don't really
> >> care.
> >
> > Why do we set the A flag via SCTLR_ELx_FLAGS in the first place, only to
> > drop that flag later on for both EL1 and EL2 ?
>
> That flag is always cleared at EL1, never set. Actually, only EL2 uses
> that macro to *set* flags. An alternative would be to do away with the
> macro and use the individual flags, like the 32bit side does.
>
> What do you think?
>
I don't understand why the A bit is part of SCTLR_ELx_FLAGS then? Is it
used as a mask, is that why?
In terms of these patches, I think we should apply these, because they
solve the problem and do the same thing.
Thanks,
-Christoffer
next prev parent reply other threads:[~2017-06-07 9:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 18:08 [PATCH 0/3] arm/arm64: KVM: SCTLR_EL2/HSCTLR setup fixes Marc Zyngier
2017-06-06 18:08 ` [PATCH 1/3] arm64: KVM: Preserve RES1 bits in SCTLR_EL2 Marc Zyngier
2017-06-06 18:08 ` [PATCH 2/3] arm64: KVM: Allow unaligned accesses at EL2 Marc Zyngier
2017-06-06 20:09 ` Christoffer Dall
2017-06-07 9:16 ` Marc Zyngier
2017-06-07 9:56 ` Christoffer Dall [this message]
2017-06-07 10:11 ` Marc Zyngier
2017-06-06 18:08 ` [PATCH 3/3] arm: KVM: Allow unaligned accesses at HYP Marc Zyngier
2017-06-06 20:09 ` Christoffer Dall
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=20170607095646.GD24481@cbox \
--to=cdall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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).