All of lore.kernel.org
 help / color / mirror / Atom feed
* [weiny2:ackerley-1g-master 55/75] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1388:37: warning: left shift count >= width of type
@ 2025-05-19 15:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-19 15:55 UTC (permalink / raw)
  To: Ackerley Tng; +Cc: oe-kbuild-all, Ira Weiny

tree:   https://github.com/weiny2/linux-kernel.git ackerley-1g-master
head:   773f26b5bef6e4d3094a33605165a5c6ab9aa0f0
commit: 0d68c26c85d69c2365731a23a9f4c392d26ceac7 [55/75] KVM: guest_memfd: Support guestmem_hugetlb as custom allocator
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20250519/202505192313.V76LPyVV-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250519/202505192313.V76LPyVV-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/202505192313.V76LPyVV-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_supports_shared':
   arch/x86/kvm/../../../virt/kvm/guest_memfd.c:904:26: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     904 |         uint64_t flags = (uint64_t)inode->i_private;
         |                          ^
   arch/x86/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_create':
>> arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1388:37: warning: left shift count >= width of type [-Wshift-count-overflow]
    1388 |         (GUESTMEM_HUGETLB_FLAG_MASK << GUESTMEM_HUGETLB_FLAG_SHIFT)
         |                                     ^~
   arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1405:32: note: in expansion of macro 'SUPPORTED_CUSTOM_ALLOCATOR_MASK'
    1405 |                                SUPPORTED_CUSTOM_ALLOCATOR_MASK;
         |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from <command-line>:
   arch/x86/kvm/../../../virt/kvm/guest_memfd.c: In function 'kvm_gmem_bind':
   include/linux/compiler_types.h:557:45: error: call to '__compiletime_assert_680' declared with attribute error: BUILD_BUG_ON failed: sizeof(gfn_t) != sizeof(slot->gmem.pgoff)
     557 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |                                             ^
   include/linux/compiler_types.h:538:25: note: in definition of macro '__compiletime_assert'
     538 |                         prefix ## suffix();                             \
         |                         ^~~~~~
   include/linux/compiler_types.h:557:9: note: in expansion of macro '_compiletime_assert'
     557 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
      39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      50 |         BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
         |         ^~~~~~~~~~~~~~~~
   arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1453:9: note: in expansion of macro 'BUILD_BUG_ON'
    1453 |         BUILD_BUG_ON(sizeof(gfn_t) != sizeof(slot->gmem.pgoff));
         |         ^~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for HUGETLB_PAGE_OPTIMIZE_VMEMMAP
   Depends on [n]: ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP [=n] && SPARSEMEM_VMEMMAP [=n]
   Selected by [y]:
   - GUESTMEM_HUGETLB [=y]


vim +1388 arch/x86/kvm/../../../virt/kvm/guest_memfd.c

  1385	
  1386	/* Mask of bits belonging to allocators and are opaque to guest_memfd. */
  1387	#define SUPPORTED_CUSTOM_ALLOCATOR_MASK \
> 1388		(GUESTMEM_HUGETLB_FLAG_MASK << GUESTMEM_HUGETLB_FLAG_SHIFT)
  1389	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-19 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 15:55 [weiny2:ackerley-1g-master 55/75] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1388:37: warning: left shift count >= width of type kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.