diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-07-08 12:09:01 +0100 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-18 18:48:52 -0700 |
commit | c1bfb577addd4867a82c4f235824a315d5afb94a (patch) | |
tree | 4e2fba53b594691839d2c511862b01c83783e1c2 /arch/arm/kvm | |
parent | 71afaba4a2e98bb7bdeba5078370ab43d46e67a1 (diff) | |
download | linux-c1bfb577addd4867a82c4f235824a315d5afb94a.tar.gz linux-c1bfb577addd4867a82c4f235824a315d5afb94a.tar.bz2 linux-c1bfb577addd4867a82c4f235824a315d5afb94a.zip |
arm/arm64: KVM: vgic: switch to dynamic allocation
So far, all the VGIC data structures are statically defined by the
*maximum* number of vcpus and interrupts it supports. It means that
we always have to oversize it to cater for the worse case.
Start by changing the data structures to be dynamically sizeable,
and allocate them at runtime.
The sizes are still very static though.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/kvm')
-rw-r--r-- | arch/arm/kvm/arm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 88c901cfc75e..c1a11496817b 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -161,6 +161,8 @@ void kvm_arch_destroy_vm(struct kvm *kvm) kvm->vcpus[i] = NULL; } } + + kvm_vgic_destroy(kvm); } int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) @@ -243,6 +245,7 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) { kvm_mmu_free_memory_caches(vcpu); kvm_timer_vcpu_terminate(vcpu); + kvm_vgic_vcpu_destroy(vcpu); kmem_cache_free(kvm_vcpu_cache, vcpu); } |