All of lore.kernel.org
 help / color / mirror / Atom feed
* [lantianyu:test 18/21] arch/x86/include/asm/mshyperv.h:62:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations
@ 2023-08-16 19:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-16 19:42 UTC (permalink / raw)
  To: Tianyu Lan; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/lantianyu/linux test
head:   f5c4c5f104612a69401a5343609c6f939716896a
commit: 21ff4de070a797f04aafc8cf608d3b4dbc67aa81 [18/21] x86/hyperv: Use vmmcall to implement Hyper-V hypercall in sev-snp enlightened guest
config: x86_64-buildonly-randconfig-r001-20230817 (https://download.01.org/0day-ci/archive/20230817/202308170331.IdBMI6ij-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/20230817/202308170331.IdBMI6ij-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/202308170331.IdBMI6ij-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/hv/channel_mgmt.c:23:
>> arch/x86/include/asm/mshyperv.h:62:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
   arch/x86/include/asm/mshyperv.h:114:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
   arch/x86/include/asm/mshyperv.h:165:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
>> arch/x86/include/asm/mshyperv.h:265:13: error: conflicting types for 'hv_isolation_type_en_snp'
   extern bool hv_isolation_type_en_snp(void);
               ^
   arch/x86/include/asm/mshyperv.h:62:6: note: previous implicit declaration is here
           if (hv_isolation_type_en_snp()) {
               ^
   4 errors generated.
--
   In file included from drivers/hv/vmbus_drv.c:40:
>> arch/x86/include/asm/mshyperv.h:62:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
   arch/x86/include/asm/mshyperv.h:114:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
   arch/x86/include/asm/mshyperv.h:165:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           if (hv_isolation_type_en_snp()) {
               ^
>> arch/x86/include/asm/mshyperv.h:265:13: error: conflicting types for 'hv_isolation_type_en_snp'
   extern bool hv_isolation_type_en_snp(void);
               ^
   arch/x86/include/asm/mshyperv.h:62:6: note: previous implicit declaration is here
           if (hv_isolation_type_en_snp()) {
               ^
   drivers/hv/vmbus_drv.c:1910:42: warning: shift count >= width of type [-Wshift-count-overflow]
           dma_set_mask(&child_device_obj->device, DMA_BIT_MASK(64));
                                                   ^~~~~~~~~~~~~~~~
   include/linux/dma-mapping.h:77:54: note: expanded from macro 'DMA_BIT_MASK'
   #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                                        ^ ~~~
   1 warning and 4 errors generated.


vim +/hv_isolation_type_en_snp +62 arch/x86/include/asm/mshyperv.h

    54	
    55	static inline u64 hv_do_hypercall(u64 control, void *input, void *output)
    56	{
    57		u64 input_address = input ? virt_to_phys(input) : 0;
    58		u64 output_address = output ? virt_to_phys(output) : 0;
    59		u64 hv_status;
    60	
    61	#ifdef CONFIG_X86_64
  > 62		if (hv_isolation_type_en_snp()) {
    63			__asm__ __volatile__("mov %4, %%r8\n"
    64					     "vmmcall"
    65					     : "=a" (hv_status), ASM_CALL_CONSTRAINT,
    66					       "+c" (control), "+d" (input_address)
    67					     :  "r" (output_address)
    68					     : "cc", "memory", "r8", "r9", "r10", "r11");
    69		} else {
    70			if (!hv_hypercall_pg)
    71				return U64_MAX;
    72	
    73			__asm__ __volatile__("mov %4, %%r8\n"
    74					     CALL_NOSPEC
    75					     : "=a" (hv_status), ASM_CALL_CONSTRAINT,
    76					       "+c" (control), "+d" (input_address)
    77					     :  "r" (output_address),
    78						THUNK_TARGET(hv_hypercall_pg)
    79					     : "cc", "memory", "r8", "r9", "r10", "r11");
    80		}
    81	#else
    82		u32 input_address_hi = upper_32_bits(input_address);
    83		u32 input_address_lo = lower_32_bits(input_address);
    84		u32 output_address_hi = upper_32_bits(output_address);
    85		u32 output_address_lo = lower_32_bits(output_address);
    86	
    87		if (!hv_hypercall_pg)
    88			return U64_MAX;
    89	
    90		__asm__ __volatile__(CALL_NOSPEC
    91				     : "=A" (hv_status),
    92				       "+c" (input_address_lo), ASM_CALL_CONSTRAINT
    93				     : "A" (control),
    94				       "b" (input_address_hi),
    95				       "D"(output_address_hi), "S"(output_address_lo),
    96				       THUNK_TARGET(hv_hypercall_pg)
    97				     : "cc", "memory");
    98	#endif /* !x86_64 */
    99		return hv_status;
   100	}
   101	

-- 
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:[~2023-08-16 19:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 19:42 [lantianyu:test 18/21] arch/x86/include/asm/mshyperv.h:62:6: error: call to undeclared function 'hv_isolation_type_en_snp'; ISO C99 and later do not support implicit function declarations 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.