Re: [PATCH 2/2] KVM: x86: hyperv: optimize sparse VP set processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/10/2018 19:19, Vitaly Kuznetsov wrote:
> +	memset(vp_bitmap, 0, (KVM_MAX_VCPUS / 64) * sizeof(*vp_bitmap));
> +	for_each_set_bit(bank, (unsigned long *)&valid_bank_mask, 64)

This "64" should probably be "KVM_MAX_VCPUS / 64"... and actually both
should be DIV_ROUND_UP(KVM_MAX_VCPUS, 64), so it's better to introduce
something like a "#define KVM_HV_MAX_SPARSE_VCPU_SET_BITS".

Paolo

> +		vp_bitmap[bank] = sparse_banks[sbank++];




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux