]> git.itanic.dy.fi Git - linux-stable/commit
arm64: KVM: Allow unaligned accesses at EL2
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 6 Jun 2017 18:08:34 +0000 (19:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:07:39 +0000 (15:07 +0200)
commitd06ca326dd0f93074deee4845c7334d7d4df1cbd
tree6e8b39e47c5ef7ae91c0e261ed8cb6c44df5605b
parentff384c499bf7aea518790b4bafabc2611c2d73a3
arm64: KVM: Allow unaligned accesses at EL2

commit 78fd6dcf11468a5a131b8365580d0c613bcc02cb upstream.

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.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kvm/hyp-init.S