Re: [PATCH 08/11] vfio: Enable cdev noiommu mode under iommufd
From: kernel test robot
Date: Fri Feb 27 2026 - 19:19:25 EST
Hi Jacob,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v7.0-rc1 next-20260227]
[cannot apply to awilliam-vfio/next awilliam-vfio/for-linus]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jacob-Pan/iommufd-Support-a-HWPT-without-an-iommu-driver-for-noiommu/20260228-020145
base: linus/master
patch link: https://lore.kernel.org/r/20260227175247.26103-9-jacob.pan%40linux.microsoft.com
patch subject: [PATCH 08/11] vfio: Enable cdev noiommu mode under iommufd
config: riscv-randconfig-r134-20260228 (https://download.01.org/0day-ci/archive/20260228/202602280855.WxyIHCy5-lkp@xxxxxxxxx/config)
compiler: riscv32-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260228/202602280855.WxyIHCy5-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602280855.WxyIHCy5-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
In file included from drivers/iommu/generic_pt/fmt/iommu_template.h:36,
from drivers/iommu/generic_pt/fmt/iommu_amdv1.c:15:
drivers/iommu/generic_pt/fmt/amdv1.h: In function 'amdv1pt_install_table':
drivers/iommu/generic_pt/fmt/amdv1.h:255:9: error: implicit declaration of function 'pt_table_install64'; did you mean 'pt_table_install32'? [-Werror=implicit-function-declaration]
return pt_table_install64(pts, entry);
^~~~~~~~~~~~~~~~~~
pt_table_install32
In file included from include/linux/generic_pt/common.h:10,
from drivers/iommu/generic_pt/fmt/iommu_template.h:33,
from drivers/iommu/generic_pt/fmt/iommu_amdv1.c:15:
drivers/iommu/generic_pt/fmt/amdv1.h: In function 'amdv1pt_entry_make_write_dirty':
>> include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
^~
include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:152:18: note: in expansion of macro 'GENMASK'
ulong __mask = GENMASK(((sizeof(*p)) * BITS_PER_BYTE) - 1, 0) \
^~~~~~~
arch/riscv/include/asm/cmpxchg.h:224:3: note: in expansion of macro '__arch_cmpxchg_masked'
__arch_cmpxchg_masked(sc_sfx, ".b" cas_sfx, \
^~~~~~~~~~~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:283:2: note: in expansion of macro '_arch_cmpxchg'
_arch_cmpxchg((ptr), (o), (n), \
^~~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:294:2: note: in expansion of macro 'arch_cmpxchg'
arch_cmpxchg((ptr), (o), (n)); \
^~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:98:23: note: in expansion of macro 'arch_cmpxchg64'
#define raw_cmpxchg64 arch_cmpxchg64
^~~~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:259:9: note: in expansion of macro 'raw_cmpxchg64'
___r = raw_cmpxchg64((_ptr), ___o, (_new)); \
^~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4918:2: note: in expansion of macro 'raw_try_cmpxchg64'
raw_try_cmpxchg64(__ai_ptr, __ai_oldp, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~
drivers/iommu/generic_pt/fmt/amdv1.h:318:9: note: in expansion of macro 'try_cmpxchg64'
return try_cmpxchg64(tablep, &pts->entry, new);
^~~~~~~~~~~~~
>> include/linux/bits.h:49:20: warning: right shift count >= width of type [-Wshift-count-overflow]
type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
^~
include/linux/bits.h:51:24: note: in expansion of macro 'GENMASK_TYPE'
#define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
^~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:152:18: note: in expansion of macro 'GENMASK'
ulong __mask = GENMASK(((sizeof(*p)) * BITS_PER_BYTE) - 1, 0) \
^~~~~~~
arch/riscv/include/asm/cmpxchg.h:230:3: note: in expansion of macro '__arch_cmpxchg_masked'
__arch_cmpxchg_masked(sc_sfx, ".h" cas_sfx, \
^~~~~~~~~~~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:283:2: note: in expansion of macro '_arch_cmpxchg'
_arch_cmpxchg((ptr), (o), (n), \
^~~~~~~~~~~~~
arch/riscv/include/asm/cmpxchg.h:294:2: note: in expansion of macro 'arch_cmpxchg'
arch_cmpxchg((ptr), (o), (n)); \
^~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:98:23: note: in expansion of macro 'arch_cmpxchg64'
#define raw_cmpxchg64 arch_cmpxchg64
^~~~~~~~~~~~~~
include/linux/atomic/atomic-arch-fallback.h:259:9: note: in expansion of macro 'raw_cmpxchg64'
___r = raw_cmpxchg64((_ptr), ___o, (_new)); \
^~~~~~~~~~~~~
include/linux/atomic/atomic-instrumented.h:4918:2: note: in expansion of macro 'raw_try_cmpxchg64'
raw_try_cmpxchg64(__ai_ptr, __ai_oldp, __VA_ARGS__); \
^~~~~~~~~~~~~~~~~
drivers/iommu/generic_pt/fmt/amdv1.h:318:9: note: in expansion of macro 'try_cmpxchg64'
return try_cmpxchg64(tablep, &pts->entry, new);
^~~~~~~~~~~~~
cc1: some warnings being treated as errors
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for IOMMU_PT_AMDV1
Depends on [n]: GENERIC_PT [=y] && IOMMU_PT [=y] && !GENERIC_ATOMIC64 [=y]
Selected by [y]:
- VFIO_NOIOMMU [=y] && VFIO [=y] && VFIO_GROUP [=y]
vim +49 include/linux/bits.h
31299a5e021124 Vincent Mailhol 2025-03-26 35
19408200c09485 Vincent Mailhol 2025-03-26 36 /*
19408200c09485 Vincent Mailhol 2025-03-26 37 * Generate a mask for the specified type @t. Additional checks are made to
19408200c09485 Vincent Mailhol 2025-03-26 38 * guarantee the value returned fits in that type, relying on
19408200c09485 Vincent Mailhol 2025-03-26 39 * -Wshift-count-overflow compiler check to detect incompatible arguments.
19408200c09485 Vincent Mailhol 2025-03-26 40 * For example, all these create build errors or warnings:
19408200c09485 Vincent Mailhol 2025-03-26 41 *
19408200c09485 Vincent Mailhol 2025-03-26 42 * - GENMASK(15, 20): wrong argument order
19408200c09485 Vincent Mailhol 2025-03-26 43 * - GENMASK(72, 15): doesn't fit unsigned long
19408200c09485 Vincent Mailhol 2025-03-26 44 * - GENMASK_U32(33, 15): doesn't fit in a u32
19408200c09485 Vincent Mailhol 2025-03-26 45 */
19408200c09485 Vincent Mailhol 2025-03-26 46 #define GENMASK_TYPE(t, h, l) \
19408200c09485 Vincent Mailhol 2025-03-26 47 ((t)(GENMASK_INPUT_CHECK(h, l) + \
19408200c09485 Vincent Mailhol 2025-03-26 48 (type_max(t) << (l) & \
19408200c09485 Vincent Mailhol 2025-03-26 @49 type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
19408200c09485 Vincent Mailhol 2025-03-26 50
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki