summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/nvhe/hyp-init.S
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-02-12 17:08:07 +0300
committerMarc Zyngier <maz@kernel.org>2021-02-12 17:08:07 +0300
commit6b76d624e64fbb4bcbf1bc81ddbbe9e2432af082 (patch)
treec31149f4be316b2fd6ca0a3acc4f2fd81153654a /arch/arm64/kvm/hyp/nvhe/hyp-init.S
parent5e6b211136a86e3fa6c9d7d3d0dbc4b7df9923b6 (diff)
parentbbc075e01ceac50e0a8353b520544f3089e94e44 (diff)
downloadlinux-6b76d624e64fbb4bcbf1bc81ddbbe9e2432af082.tar.xz
Merge branch 'kvm-arm64/misc-5.12' into kvmarm-master/next
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/hyp-init.S')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/hyp-init.S15
1 files changed, 4 insertions, 11 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
index 31b060a44045..b3915ccb23b0 100644
--- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S
+++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
@@ -55,17 +55,10 @@ __do_hyp_init:
cmp x0, #HVC_STUB_HCALL_NR
b.lo __kvm_handle_stub_hvc
- // We only actively check bits [24:31], and everything
- // else has to be zero, which we check at build time.
-#if (KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) & 0xFFFFFFFF00FFFFFF)
-#error Unexpected __KVM_HOST_SMCCC_FUNC___kvm_hyp_init value
-#endif
-
- ror x0, x0, #24
- eor x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 24) & 0xF)
- ror x0, x0, #4
- eor x0, x0, #((KVM_HOST_SMCCC_FUNC(__kvm_hyp_init) >> 28) & 0xF)
- cbz x0, 1f
+ mov x3, #KVM_HOST_SMCCC_FUNC(__kvm_hyp_init)
+ cmp x0, x3
+ b.eq 1f
+
mov x0, #SMCCC_RET_NOT_SUPPORTED
eret