summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic.c
diff options
context:
space:
mode:
authorEric Auger2015-12-21 18:09:38 +0100
committerChristoffer Dall2016-05-20 15:40:06 +0200
commitad275b8bb1e659b14120174d87e3c1fdc22e9978 (patch)
tree78bbd8ed5653836ccd931323819ec1f57b793573 /virt/kvm/arm/vgic/vgic.c
parentKVM: arm/arm64: vgic-new: vgic_init: implement vgic_create (diff)
downloadkernel-qcow2-linux-ad275b8bb1e659b14120174d87e3c1fdc22e9978.tar.gz
kernel-qcow2-linux-ad275b8bb1e659b14120174d87e3c1fdc22e9978.tar.xz
kernel-qcow2-linux-ad275b8bb1e659b14120174d87e3c1fdc22e9978.zip
KVM: arm/arm64: vgic-new: vgic_init: implement vgic_init
This patch allocates and initializes the data structures used to model the vgic distributor and virtual cpu interfaces. At that stage the number of IRQs and number of virtual CPUs is frozen. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.c')
-rw-r--r--virt/kvm/arm/vgic/vgic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c
index 12ae84b4931f..331885528ead 100644
--- a/virt/kvm/arm/vgic/vgic.c
+++ b/virt/kvm/arm/vgic/vgic.c
@@ -257,6 +257,10 @@ static int vgic_update_irq_pending(struct kvm *kvm, int cpuid,
trace_vgic_update_irq_pending(cpuid, intid, level);
+ ret = vgic_lazy_init(kvm);
+ if (ret)
+ return ret;
+
vcpu = kvm_get_vcpu(kvm, cpuid);
if (!vcpu && intid < VGIC_NR_PRIVATE_IRQS)
return -EINVAL;