arm64: KVM: Switch vgic save/restore to alternative_insn
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 12 Jun 2015 11:06:37 +0000 (12:06 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 12 Jun 2015 14:12:08 +0000 (15:12 +0100)
commit8a14849b4a355278f0b7baf6e2da7dc7144a23e8
tree2d674e0345a876b1c0008c644c08e562c8cf8c16
parent94a9e04aa16abd1194d9b4158c618ba87f5d01e6
arm64: KVM: Switch vgic save/restore to alternative_insn

So far, we configured the world-switch by having a small array
of pointers to the save and restore functions, depending on the
GIC used on the platform.

Loading these values each time is a bit silly (they never change),
and it makes sense to rely on the instruction patching instead.

This leads to a nice cleanup of the code.

Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kvm/hyp.S
virt/kvm/arm/vgic.c