* [PATCH] KVM: arm64: Use cpus_have_final_cap for has_vhe()
@ 2020-05-13 10:38 Marc Zyngier
2020-05-15 11:02 ` David Brazdil
0 siblings, 1 reply; 2+ messages in thread
From: Marc Zyngier @ 2020-05-13 10:38 UTC (permalink / raw)
To: kvm, kvmarm, linux-arm-kernel
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>
---
arch/arm64/include/asm/virt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h
index 61fd26752adc..5051b388c654 100644
--- a/arch/arm64/include/asm/virt.h
+++ b/arch/arm64/include/asm/virt.h
@@ -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;
--
2.20.1
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-15 11:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-13 10:38 [PATCH] KVM: arm64: Use cpus_have_final_cap for has_vhe() Marc Zyngier
2020-05-15 11:02 ` David Brazdil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox