arm64: KVM: Preserve RES1 bits in SCTLR_EL2
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 6 Jun 2017 18:08:33 +0000 (19:08 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Sep 2017 17:30:04 +0000 (18:30 +0100)
commit79e1a7e336277c2e47b6844a8b7a9a38cc4f9e9b
tree8c16b92ffd2f883d3b7a5f45b97378f7e273438d
parent5e05d50195dae5c3f126d3be3e338d89c653b422
arm64: KVM: Preserve RES1 bits in SCTLR_EL2

commit d68c1f7fd1b7148dab5fe658321d511998969f2d upstream.

__do_hyp_init has the rather bad habit of ignoring RES1 bits and
writing them back as zero. On a v8.0-8.2 CPU, this doesn't do anything
bad, but may end-up being pretty nasty on future revisions of the
architecture.

Let's preserve those bits so that we don't have to fix this later on.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
[bwh: Backported to 3.16:
 - s/ELx/EL2/
 - Adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/hyp-init.S