summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2018-12-10 18:53:03 +0000
committerWill Deacon <will.deacon@arm.com>2018-12-10 18:53:52 +0000
commitbc84a2d106beab6000223b569c3bcb9ebf49d9ec (patch)
tree41d5fee0c983a8820478c0c7e812b76be43ed07c /arch/arm64/include/asm/kvm_host.h
parentf357b3a7e17af7736d67d8267edc1ed3d1dd9391 (diff)
parenta457b0f7f50d4d189f0d009617885e4341133e8e (diff)
downloadlinux-stable-bc84a2d106beab6000223b569c3bcb9ebf49d9ec.tar.gz
linux-stable-bc84a2d106beab6000223b569c3bcb9ebf49d9ec.tar.bz2
linux-stable-bc84a2d106beab6000223b569c3bcb9ebf49d9ec.zip
Merge branch 'kvm/cortex-a76-erratum-1165522' into aarch64/for-next/core
Pull in KVM workaround for A76 erratum #116522. Conflicts: arch/arm64/include/asm/cpucaps.h
Diffstat (limited to 'arch/arm64/include/asm/kvm_host.h')
-rw-r--r--arch/arm64/include/asm/kvm_host.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 52fbc823ff8c..9217759afa6b 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -422,7 +422,7 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
}
}
-static inline bool kvm_arch_check_sve_has_vhe(void)
+static inline bool kvm_arch_requires_vhe(void)
{
/*
* The Arm architecture specifies that implementation of SVE
@@ -430,9 +430,13 @@ static inline bool kvm_arch_check_sve_has_vhe(void)
* relies on this when SVE is present:
*/
if (system_supports_sve())
- return has_vhe();
- else
return true;
+
+ /* Some implementations have defects that confine them to VHE */
+ if (cpus_have_cap(ARM64_WORKAROUND_1165522))
+ return true;
+
+ return false;
}
static inline void kvm_arch_hardware_unsetup(void) {}