aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/tlb.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-10-25 13:58:00 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2015-12-14 11:30:42 +0000
commit044ac37d1281fc7b59d5dce4fe979a99369e95f2 (patch)
treedfe0f4cfd2860af11ac6825ba16b082e87a6031e /arch/arm64/kvm/hyp/tlb.c
parentarm64: KVM: Add panic handling (diff)
downloadlinux-dev-044ac37d1281fc7b59d5dce4fe979a99369e95f2.tar.xz
linux-dev-044ac37d1281fc7b59d5dce4fe979a99369e95f2.zip
arm64: KVM: Add compatibility aliases
So far, we've implemented the new world switch with a completely different namespace, so that we could have both implementation compiled in. Let's take things one step further by adding weak aliases that have the same names as the original implementation. The weak attributes allows the new implementation to be overriden by the old one, and everything still work. At a later point, we'll be able to simply drop the old code, and everything will hopefully keep working, thanks to the aliases we have just added. This also saves us repainting all the callers. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/tlb.c')
-rw-r--r--arch/arm64/kvm/hyp/tlb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/tlb.c b/arch/arm64/kvm/hyp/tlb.c
index 6fcb93a03659..5f815cf53a9a 100644
--- a/arch/arm64/kvm/hyp/tlb.c
+++ b/arch/arm64/kvm/hyp/tlb.c
@@ -48,6 +48,9 @@ void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
write_sysreg(0, vttbr_el2);
}
+__alias(__tlb_flush_vmid_ipa)
+void __weak __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa);
+
void __hyp_text __tlb_flush_vmid(struct kvm *kvm)
{
dsb(ishst);
@@ -64,6 +67,9 @@ void __hyp_text __tlb_flush_vmid(struct kvm *kvm)
write_sysreg(0, vttbr_el2);
}
+__alias(__tlb_flush_vmid)
+void __weak __kvm_tlb_flush_vmid(struct kvm *kvm);
+
void __hyp_text __tlb_flush_vm_context(void)
{
dsb(ishst);
@@ -71,3 +77,6 @@ void __hyp_text __tlb_flush_vm_context(void)
"ic ialluis ": : );
dsb(ish);
}
+
+__alias(__tlb_flush_vm_context)
+void __weak __kvm_flush_vm_context(void);