diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-25 11:53:55 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-25 11:53:55 +0300 |
commit | 0fb00d326ffc36844fac0bfefd8644585a86d4a6 (patch) | |
tree | 7fa63f85f0b8485081e3f26c2a808ccc6949885c /virt | |
parent | 17e4bce0ae63c7e03f3c7fa8d80890e7af3d4971 (diff) | |
parent | fd451b90e78c4178bcfc5072f2b2b637500c109a (diff) | |
download | linux-0fb00d326ffc36844fac0bfefd8644585a86d4a6.tar.xz |
Merge tag 'kvm-arm-for-4.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master
KVM/ARM fixes for 4.5-rc6
- Fix per-vcpu vgic bitmap allocation
- Do not give copy random memory on MMIO read
- Fix GICv3 APR register restore order
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/arm/vgic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 043032c6a5a4..00429b392c61 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -1875,8 +1875,8 @@ void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu) static int vgic_vcpu_init_maps(struct kvm_vcpu *vcpu, int nr_irqs) { struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu; - - int sz = (nr_irqs - VGIC_NR_PRIVATE_IRQS) / 8; + int nr_longs = BITS_TO_LONGS(nr_irqs - VGIC_NR_PRIVATE_IRQS); + int sz = nr_longs * sizeof(unsigned long); vgic_cpu->pending_shared = kzalloc(sz, GFP_KERNEL); vgic_cpu->active_shared = kzalloc(sz, GFP_KERNEL); vgic_cpu->pend_act_shared = kzalloc(sz, GFP_KERNEL); |