Re: [PATCH v1 04/11] KVM: x86: use u16 for logical VCPU mask in lapic

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

 



2016-07-01 09:56+0200, Paolo Bonzini:
> On 30/06/2016 22:54, Radim Krčmář wrote:
>> @@ -747,7 +745,7 @@ static inline bool kvm_apic_map_get_dest_lapic(struct kvm *kvm, struct kvm_lapic
>>  			return true;
>>  
>>  		lowest = kvm_vector_to_index(irq->vector, hweight16(*bitmap),
>> -				bitmap, 16);
>> +				(unsigned long *)bitmap, 16);
>>  
> 
> kvm_vector_to_index's last argument is always 16, so we might as well
> omit it and make the third argument u16* too.

The other callsite in kvm_irq_delivery_to_apic() does not pass 16:

  int idx = kvm_vector_to_index(irq->vector, dest_vcpus,
  			dest_vcpu_bitmap, KVM_MAX_VCPUS);

kvm_vector_to_index() uses find_next_bit(), so we would have two casts
if we changed the type.  This patch is not really needed, so I could
drop it instead.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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