summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/kvm_hyp.h
diff options
context:
space:
mode:
authorVladimir Murzin2016-09-12 16:49:24 +0200
committerChristoffer Dall2016-09-22 13:22:21 +0200
commitacda5430bee4621f218391d0bcfbe4412adb3554 (patch)
treed279ce897d2666ca9481963dca9fc9aede6e85dd /arch/arm/include/asm/kvm_hyp.h
parentARM: gic-v3: Introduce 32-to-64-bit mappings for GICv3 cpu registers (diff)
downloadkernel-qcow2-linux-acda5430bee4621f218391d0bcfbe4412adb3554.tar.gz
kernel-qcow2-linux-acda5430bee4621f218391d0bcfbe4412adb3554.tar.xz
kernel-qcow2-linux-acda5430bee4621f218391d0bcfbe4412adb3554.zip
ARM: KVM: Support vgic-v3
This patch allows to build and use vgic-v3 in 32-bit mode. Unfortunately, it can not be split in several steps without extra stubs to keep patches independent and bisectable. For instance, virt/kvm/arm/vgic/vgic-v3.c uses function from vgic-v3-sr.c, handling access to GICv3 cpu interface from the guest requires vgic_v3.vgic_sre to be already defined. It is how support has been done: * handle SGI requests from the guest * report configured SRE on access to GICv3 cpu interface from the guest * required vgic-v3 macros are provided via uapi.h * static keys are used to select GIC backend * to make vgic-v3 build KVM_ARM_VGIC_V3 guard is removed along with the static inlines Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm/include/asm/kvm_hyp.h')
-rw-r--r--arch/arm/include/asm/kvm_hyp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/include/asm/kvm_hyp.h b/arch/arm/include/asm/kvm_hyp.h
index e604ad68a06b..343135ede5fa 100644
--- a/arch/arm/include/asm/kvm_hyp.h
+++ b/arch/arm/include/asm/kvm_hyp.h
@@ -106,6 +106,9 @@ void __vgic_v2_restore_state(struct kvm_vcpu *vcpu);
void __sysreg_save_state(struct kvm_cpu_context *ctxt);
void __sysreg_restore_state(struct kvm_cpu_context *ctxt);
+void __vgic_v3_save_state(struct kvm_vcpu *vcpu);
+void __vgic_v3_restore_state(struct kvm_vcpu *vcpu);
+
void asmlinkage __vfp_save_state(struct vfp_hard_struct *vfp);
void asmlinkage __vfp_restore_state(struct vfp_hard_struct *vfp);
static inline bool __vfp_enabled(void)