Paolo Bonzini <pbonzini@xxxxxxxxxx> writes: > 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". Nice catch, the first one is actually a bug. Will do v2, thanks! -- Vitaly