summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic-mmio.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2015-12-01 14:34:34 +0000
committerChristoffer Dall <christoffer.dall@linaro.org>2016-05-20 15:39:56 +0200
commited9b8cefa91695119e634979db6090d0700a21f8 (patch)
tree20fe920326345da4db161032601cb94830ca4c6f /virt/kvm/arm/vgic/vgic-mmio.c
parented40213ef9b02b0f5e9e1807c45ee45407765a27 (diff)
downloadlinux-stable-ed9b8cefa91695119e634979db6090d0700a21f8.tar.gz
linux-stable-ed9b8cefa91695119e634979db6090d0700a21f8.tar.bz2
linux-stable-ed9b8cefa91695119e634979db6090d0700a21f8.zip
KVM: arm/arm64: vgic-new: Add GICv3 MMIO handling framework
Create a new file called vgic-mmio-v3.c and describe the GICv3 distributor and redistributor registers there. This adds a special macro to deal with the split of SGI/PPI in the redistributor and SPIs in the distributor, which allows us to reuse the existing GICv2 handlers for those registers which are compatible. Also we provide a function to deal with the registration of the two separate redistributor frames per VCPU. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-mmio.c')
-rw-r--r--virt/kvm/arm/vgic/vgic-mmio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic-mmio.c b/virt/kvm/arm/vgic/vgic-mmio.c
index 9de80be4d607..4ef35719fcbe 100644
--- a/virt/kvm/arm/vgic/vgic-mmio.c
+++ b/virt/kvm/arm/vgic/vgic-mmio.c
@@ -478,6 +478,11 @@ int vgic_register_dist_iodev(struct kvm *kvm, gpa_t dist_base_address,
case VGIC_V2:
len = vgic_v2_init_dist_iodev(io_device);
break;
+#ifdef CONFIG_KVM_ARM_VGIC_V3
+ case VGIC_V3:
+ len = vgic_v3_init_dist_iodev(io_device);
+ break;
+#endif
default:
BUG_ON(1);
}