public inbox for iommu@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jacob Pan <jacob.pan@linux.microsoft.com>,
	linux-kernel@vger.kernel.org,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	Jason Gunthorpe <jgg@nvidia.com>,
	Alex Williamson <alex@shazbot.org>,
	Joerg Roedel <joro@8bytes.org>,
	David Matlack <dmatlack@google.com>,
	Nicolin Chen <nicolinc@nvidia.com>,
	"Tian, Kevin" <kevin.tian@intel.com>, Yi Liu <yi.l.liu@intel.com>,
	Baolu Lu <baolu.lu@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, skhawaja@google.com,
	pasha.tatashin@soleen.com,
	Jacob Pan <jacob.pan@linux.microsoft.com>,
	Jean Philippe-Brucker <jean-philippe@linaro.org>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 08/11] vfio: Enable cdev noiommu mode under iommufd
Date: Sat, 28 Feb 2026 08:18:41 +0800	[thread overview]
Message-ID: <202602280855.WxyIHCy5-lkp@intel.com> (raw)
In-Reply-To: <20260227175247.26103-9-jacob.pan@linux.microsoft.com>

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602280855.WxyIHCy5-lkp@intel.com/

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

  parent reply	other threads:[~2026-02-28  0:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27 17:52 [PATCH 00/11] iommufd: Enable noiommu mode for cdev Jacob Pan
2026-02-27 17:52 ` [PATCH 01/11] iommufd: Support a HWPT without an iommu driver for noiommu Jacob Pan
2026-02-27 17:52 ` [PATCH 02/11] iommufd: Move igroup allocation to a function Jacob Pan
2026-02-27 17:52 ` [PATCH 03/11] iommufd: Allow binding to a noiommu device Jacob Pan
2026-02-27 17:52 ` [PATCH 04/11] iommufd: Add an ioctl IOMMU_IOAS_GET_PA to query PA from IOVA Jacob Pan
2026-02-27 17:52 ` [PATCH 05/11] vfio: Allow null group for noiommu without containers Jacob Pan
2026-02-27 17:52 ` [PATCH 06/11] vfio: Introduce and set noiommu flag on vfio_device Jacob Pan
2026-02-27 17:52 ` [PATCH 07/11] vfio: Update noiommu device detection logic for cdev Jacob Pan
2026-02-27 17:52 ` [PATCH 08/11] vfio: Enable cdev noiommu mode under iommufd Jacob Pan
2026-02-27 22:03   ` kernel test robot
2026-02-28  0:18   ` kernel test robot [this message]
2026-02-28  0:35     ` Jason Gunthorpe
2026-03-05 23:26       ` Jacob Pan
2026-03-05 23:38         ` Jason Gunthorpe
2026-03-12 16:33           ` Jacob Pan
2026-02-28  0:29   ` kernel test robot
2026-02-27 17:52 ` [PATCH 09/11] vfio:selftest: Handle VFIO noiommu cdev Jacob Pan
2026-02-27 17:52 ` [PATCH 10/11] selftests/vfio: Add iommufd noiommu mode selftest for cdev Jacob Pan
2026-02-27 17:52 ` [PATCH 11/11] Doc: Update VFIO NOIOMMU mode Jacob Pan
2026-03-03  0:35 ` [PATCH 00/11] iommufd: Enable noiommu mode for cdev Jason Gunthorpe
2026-03-03 19:13   ` Jacob Pan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202602280855.WxyIHCy5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alex@shazbot.org \
    --cc=baolu.lu@linux.intel.com \
    --cc=dmatlack@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=jacob.pan@linux.microsoft.com \
    --cc=jean-philippe@linaro.org \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolinc@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=robin.murphy@arm.com \
    --cc=skhawaja@google.com \
    --cc=yi.l.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox