All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Nuno Das Neves <nunodasneves@linux.microsoft.com>,
	linux-hyperv@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	iommu@lists.linux.dev, netdev@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-arch@vger.kernel.org,
	virtualization@lists.linux.dev
Cc: oe-kbuild-all@lists.linux.dev, kys@microsoft.com,
	haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
	catalin.marinas@arm.com, will@kernel.org, luto@kernel.org,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
	seanjc@google.com, pbonzini@redhat.com, peterz@infradead.org,
	daniel.lezcano@linaro.org, joro@8bytes.org, robin.murphy@arm.com,
	davem@davemloft.net, edumazet@google.com
Subject: Re: [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code
Date: Sat, 5 Oct 2024 05:55:22 +0800	[thread overview]
Message-ID: <202410050518.LFXqJEpd-lkp@intel.com> (raw)
In-Reply-To: <1727985064-18362-6-git-send-email-nunodasneves@linux.microsoft.com>

Hi Nuno,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/x86/core]
[also build test ERROR on arm64/for-next/core kvm/queue linus/master v6.12-rc1 next-20241004]
[cannot apply to kvm/linux-next]
[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/Nuno-Das-Neves/hyperv-Move-hv_connection_id-to-hyperv-tlfs-h/20241004-035418
base:   tip/x86/core
patch link:    https://lore.kernel.org/r/1727985064-18362-6-git-send-email-nunodasneves%40linux.microsoft.com
patch subject: [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code
config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20241005/202410050518.LFXqJEpd-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241005/202410050518.LFXqJEpd-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/202410050518.LFXqJEpd-lkp@intel.com/

All errors (new ones prefixed by >>):

>> arch/x86/hyperv/hv_init.c:428:19: error: invalid application of 'sizeof' to an incomplete type 'struct hv_get_vp_registers_input'
     428 |         memset(input, 0, struct_size(input, element, 1));
         |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:372:9: note: expanded from macro 'struct_size'
     372 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                       ^
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
     513 |                 __struct_size(p), __member_size(p))
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
>> arch/x86/hyperv/hv_init.c:428:19: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     428 |         memset(input, 0, struct_size(input, element, 1));
         |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:372:18: note: expanded from macro 'struct_size'
     372 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                                ^
   include/linux/overflow.h:356:24: note: expanded from macro 'flex_array_size'
     356 |                 (count) * sizeof(*(p)->member) + __must_be_array((p)->member),  \
         |                                      ^
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
     513 |                 __struct_size(p), __member_size(p))
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
>> arch/x86/hyperv/hv_init.c:428:19: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     428 |         memset(input, 0, struct_size(input, element, 1));
         |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:372:18: note: expanded from macro 'struct_size'
     372 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                                ^
   include/linux/overflow.h:356:55: note: expanded from macro 'flex_array_size'
     356 |                 (count) * sizeof(*(p)->member) + __must_be_array((p)->member),  \
         |                                                                     ^
   include/linux/compiler.h:243:59: note: expanded from macro '__must_be_array'
     243 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                                                ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                              ^
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
     513 |                 __struct_size(p), __member_size(p))
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
>> arch/x86/hyperv/hv_init.c:428:19: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     428 |         memset(input, 0, struct_size(input, element, 1));
         |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:372:18: note: expanded from macro 'struct_size'
     372 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                                ^
   include/linux/overflow.h:357:30: note: expanded from macro 'flex_array_size'
     357 |                 size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member)))
         |                                            ^
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
     513 |                 __struct_size(p), __member_size(p))
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
>> arch/x86/hyperv/hv_init.c:428:19: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     428 |         memset(input, 0, struct_size(input, element, 1));
         |         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/overflow.h:372:18: note: expanded from macro 'struct_size'
     372 |                 sizeof(*(p)) + flex_array_size(p, member, count),       \
         |                                ^
   include/linux/overflow.h:357:61: note: expanded from macro 'flex_array_size'
     357 |                 size_mul(count, sizeof(*(p)->member) + __must_be_array((p)->member)))
         |                                                                           ^
   include/linux/compiler.h:243:59: note: expanded from macro '__must_be_array'
     243 | #define __must_be_array(a)      BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
         |                                                                ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/build_bug.h:16:62: note: expanded from macro 'BUILD_BUG_ON_ZERO'
      16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })))
         |                                                              ^
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
     513 |                 __struct_size(p), __member_size(p))
         |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
   arch/x86/hyperv/hv_init.c:429:7: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     429 |         input->header.partitionid = HV_PARTITION_ID_SELF;
         |         ~~~~~^
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
   arch/x86/hyperv/hv_init.c:430:7: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     430 |         input->header.vpindex = HV_VP_INDEX_SELF;
         |         ~~~~~^
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
   arch/x86/hyperv/hv_init.c:431:7: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     431 |         input->header.inputvtl = 0;
         |         ~~~~~^
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
   arch/x86/hyperv/hv_init.c:432:7: error: incomplete definition of type 'struct hv_get_vp_registers_input'
     432 |         input->element[0].name0 = HV_X64_REGISTER_VSM_VP_STATUS;
         |         ~~~~~^
   arch/x86/hyperv/hv_init.c:419:9: note: forward declaration of 'struct hv_get_vp_registers_input'
     419 |         struct hv_get_vp_registers_input *input;
         |                ^
