Re: [PATCH v5 07/18] iommufd: Add IOMMU_HWPT_GET_DIRTY_BITMAP

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

 



On Mon, Oct 23, 2023, at 14:10, Jason Gunthorpe wrote:
> On Mon, Oct 23, 2023 at 10:28:13AM +0100, Joao Martins wrote:
>> > so it's probably
>> > best to add a range check plus type cast, rather than an
>> > expensive div_u64() here.
>> 
>> OK
>
> Just keep it simple, we don't need to optimize for 32 bit. div_u64
> will make the compiler happy.

Fair enough. FWIW, I tried adding just the range check to see
if that would make the compiler turn it into a 32-bit division,
but that didn't work.

Some type of range check might still be good to have for
unrelated reasons.

    Arnd



[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