diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-06-06 19:08:33 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2017-09-15 18:30:04 +0100 |
commit | 79e1a7e336277c2e47b6844a8b7a9a38cc4f9e9b (patch) | |
tree | 8c16b92ffd2f883d3b7a5f45b97378f7e273438d /arch/arm64/include | |
parent | 5e05d50195dae5c3f126d3be3e338d89c653b422 (diff) |
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>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/kvm_arm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index c33a96bac824..243bd77558c3 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -89,6 +89,11 @@ #define SCTLR_EL2_C (1 << 2) #define SCTLR_EL2_A (1 << 1) #define SCTLR_EL2_M 1 + +#define SCTLR_EL2_RES1 ((1 << 4) | (1 << 5) | (1 << 11) | (1 << 16) | \ + (1 << 16) | (1 << 18) | (1 << 22) | (1 << 23) | \ + (1 << 28) | (1 << 29)) + #define SCTLR_EL2_FLAGS (SCTLR_EL2_M | SCTLR_EL2_A | SCTLR_EL2_C | \ SCTLR_EL2_SA | SCTLR_EL2_I) |