>> arch/x86/hyperv/hv_init.c:436:15: error: incomplete definition of type 'struct hv_get_vp_registers_output'
     436 |                 ret = output->as64.low & HV_X64_VTL_MASK;
         |                       ~~~~~~^
   arch/x86/hyperv/hv_init.c:420:9: note: forward declaration of 'struct hv_get_vp_registers_output'
     420 |         struct hv_get_vp_registers_output *output;
         |                ^
   10 errors generated.
--
>> arch/x86/hyperv/hv_vtl.c:154:27: error: use of undeclared identifier 'HVCALL_ENABLE_VP_VTL'
     154 |         status = hv_do_hypercall(HVCALL_ENABLE_VP_VTL, input, NULL);
         |                                  ^
>> arch/x86/hyperv/hv_vtl.c:189:25: error: invalid application of 'sizeof' to an incomplete type 'struct hv_get_vp_from_apic_id_in'
     189 |         memset(input, 0, sizeof(*input));
         |                                ^~~~~~~~
   include/linux/fortify-string.h:512:52: note: expanded from macro 'memset'
     512 | #define memset(p, c, s) __fortify_memset_chk(p, c, s,                   \
         |                                                    ^
   include/linux/fortify-string.h:502:35: note: expanded from macro '__fortify_memset_chk'
     502 |         size_t __fortify_size = (size_t)(size);                         \
         |                                          ^~~~
   arch/x86/hyperv/hv_vtl.c:183:9: note: forward declaration of 'struct hv_get_vp_from_apic_id_in'
     183 |         struct hv_get_vp_from_apic_id_in *input;
         |                ^
>> arch/x86/hyperv/hv_vtl.c:190:7: error: incomplete definition of type 'struct hv_get_vp_from_apic_id_in'
     190 |         input->partition_id = HV_PARTITION_ID_SELF;
         |         ~~~~~^
   arch/x86/hyperv/hv_vtl.c:183:9: note: forward declaration of 'struct hv_get_vp_from_apic_id_in'
     183 |         struct hv_get_vp_from_apic_id_in *input;
         |                ^
   arch/x86/hyperv/hv_vtl.c:191:7: error: incomplete definition of type 'struct hv_get_vp_from_apic_id_in'
     191 |         input->apic_ids[0] = apic_id;
         |         ~~~~~^
   arch/x86/hyperv/hv_vtl.c:183:9: note: forward declaration of 'struct hv_get_vp_from_apic_id_in'
     183 |         struct hv_get_vp_from_apic_id_in *input;
         |                ^
>> arch/x86/hyperv/hv_vtl.c:195:38: error: use of undeclared identifier 'HVCALL_GET_VP_ID_FROM_APIC_ID'
     195 |         control = HV_HYPERCALL_REP_COMP_1 | HVCALL_GET_VP_ID_FROM_APIC_ID;
         |                                             ^
   5 errors generated.


vim +428 arch/x86/hyperv/hv_init.c

