From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 318E1CF885F for ; Fri, 4 Oct 2024 21:57:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=l4hyLC3T9zX4wjSfCKYf6FF27tNkpZt/f7au7mqo9ik=; b=tcvMQaRgjt4dvslpQ/l4hQl9YK wxVg5siaDTUSt8A9KGZj6cXJluR22BH9sfSeas+fOODXF3qghG0TV9AFoWvDos/3khODMG3AyhoT1 AY+C8fsyIVzpIlT0ufrBusw2yB5jEy5IdRPlwlJyuiNoNISTDX/obh7BUdlVJNG0QfOWOX/EBgdR4 eHqgbLItv5Dz5KwEcZKT3PSzlFdkVVz62u1jt3+pbv/BwXlTKH7xAXdkOyVTDV//BnmhPgapJT2v6 AADfwTYMxDatqrWBc1hbht9Gevr6ZQB1l4JMYQ5aLXeT8/YxWFNfDuCr76pa5YlToIKYZ5VY10Jhp T3qFPRtQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swqIU-0000000EJeF-0CGN; Fri, 04 Oct 2024 21:57:14 +0000 Received: from mgamail.intel.com ([192.198.163.17]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1swqHC-0000000EJOv-00rN for linux-arm-kernel@lists.infradead.org; Fri, 04 Oct 2024 21:55:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728078954; x=1759614954; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uSuzR4ZIRRHk3NuI6DTHrLhOvLcovi83ONMhw+IfWHk=; b=eWSzGlQ7I2Wb+4MNchsjqb67LaPN4Q+WCD0pYIQe8Bwovjt3bcYwBJM0 DdR0cmeDRz8DyIxWYaQSOHDhnNeMHDpdqsjm8Y81QknALcA5BfAGoJhK8 vsjQ4T0TSptpsKK9ZwGRDz0u67Alv4DvxTuGOg8SSdtwdZubk/vibzldB 4pypJikFdKmiiQQSf+Ai50V7nmU4Irf6ujH23Pweuupz+SjC+joZsMveQ k4Zdr9anDT//tFtSL5juOV06iXAiPCQvx17TBbf8OreAYoGxjTDNhzTv+ 3JmLcQ8Kl22kjzxhYETd+pCgfSHGxDIyTRx3UpUMdPSmcJQJf2u6/lNzg A==; X-CSE-ConnectionGUID: MK8W7vLUQkCTZ2eFknsvTQ== X-CSE-MsgGUID: ACYKDVypRBG8vDqJmSIygQ== X-IronPort-AV: E=McAfee;i="6700,10204,11215"; a="27199071" X-IronPort-AV: E=Sophos;i="6.11,178,1725346800"; d="scan'208";a="27199071" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2024 14:55:50 -0700 X-CSE-ConnectionGUID: o7dHfJ4SSpCm7Zsz4y/uEw== X-CSE-MsgGUID: nBAnNaC+RVucgGwkxbb4fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,178,1725346800"; d="scan'208";a="98145790" Received: from lkp-server01.sh.intel.com (HELO a48cf1aa22e8) ([10.239.97.150]) by fmviesa002.fm.intel.com with ESMTP; 04 Oct 2024 14:55:43 -0700 Received: from kbuild by a48cf1aa22e8 with local (Exim 4.96) (envelope-from ) id 1swqGz-0002G6-05; Fri, 04 Oct 2024 21:55:41 +0000 Date: Sat, 5 Oct 2024 05:55:22 +0800 From: kernel test robot To: Nuno Das Neves , 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 Message-ID: <202410050518.LFXqJEpd-lkp@intel.com> References: <1727985064-18362-6-git-send-email-nunodasneves@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1727985064-18362-6-git-send-email-nunodasneves@linux.microsoft.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_145554_109391_4F3ADE7A X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 | 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