arm/arm64: KVM: vgic: delay vgic allocation until init time
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 8 Jul 2014 11:09:06 +0000 (12:09 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 15:19:23 +0000 (17:19 +0200)
commitb9ca28a414c2e5dfb707bcba625eb76f334c787f
tree48e0857ce42cc1a3fb9966ae0f9af20f2969770c
parentddfab003a2dbff1e226a24860e8f4f91a7d3d131
arm/arm64: KVM: vgic: delay vgic allocation until init time

It is now quite easy to delay the allocation of the vgic tables
until we actually require it to be up and running (when the first
vcpu is kicking around, or someones tries to access the GIC registers).

This allow us to allocate memory for the exact number of CPUs we
have. As nobody configures the number of interrupts just yet,
use a fallback to VGIC_NR_IRQS_LEGACY.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
(cherry picked from commit 4956f2bc1fdee4bc336532f3f34635a8534cedfd)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm/kvm/arm.c
include/kvm/arm_vgic.h
virt/kvm/arm/vgic.c