aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-07-08 07:09:06 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2014-09-18 21:48:58 -0400
commit4956f2bc1fdee4bc336532f3f34635a8534cedfd (patch)
treee74ef3916edb9b56c71b69108fe310ee66b265ae /arch/arm/kvm
parent5fb66da64064d0cb8dcce4cc8bf4cb1b921b13a0 (diff)
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>
Diffstat (limited to 'arch/arm/kvm')
-rw-r--r--arch/arm/kvm/arm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index c1a11496817b..40bc3df6d87b 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -261,16 +261,9 @@ int kvm_cpu_has_pending_timer(struct kvm_vcpu *vcpu)
261 261
262int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) 262int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
263{ 263{
264 int ret;
265
266 /* Force users to call KVM_ARM_VCPU_INIT */ 264 /* Force users to call KVM_ARM_VCPU_INIT */
267 vcpu->arch.target = -1; 265 vcpu->arch.target = -1;
268 266
269 /* Set up VGIC */
270 ret = kvm_vgic_vcpu_init(vcpu);
271 if (ret)
272 return ret;
273
274 /* Set up the timer */ 267 /* Set up the timer */
275 kvm_timer_vcpu_init(vcpu); 268 kvm_timer_vcpu_init(vcpu);
276 269