From: kernel test robot <lkp@intel.com>
To: Isaku Yamahata <isaku.yamahata@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Sean Christopherson <sean.j.christopherson@intel.com>
Subject: [intel-tdx:kvm-upstream 87/190] arch/x86/include/asm/tdx.h:90:77: warning: shift count >= width of type
Date: Thu, 10 Aug 2023 03:40:56 +0800 [thread overview]
Message-ID: <202308100303.chmc1FIU-lkp@intel.com> (raw)
tree: https://github.com/intel/tdx.git kvm-upstream
head: 57f9d69e4c57a27ce959757603a99361d8875f80
commit: f9069bd76c0b0c3d6da09b6d6f18f447e1a33605 [87/190] KVM: TDX: Add C wrapper functions for SEAMCALLs to the TDX module
config: i386-randconfig-r014-20230809 (https://download.01.org/0day-ci/archive/20230810/202308100303.chmc1FIU-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230810/202308100303.chmc1FIU-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/202308100303.chmc1FIU-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/asm-offsets.c:22:
>> arch/x86/include/asm/tdx.h:90:77: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
In file included from arch/x86/kernel/asm-offsets.c:22:
arch/x86/include/asm/tdx.h:91:81: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
In file included from arch/x86/kernel/asm-offsets.c:22:
arch/x86/include/asm/tdx.h:92:87: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall_saved_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
3 warnings generated.
--
In file included from arch/x86/kernel/asm-offsets.c:22:
>> arch/x86/include/asm/tdx.h:90:77: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
In file included from arch/x86/kernel/asm-offsets.c:22:
arch/x86/include/asm/tdx.h:91:81: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
In file included from arch/x86/kernel/asm-offsets.c:22:
arch/x86/include/asm/tdx.h:92:87: warning: shift count >= width of type [-Wshift-count-overflow]
static inline u64 __seamcall_saved_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
^~~~~~~~~~~~~~~
arch/x86/include/asm/tdx.h:25:28: note: expanded from macro 'TDX_SEAMCALL_UD'
#define TDX_SEAMCALL_UD (TDX_SW_ERROR | X86_TRAP_UD)
^~~~~~~~~~~~
arch/x86/include/asm/tdx.h:21:25: note: expanded from macro 'TDX_SW_ERROR'
#define TDX_SW_ERROR (TDX_ERROR | GENMASK_ULL(47, 40))
^~~~~~~~~
arch/x86/include/asm/tdx.h:20:21: note: expanded from macro 'TDX_ERROR'
#define TDX_ERROR _BITUL(63)
^~~~~~~~~~
include/uapi/linux/const.h:28:27: note: expanded from macro '_BITUL'
#define _BITUL(x) (_UL(1) << (x))
^ ~~~
3 warnings generated.
vim +90 arch/x86/include/asm/tdx.h
79
80 #ifdef CONFIG_INTEL_TDX_HOST
81 u64 __seamcall(u64 fn, struct tdx_module_args *args);
82 u64 __seamcall_ret(u64 fn, struct tdx_module_args *args);
83 u64 __seamcall_saved_ret(u64 fn, struct tdx_module_args *args);
84 bool platform_tdx_enabled(void);
85 int tdx_cpu_enable(void);
86 int tdx_enable(void);
87 void tdx_reset_memory(void);
88 bool tdx_is_private_mem(unsigned long phys);
89 #else
> 90 static inline u64 __seamcall(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
91 static inline u64 __seamcall_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
92 static inline u64 __seamcall_saved_ret(u64 fn, struct tdx_module_args *args) { return TDX_SEAMCALL_UD; }
93 static inline bool platform_tdx_enabled(void) { return false; }
94 static inline int tdx_cpu_enable(void) { return -ENODEV; }
95 static inline int tdx_enable(void) { return -ENODEV; }
96 static inline void tdx_reset_memory(void) { }
97 static inline bool tdx_is_private_mem(unsigned long phys) { return false; }
98 #endif /* CONFIG_INTEL_TDX_HOST */
99
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-08-09 19:41 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=202308100303.chmc1FIU-lkp@intel.com \
--to=lkp@intel.com \
--cc=isaku.yamahata@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sean.j.christopherson@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