diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-25 09:53:55 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-02-25 09:53:55 +0100 |
commit | 0fb00d326ffc36844fac0bfefd8644585a86d4a6 (patch) | |
tree | 7fa63f85f0b8485081e3f26c2a808ccc6949885c /virt/kvm | |
parent | KVM: x86: MMU: fix ubsan index-out-of-range warning (diff) | |
parent | arm64: KVM: vgic-v3: Restore ICH_APR0Rn_EL2 before ICH_APR1Rn_EL2 (diff) | |
download | linux-0fb00d326ffc36844fac0bfefd8644585a86d4a6.tar.xz linux-0fb00d326ffc36844fac0bfefd8644585a86d4a6.zip |
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/kvm')
-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); |