99a0f46af6a771 Wei Liu        2021-02-03  414  
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  415  #if IS_ENABLED(CONFIG_HYPERV_VTL_MODE)
8387ce06d70bbb Tianyu Lan     2023-08-18  416  static u8 __init get_vtl(void)
8387ce06d70bbb Tianyu Lan     2023-08-18  417  {
8387ce06d70bbb Tianyu Lan     2023-08-18  418  	u64 control = HV_HYPERCALL_REP_COMP_1 | HVCALL_GET_VP_REGISTERS;
8387ce06d70bbb Tianyu Lan     2023-08-18 @419  	struct hv_get_vp_registers_input *input;
8387ce06d70bbb Tianyu Lan     2023-08-18  420  	struct hv_get_vp_registers_output *output;
8387ce06d70bbb Tianyu Lan     2023-08-18  421  	unsigned long flags;
8387ce06d70bbb Tianyu Lan     2023-08-18  422  	u64 ret;
8387ce06d70bbb Tianyu Lan     2023-08-18  423  
8387ce06d70bbb Tianyu Lan     2023-08-18  424  	local_irq_save(flags);
8387ce06d70bbb Tianyu Lan     2023-08-18  425  	input = *this_cpu_ptr(hyperv_pcpu_input_arg);
8387ce06d70bbb Tianyu Lan     2023-08-18  426  	output = (struct hv_get_vp_registers_output *)input;
8387ce06d70bbb Tianyu Lan     2023-08-18  427  
8387ce06d70bbb Tianyu Lan     2023-08-18 @428  	memset(input, 0, struct_size(input, element, 1));
8387ce06d70bbb Tianyu Lan     2023-08-18  429  	input->header.partitionid = HV_PARTITION_ID_SELF;
8387ce06d70bbb Tianyu Lan     2023-08-18  430  	input->header.vpindex = HV_VP_INDEX_SELF;
8387ce06d70bbb Tianyu Lan     2023-08-18  431  	input->header.inputvtl = 0;
8387ce06d70bbb Tianyu Lan     2023-08-18  432  	input->element[0].name0 = HV_X64_REGISTER_VSM_VP_STATUS;
8387ce06d70bbb Tianyu Lan     2023-08-18  433  
8387ce06d70bbb Tianyu Lan     2023-08-18  434  	ret = hv_do_hypercall(control, input, output);
8387ce06d70bbb Tianyu Lan     2023-08-18  435  	if (hv_result_success(ret)) {
8387ce06d70bbb Tianyu Lan     2023-08-18 @436  		ret = output->as64.low & HV_X64_VTL_MASK;
8387ce06d70bbb Tianyu Lan     2023-08-18  437  	} else {
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  438  		pr_err("Failed to get VTL(error: %lld) exiting...\n", ret);
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  439  		BUG();
8387ce06d70bbb Tianyu Lan     2023-08-18  440  	}
8387ce06d70bbb Tianyu Lan     2023-08-18  441  
8387ce06d70bbb Tianyu Lan     2023-08-18  442  	local_irq_restore(flags);
8387ce06d70bbb Tianyu Lan     2023-08-18  443  	return ret;
8387ce06d70bbb Tianyu Lan     2023-08-18  444  }
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  445  #else
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  446  static inline u8 get_vtl(void) { return 0; }
f2a55d08d7e1a5 Saurabh Sengar 2023-09-19  447  #endif
8387ce06d70bbb Tianyu Lan     2023-08-18  448  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-10-04 21:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 19:50 [PATCH 0/5] Add new headers for Hyper-V Dom0 Nuno Das Neves
2024-10-03 19:51 ` [PATCH 1/5] hyperv: Move hv_connection_id to hyperv-tlfs.h Nuno Das Neves
2024-10-07 16:24   ` Wei Liu
2024-10-03 19:51 ` [PATCH 2/5] hyperv: Remove unnecessary #includes Nuno Das Neves
2024-10-07 16:24   ` Wei Liu
2024-10-10 18:21   ` Michael Kelley
2024-10-31 18:47     ` Nuno Das Neves
2024-10-03 19:51 ` [PATCH 3/5] hyperv: Add new Hyper-V headers Nuno Das Neves
2024-10-10 18:21   ` Michael Kelley
2024-10-11  1:34     ` [EXTERNAL] " MUKESH RATHOR
2024-10-03 19:51 ` [PATCH 4/5] hyperv: Add hv_defs.h to conditionally include hyperv-tlfs.h or hvhdk.h Nuno Das Neves
2024-10-03 19:51 ` [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code Nuno Das Neves
2024-10-04 15:58   ` Stanislav Kinsburskii
2024-10-05  0:07     ` Nuno Das Neves
2024-10-04 19:11   ` Simon Horman
2024-10-04 23:36     ` Nuno Das Neves
2024-10-04 21:55   ` kernel test robot [this message]
2024-10-05  1:54   ` kernel test robot
2024-10-07 16:26 ` [PATCH 0/5] Add new headers for Hyper-V Dom0 Wei Liu
2024-10-10 18:21 ` Michael Kelley
2024-10-11  1:34   ` [EXTERNAL] " MUKESH RATHOR
2024-10-23  0:04     ` Nuno Das Neves
2024-10-23 18:39       ` Michael Kelley
2024-10-23  0:51   ` Nuno Das Neves
2024-10-23 18:32     ` Michael Kelley
2024-10-31 19:05 ` Easwar Hariharan
2024-10-31 22:59   ` Nuno Das Neves

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=202410050518.LFXqJEpd-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux.dev \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nunodasneves@linux.microsoft.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=robin.murphy@arm.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux.dev \
    --cc=wei.liu@kernel.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /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.