OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jun 2017 13:05:56 +0000 (15:05 +0200)
commitb9824dd75fcf6d9f10e8df08b237948d1802d5fe
tree891d518c9bf410c4cda3a09d49c1eb797f75279d
parent19c9a115085edc6e2f1ee8e7c30600ba2fa932f4
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/sysreg.h
arch/arm64/kvm/hyp-init.S