Skip to content

Commit e2e1a1c

Browse files
committed
Merge tag 'kvmarm-fixes-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/arm64 fixes for 5.9, take #3 - Fix synchronization of VTTBR update on TLB invalidation for nVHE systems
2 parents b502e6e + 452d622 commit e2e1a1c

File tree

1 file changed

+7
-0
lines changed
  • arch/arm64/kvm/hyp/nvhe

1 file changed

+7
-0
lines changed

arch/arm64/kvm/hyp/nvhe/tlb.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ static void __tlb_switch_to_guest(struct kvm_s2_mmu *mmu,
3131
isb();
3232
}
3333

34+
/*
35+
* __load_guest_stage2() includes an ISB only when the AT
36+
* workaround is applied. Take care of the opposite condition,
37+
* ensuring that we always have an ISB, but not two ISBs back
38+
* to back.
39+
*/
3440
__load_guest_stage2(mmu);
41+
asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT));
3542
}
3643

3744
static void __tlb_switch_to_host(struct tlb_inv_context *cxt)

0 commit comments

Comments
 (0)