diff options
author | Will Deacon <will@kernel.org> | 2020-05-28 18:02:51 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-05-28 18:02:51 +0100 |
commit | c350717ec7de67daad26d996efe7f3d97d95aa9c (patch) | |
tree | d52adde14dec02a415ef4a255027997c160452bc /arch/arm64/include/asm/kvm_hyp.h | |
parent | d27865279f12035c730818aa1a0280fada866a37 (diff) | |
parent | fe677be989146b8a8c0f26fe626c6567c4cd3837 (diff) | |
download | linux-c350717ec7de67daad26d996efe7f3d97d95aa9c.tar.gz linux-c350717ec7de67daad26d996efe7f3d97d95aa9c.tar.bz2 linux-c350717ec7de67daad26d996efe7f3d97d95aa9c.zip |
Merge branch 'for-next/kvm/errata' into for-next/core
KVM CPU errata rework
(Andrew Scull and Marc Zyngier)
* for-next/kvm/errata:
KVM: arm64: Move __load_guest_stage2 to kvm_mmu.h
arm64: Unify WORKAROUND_SPECULATIVE_AT_{NVHE,VHE}
Diffstat (limited to 'arch/arm64/include/asm/kvm_hyp.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_hyp.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/arch/arm64/include/asm/kvm_hyp.h b/arch/arm64/include/asm/kvm_hyp.h index fe57f60f06a8..dcb63bf94105 100644 --- a/arch/arm64/include/asm/kvm_hyp.h +++ b/arch/arm64/include/asm/kvm_hyp.h @@ -10,7 +10,6 @@ #include <linux/compiler.h> #include <linux/kvm_host.h> #include <asm/alternative.h> -#include <asm/kvm_mmu.h> #include <asm/sysreg.h> #define __hyp_text __section(.hyp.text) notrace @@ -88,22 +87,5 @@ void deactivate_traps_vhe_put(void); u64 __guest_enter(struct kvm_vcpu *vcpu, struct kvm_cpu_context *host_ctxt); void __noreturn __hyp_do_panic(unsigned long, ...); -/* - * Must be called from hyp code running at EL2 with an updated VTTBR - * and interrupts disabled. - */ -static __always_inline void __hyp_text __load_guest_stage2(struct kvm *kvm) -{ - write_sysreg(kvm->arch.vtcr, vtcr_el2); - write_sysreg(kvm_get_vttbr(kvm), vttbr_el2); - - /* - * ARM errata 1165522 and 1530923 require the actual execution of the - * above before we can switch to the EL1/EL0 translation regime used by - * the guest. - */ - asm(ALTERNATIVE("nop", "isb", ARM64_WORKAROUND_SPECULATIVE_AT_VHE)); -} - #endif /* __ARM64_KVM_HYP_H__ */ |