Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c
- index ecba058..1cbad86 100644
- --- a/arch/arm64/kvm/hyp/switch.c
- +++ b/arch/arm64/kvm/hyp/switch.c
- @@ -66,7 +66,9 @@ static void __hyp_text __deactivate_traps(struct kvm_vcpu *vcpu)
- static void __hyp_text __activate_vm(struct kvm_vcpu *vcpu)
- {
- - struct kvm *kvm = kern_hyp_va(vcpu->kvm);
- + struct kvm *kvm;
- + dsb(ishst);
- + kvm = kern_hyp_va(vcpu->kvm);
- u64 target_vttbr = kvm->arch.vttbr;
- #ifndef CONFIG_EL1_HYP
- #ifndef CONFIG_SUPPORT_EL1_HYP /* FIXME: what if a kernel uses both configs? */
- @@ -80,6 +82,14 @@ static void __hyp_text __activate_vm(struct kvm_vcpu *vcpu)
- #else
- write_s_sysreg(target_vttbr, S_VTTBR_EL2);
- #endif
- +
- + if ( target_vttbr == kvm->arch.svttbr) {
- + isb();
- + asm volatile("tlbi vmalls12e1is" : : );
- + dsb(ish);
- + isb();
- + }
- +
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement