Skip to content

Commit

Permalink
KVM: arm64: Use cpus_have_final_cap for has_vhe()
Browse files Browse the repository at this point in the history
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 <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Link: https://lore.kernel.org/r/20200513103828.74580-1-maz@kernel.org
  • Loading branch information
Marc Zyngier committed May 16, 2020
1 parent c6fe89f commit ce6f8f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/virt.h
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ static inline bool is_kernel_in_hyp_mode(void)

static __always_inline bool has_vhe(void)
{
if (cpus_have_const_cap(ARM64_HAS_VIRT_HOST_EXTN))
if (cpus_have_final_cap(ARM64_HAS_VIRT_HOST_EXTN))
return true;

return false;

0 comments on commit ce6f8f0

Please sign in to comment.