Re: [PATCH v3 3/3] vfio/type1: handle DMA map/unmap up to the addressable limit
From: Alex Mastro
Date: Sat Oct 11 2025 - 14:16:05 EST
On Sat, Oct 11, 2025 at 07:57:07PM +0800, kernel test robot wrote:
> >> include/linux/limits.h:25:25: warning: conversion from 'long long unsigned int' to 'dma_addr_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Woverflow]
> 25 | #define U64_MAX ((u64)~0ULL)
> | ^
> drivers/vfio/vfio_iommu_type1.c:1361:28: note: in expansion of macro 'U64_MAX'
> 1361 | iova_end = U64_MAX;
> | ^~~~~~~
I see. I suppose it should be ~(dma_addr_t)0 . I don't see a DMA_ADDR_MAX.