ARM: KVM: Support vgic-v3
authorVladimir Murzin <vladimir.murzin@arm.com>
Mon, 12 Sep 2016 14:49:24 +0000 (15:49 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 22 Sep 2016 11:22:21 +0000 (13:22 +0200)
commitacda5430bee4621f218391d0bcfbe4412adb3554
treed279ce897d2666ca9481963dca9fc9aede6e85dd
parenta078bedf17c2e43819fea54bdfd5793845142e3a
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>
14 files changed:
arch/arm/include/asm/kvm_asm.h
arch/arm/include/asm/kvm_host.h
arch/arm/include/asm/kvm_hyp.h
arch/arm/include/uapi/asm/kvm.h
arch/arm/kvm/Makefile
arch/arm/kvm/coproc.c
arch/arm/kvm/hyp/Makefile
arch/arm/kvm/hyp/switch.c
arch/arm64/kvm/Kconfig
include/kvm/arm_vgic.h
virt/kvm/arm/vgic/vgic-kvm-device.c
virt/kvm/arm/vgic/vgic-mmio.c
virt/kvm/arm/vgic/vgic-mmio.h
virt/kvm/arm/vgic/vgic.h