diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2013-01-28 10:27:00 -0500 |
---|---|---|
committer | Christoffer Dall <cdall@cs.columbia.edu> | 2013-03-06 18:48:45 -0500 |
commit | 48762767e1c150d58c250650f8202b7d4ad65ec4 (patch) | |
tree | 38ae7af86d7e84a6497121eda2991bedfb442f6a /arch/arm/kvm/interrupts.S | |
parent | 06fe0b73ff17e5d777af1b26f3e227d79c0d6808 (diff) |
ARM: KVM: change kvm_tlb_flush_vmid to kvm_tlb_flush_vmid_ipa
v8 is capable of invalidating Stage-2 by IPA, but v7 is not.
Change kvm_tlb_flush_vmid() to take an IPA parameter, which is
then ignored by the invalidation code (and nuke the whole TLB
as it always did).
This allows v8 to implement a more optimized strategy.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm/interrupts.S')
-rw-r--r-- | arch/arm/kvm/interrupts.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index a8e0c2d85cb5..f7793df62f58 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S | |||
@@ -35,15 +35,18 @@ __kvm_hyp_code_start: | |||
35 | /******************************************************************** | 35 | /******************************************************************** |
36 | * Flush per-VMID TLBs | 36 | * Flush per-VMID TLBs |
37 | * | 37 | * |
38 | * void __kvm_tlb_flush_vmid(struct kvm *kvm); | 38 | * void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa); |
39 | * | 39 | * |
40 | * We rely on the hardware to broadcast the TLB invalidation to all CPUs | 40 | * We rely on the hardware to broadcast the TLB invalidation to all CPUs |
41 | * inside the inner-shareable domain (which is the case for all v7 | 41 | * inside the inner-shareable domain (which is the case for all v7 |
42 | * implementations). If we come across a non-IS SMP implementation, we'll | 42 | * implementations). If we come across a non-IS SMP implementation, we'll |
43 | * have to use an IPI based mechanism. Until then, we stick to the simple | 43 | * have to use an IPI based mechanism. Until then, we stick to the simple |
44 | * hardware assisted version. | 44 | * hardware assisted version. |
45 | * | ||
46 | * As v7 does not support flushing per IPA, just nuke the whole TLB | ||
47 | * instead, ignoring the ipa value. | ||
45 | */ | 48 | */ |
46 | ENTRY(__kvm_tlb_flush_vmid) | 49 | ENTRY(__kvm_tlb_flush_vmid_ipa) |
47 | push {r2, r3} | 50 | push {r2, r3} |
48 | 51 | ||
49 | add r0, r0, #KVM_VTTBR | 52 | add r0, r0, #KVM_VTTBR |
@@ -60,7 +63,7 @@ ENTRY(__kvm_tlb_flush_vmid) | |||
60 | 63 | ||
61 | pop {r2, r3} | 64 | pop {r2, r3} |
62 | bx lr | 65 | bx lr |
63 | ENDPROC(__kvm_tlb_flush_vmid) | 66 | ENDPROC(__kvm_tlb_flush_vmid_ipa) |
64 | 67 | ||
65 | /******************************************************************** | 68 | /******************************************************************** |
66 | * Flush TLBs and instruction caches of all CPUs inside the inner-shareable | 69 | * Flush TLBs and instruction caches of all CPUs inside the inner-shareable |