Skip to content

Commit ce6f8f0

Browse files
author
Marc Zyngier
committed
KVM: arm64: Use cpus_have_final_cap for has_vhe()
By the time we start using the has_vhe() helper, we have long discovered whether we are running VHE or not. It thus makes sense to use cpus_have_final_cap() instead of cpus_have_const_cap(), which leads to a small text size reduction. Signed-off-by: Marc Zyngier <[email protected]> Acked-by: David Brazdil <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c6fe89f commit ce6f8f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/include/asm/virt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static inline bool is_kernel_in_hyp_mode(void)
8585

8686
static __always_inline bool has_vhe(void)
8787
{
88-
if (cpus_have_const_cap(ARM64_HAS_VIRT_HOST_EXTN))
88+
if (cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN))
8989
return true;
9090

9191
return false;

0 commit comments

Comments
 (0)