]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: arm64: Remove is_protected_kvm_enabled() checks from hypercalls
authorWill Deacon <will@kernel.org>
Mon, 30 Mar 2026 14:48:08 +0000 (15:48 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 30 Mar 2026 15:58:07 +0000 (16:58 +0100)
commit733774b5204553ab5524c0330f262184d9d573f6
treeb2dbbe2338f08a8de0792a8736975d99ad9bfbf7
parent3a81a814437d187ac893b3d937985d6503ff3841
KVM: arm64: Remove is_protected_kvm_enabled() checks from hypercalls

When pKVM is not enabled, the host shouldn't issue pKVM-specific
hypercalls and so there's no point checking for this in the pKVM
hypercall handlers.

Remove the redundant is_protected_kvm_enabled() checks from each
hypercall and instead rejig the hypercall table so that the
pKVM-specific hypercalls are unreachable when pKVM is not being used.

Reviewed-by: Quentin Perret <qperret@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Tested-by: Fuad Tabba <tabba@google.com>
Tested-by: Mostafa Saleh <smostafa@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://patch.msgid.link/20260330144841.26181-8-will@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/kvm/hyp/nvhe/hyp-main.c