diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2017-01-17 15:04:59 +0100 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-01-17 15:04:59 +0100 |
commit | 1b1973ef9a6a951903c1d7701f0c420b27e77cf3 (patch) | |
tree | afcfd18b45a7dc163cce3e77a8ee9ec6edf04720 /arch/arm64/include | |
parent | 49def1853334396f948dcb4cedb9347abb318df5 (diff) | |
parent | 1193e6aeecb36c74c48c7cd0f641acbbed9ddeef (diff) |
Merge tag 'kvm-arm-for-4.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm
KVM/ARM updates for 4.10-rc4
- Fix for timer setup on VHE machines
- Drop spurious warning when the timer races against
the vcpu running again
- Prevent a vgic deadlock when the initialization fails
Diffstat (limited to 'arch/arm64/include')
-rw-r--r-- | arch/arm64/include/asm/virt.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index fea10736b11f..439f6b5d31f6 100644 --- a/arch/arm64/include/asm/virt.h +++ b/arch/arm64/include/asm/virt.h @@ -47,6 +47,7 @@ #include <asm/ptrace.h> #include <asm/sections.h> #include <asm/sysreg.h> +#include <asm/cpufeature.h> /* * __boot_cpu_mode records what mode CPUs were booted in. @@ -80,6 +81,14 @@ static inline bool is_kernel_in_hyp_mode(void) return read_sysreg(CurrentEL) == CurrentEL_EL2; } +static inline bool has_vhe(void) +{ + if (cpus_have_const_cap(ARM64_HAS_VIRT_HOST_EXTN)) + return true; + + return false; +} + #ifdef CONFIG_ARM64_VHE extern void verify_cpu_run_el(void); #else |