summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorRadim Krčmář2016-07-12 22:09:30 +0200
committerPaolo Bonzini2016-07-14 09:29:35 +0200
commitaf1bae5497b98cb99d6b0492e6981f060420a00c (patch)
tree1c12ad6dfd42189f9ed58a40f4ddc4913efb177f /arch/x86/kvm/x86.c
parentKVM: x86: bump MAX_VCPUS to 288 (diff)
downloadkernel-qcow2-linux-af1bae5497b98cb99d6b0492e6981f060420a00c.tar.gz
kernel-qcow2-linux-af1bae5497b98cb99d6b0492e6981f060420a00c.tar.xz
kernel-qcow2-linux-af1bae5497b98cb99d6b0492e6981f060420a00c.zip
KVM: x86: bump KVM_MAX_VCPU_ID to 1023
kzalloc was replaced with kvm_kvzalloc to allow non-contiguous areas and rcu had to be modified to cope with it. The practical limit for KVM_MAX_VCPU_ID right now is INT_MAX, but lower value was chosen in case there were bugs. 1023 is sufficient maximum APIC ID for 288 VCPUs. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f0d23622bc4e..a27b33033700 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7927,7 +7927,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
kfree(kvm->arch.vpic);
kfree(kvm->arch.vioapic);
kvm_free_vcpus(kvm);
- kfree(rcu_dereference_check(kvm->arch.apic_map, 1));
+ kvfree(rcu_dereference_check(kvm->arch.apic_map, 1));
kvm_mmu_uninit_vm(kvm);
}