This source file includes following definitions.
- __kvm_tlb_flush_vmid
- __kvm_tlb_flush_vmid_ipa
- __kvm_tlb_flush_local_vmid
- __kvm_flush_vm_context
1
2
3
4
5
6
7
8
9
10 #include <asm/kvm_hyp.h>
11 #include <asm/kvm_mmu.h>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 void __hyp_text __kvm_tlb_flush_vmid(struct kvm *kvm)
28 {
29 dsb(ishst);
30
31
32 kvm = kern_hyp_va(kvm);
33 write_sysreg(kvm_get_vttbr(kvm), VTTBR);
34 isb();
35
36 write_sysreg(0, TLBIALLIS);
37 dsb(ish);
38 isb();
39
40 write_sysreg(0, VTTBR);
41 }
42
43 void __hyp_text __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
44 {
45 __kvm_tlb_flush_vmid(kvm);
46 }
47
48 void __hyp_text __kvm_tlb_flush_local_vmid(struct kvm_vcpu *vcpu)
49 {
50 struct kvm *kvm = kern_hyp_va(kern_hyp_va(vcpu)->kvm);
51
52
53 write_sysreg(kvm_get_vttbr(kvm), VTTBR);
54 isb();
55
56 write_sysreg(0, TLBIALL);
57 dsb(nsh);
58 isb();
59
60 write_sysreg(0, VTTBR);
61 }
62
63 void __hyp_text __kvm_flush_vm_context(void)
64 {
65 write_sysreg(0, TLBIALLNSNHIS);
66 write_sysreg(0, ICIALLUIS);
67 dsb(ish);
68 }