[intel-tdx:guest 72/127] arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device'
From: kernel test robot
Date: Wed Sep 15 2021 - 10:02:47 EST
tree: https://github.com/intel/tdx.git guest
head: 3e3ee9731488f58ed27a7ec4ce674f602de44e73
commit: 1ab75a6ac332c35e871f73765bd531170798b615 [72/127] x86/tdx: Add device filter support for x86 TDX guest platform
config: x86_64-randconfig-c007-20210915 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel/tdx/commit/1ab75a6ac332c35e871f73765bd531170798b615
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx guest
git checkout 1ab75a6ac332c35e871f73765bd531170798b615
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from arch/x86/kvm/../../../virt/kvm/kvm_main.c:18:
In file included from include/linux/kvm_host.h:35:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
>> arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device'
return dev->authorized;
~~~^
include/linux/bitmap.h:13:8: note: forward declaration of 'struct device'
struct device;
^
In file included from arch/x86/kvm/../../../virt/kvm/kvm_main.c:41:
include/linux/mman.h:158:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:135:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from arch/x86/kvm/../../../virt/kvm/coalesced_mmio.c:14:
In file included from include/linux/kvm_host.h:35:
In file included from include/linux/kvm_para.h:5:
In file included from include/uapi/linux/kvm_para.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
>> arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device'
return dev->authorized;
~~~^
include/linux/bitmap.h:13:8: note: forward declaration of 'struct device'
struct device;
^
1 error generated.
--
In file included from drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
>> arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device'
return dev->authorized;
~~~^
include/linux/bitmap.h:13:8: note: forward declaration of 'struct device'
struct device;
^
In file included from drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:17:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
drivers/gpu/drm/i915/gem/i915_gem_object.h:39:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:125:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
--
In file included from drivers/gpu/drm/i915/i915_query.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:36:
In file included from arch/x86/include/asm/hypervisor.h:37:
In file included from arch/x86/include/asm/kvm_para.h:7:
>> arch/x86/include/asm/tdx.h:175:12: error: incomplete definition of type 'struct device'
return dev->authorized;
~~~^
include/linux/bitmap.h:13:8: note: forward declaration of 'struct device'
struct device;
^
In file included from drivers/gpu/drm/i915/i915_query.c:9:
In file included from drivers/gpu/drm/i915/i915_drv.h:84:
In file included from drivers/gpu/drm/i915/gt/intel_engine.h:17:
In file included from drivers/gpu/drm/i915/gt/intel_gt_types.h:18:
In file included from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9:
In file included from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17:
In file included from drivers/gpu/drm/i915/i915_vma.h:34:
drivers/gpu/drm/i915/gem/i915_gem_object.h:39:6: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(size, obj->base.size))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:125:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_query.c:513:7: warning: shift count >= width of type [-Wshift-count-overflow]
if (overflows_type(item.query_id - 1, unsigned long))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_utils.h:125:32: note: expanded from macro 'overflows_type'
(sizeof(x) > sizeof(T) && (x) >> BITS_PER_TYPE(T))
^ ~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
vim +175 arch/x86/include/asm/tdx.h
172
173 static inline bool tdx_guest_authorized(struct device *dev, char *dev_str)
174 {
> 175 return dev->authorized;
176 }
177
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip