Hi Alexey, kernel test robot noticed the following build errors: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on dtor-input/next dtor-input/for-linus linus/master v6.7-rc4 next-20231205] [cannot apply to tip/x86/vmware] [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/Alexey-Makhalov/x86-vmware-Move-common-macros-to-vmware-h/20231202-072821 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20231201232452.220355-7-amakhalov%40vmware.com patch subject: [PATCH v2 6/6] x86/vmware: Add TDX hypercall support config: x86_64-buildonly-randconfig-003-20231203 (https://download.01.org/0day-ci/archive/20231206/202312060350.Paq0JYin-lkp@xxxxxxxxx/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231206/202312060350.Paq0JYin-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202312060350.Paq0JYin-lkp@xxxxxxxxx/ All error/warnings (new ones prefixed by >>): In file included from drivers/gpu/drm/vmwgfx/vmwgfx_msg_x86.h:38, from drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:37: >> arch/x86/include/asm/vmware.h:46:46: warning: 'struct tdx_module_args' declared inside parameter list will not be visible outside of this definition or declaration 46 | extern void vmware_tdx_hypercall_args(struct tdx_module_args *args); | ^~~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h: In function 'vmware_tdx_hypercall': >> arch/x86/include/asm/vmware.h:61:9: error: variable 'args' has initializer but incomplete type 61 | struct tdx_module_args args = { | ^~~~~~~~~~~~~~~ >> arch/x86/include/asm/vmware.h:62:4: error: 'struct tdx_module_args' has no member named 'r10' 62 | .r10 = VMWARE_TDX_VENDOR_LEAF, | ^~~ >> arch/x86/include/asm/vmware.h:43:32: warning: excess elements in struct initializer 43 | #define VMWARE_TDX_VENDOR_LEAF 0x1AF7E4909ULL | ^~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h:62:10: note: in expansion of macro 'VMWARE_TDX_VENDOR_LEAF' 62 | .r10 = VMWARE_TDX_VENDOR_LEAF, | ^~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h:43:32: note: (near initialization for 'args') 43 | #define VMWARE_TDX_VENDOR_LEAF 0x1AF7E4909ULL | ^~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h:62:10: note: in expansion of macro 'VMWARE_TDX_VENDOR_LEAF' 62 | .r10 = VMWARE_TDX_VENDOR_LEAF, | ^~~~~~~~~~~~~~~~~~~~~~ >> arch/x86/include/asm/vmware.h:63:4: error: 'struct tdx_module_args' has no member named 'r11' 63 | .r11 = VMWARE_TDX_HCALL_FUNC, | ^~~ arch/x86/include/asm/vmware.h:44:32: warning: excess elements in struct initializer 44 | #define VMWARE_TDX_HCALL_FUNC 1 | ^ arch/x86/include/asm/vmware.h:63:10: note: in expansion of macro 'VMWARE_TDX_HCALL_FUNC' 63 | .r11 = VMWARE_TDX_HCALL_FUNC, | ^~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h:44:32: note: (near initialization for 'args') 44 | #define VMWARE_TDX_HCALL_FUNC 1 | ^ arch/x86/include/asm/vmware.h:63:10: note: in expansion of macro 'VMWARE_TDX_HCALL_FUNC' 63 | .r11 = VMWARE_TDX_HCALL_FUNC, | ^~~~~~~~~~~~~~~~~~~~~ >> arch/x86/include/asm/vmware.h:64:4: error: 'struct tdx_module_args' has no member named 'r12' 64 | .r12 = VMWARE_HYPERVISOR_MAGIC, | ^~~ arch/x86/include/asm/vmware.h:31:34: warning: excess elements in struct initializer 31 | #define VMWARE_HYPERVISOR_MAGIC 0x564D5868U | ^~~~~~~~~~~ arch/x86/include/asm/vmware.h:64:10: note: in expansion of macro 'VMWARE_HYPERVISOR_MAGIC' 64 | .r12 = VMWARE_HYPERVISOR_MAGIC, | ^~~~~~~~~~~~~~~~~~~~~~~ arch/x86/include/asm/vmware.h:31:34: note: (near initialization for 'args') 31 | #define VMWARE_HYPERVISOR_MAGIC 0x564D5868U | ^~~~~~~~~~~ arch/x86/include/asm/vmware.h:64:10: note: in expansion of macro 'VMWARE_HYPERVISOR_MAGIC' 64 | .r12 = VMWARE_HYPERVISOR_MAGIC, | ^~~~~~~~~~~~~~~~~~~~~~~ >> arch/x86/include/asm/vmware.h:65:4: error: 'struct tdx_module_args' has no member named 'r13' 65 | .r13 = cmd, | ^~~ arch/x86/include/asm/vmware.h:65:10: warning: excess elements in struct initializer 65 | .r13 = cmd, | ^~~ arch/x86/include/asm/vmware.h:65:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:66:4: error: 'struct tdx_module_args' has no member named 'rbx' 66 | .rbx = in1, | ^~~ arch/x86/include/asm/vmware.h:66:10: warning: excess elements in struct initializer 66 | .rbx = in1, | ^~~ arch/x86/include/asm/vmware.h:66:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:67:4: error: 'struct tdx_module_args' has no member named 'rdx' 67 | .rdx = in3, | ^~~ arch/x86/include/asm/vmware.h:67:10: warning: excess elements in struct initializer 67 | .rdx = in3, | ^~~ arch/x86/include/asm/vmware.h:67:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:68:4: error: 'struct tdx_module_args' has no member named 'rsi' 68 | .rsi = in4, | ^~~ arch/x86/include/asm/vmware.h:68:10: warning: excess elements in struct initializer 68 | .rsi = in4, | ^~~ arch/x86/include/asm/vmware.h:68:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:69:4: error: 'struct tdx_module_args' has no member named 'rdi' 69 | .rdi = in5, | ^~~ arch/x86/include/asm/vmware.h:69:10: warning: excess elements in struct initializer 69 | .rdi = in5, | ^~~ arch/x86/include/asm/vmware.h:69:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:70:4: error: 'struct tdx_module_args' has no member named 'r14' 70 | .r14 = in6, | ^~~ arch/x86/include/asm/vmware.h:70:10: warning: excess elements in struct initializer 70 | .r14 = in6, | ^~~ arch/x86/include/asm/vmware.h:70:10: note: (near initialization for 'args') >> arch/x86/include/asm/vmware.h:61:25: error: storage size of 'args' isn't known 61 | struct tdx_module_args args = { | ^~~~ >> arch/x86/include/asm/vmware.h:61:25: warning: unused variable 'args' [-Wunused-variable] vim +/args +61 arch/x86/include/asm/vmware.h 42 > 43 #define VMWARE_TDX_VENDOR_LEAF 0x1AF7E4909ULL 44 #define VMWARE_TDX_HCALL_FUNC 1 45 > 46 extern void vmware_tdx_hypercall_args(struct tdx_module_args *args); 47 48 /* 49 * TDCALL[TDG.VP.VMCALL] uses rax (arg0) and rcx (arg2), while the use of 50 * rbp (arg6) is discouraged by the TDX specification. Therefore, we 51 * remap those registers to r12, r13 and r14, respectively. 52 */ 53 static inline 54 unsigned long vmware_tdx_hypercall(unsigned long cmd, unsigned long in1, 55 unsigned long in3, unsigned long in4, 56 unsigned long in5, unsigned long in6, 57 uint32_t *out1, uint32_t *out2, 58 uint32_t *out3, uint32_t *out4, 59 uint32_t *out5, uint32_t *out6) 60 { > 61 struct tdx_module_args args = { > 62 .r10 = VMWARE_TDX_VENDOR_LEAF, > 63 .r11 = VMWARE_TDX_HCALL_FUNC, > 64 .r12 = VMWARE_HYPERVISOR_MAGIC, > 65 .r13 = cmd, > 66 .rbx = in1, > 67 .rdx = in3, > 68 .rsi = in4, > 69 .rdi = in5, > 70 .r14 = in6, 71 }; 72 73 vmware_tdx_hypercall_args(&args); 74 75 if (out1) 76 *out1 = args.rbx; 77 if (out2) 78 *out2 = args.r13; 79 if (out3) 80 *out3 = args.rdx; 81 if (out4) 82 *out4 = args.rsi; 83 if (out5) 84 *out5 = args.rdi; 85 if (out6) 86 *out6 = args.r14; 87 88 return args.r12; 89 } 90 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki