From: kernel test robot <lkp@intel.com>
To: Ackerley Tng <ackerleytng@google.com>
Cc: oe-kbuild-all@lists.linux.dev, Ira Weiny <ira.weiny@intel.com>
Subject: [weiny2:ackerley-1g-master 55/75] arch/x86/kvm/../../../virt/kvm/guest_memfd.c:1388:37: warning: left shift count >= width of type
Date: Mon, 19 May 2025 23:55:09 +0800 [thread overview]
Message-ID: <202505192313.V76LPyVV-lkp@intel.com> (raw)
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
reply other threads:[~2025-05-19 15:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202505192313.V76LPyVV-lkp@intel.com \
--to=lkp@intel.com \
--cc=ackerleytng@google.com \
--cc=ira.weiny@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.