Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit452d622

Browse files
author
Marc Zyngier
committed
KVM: arm64: Restore missing ISB on nVHE __tlb_switch_to_guest
Commita0e50aa ("KVM: arm64: Factor out stage 2 page tabledata from struct kvm") dropped the ISB after __load_guest_stage2(),only leaving the one that is required when the speculative ATworkaround is in effect.As Andrew points it: "This alternative is 'backwards' to avoid adouble ISB as there is one in __load_guest_stage2 when the workaroundis active."Restore the missing ISB, conditionned on the AT workaround not beingactive.Fixes:a0e50aa ("KVM: arm64: Factor out stage 2 page table data from struct kvm")Reported-by: Andrew Scull <ascull@google.com>Reported-by: Thomas Tai <thomas.tai@oracle.com>Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent620cf45 commit452d622

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
staticvoid__tlb_switch_to_host(structtlb_inv_context*cxt)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp