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 AF621CF8852 for ; Fri, 4 Oct 2024 23:37:43 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=12axO/5wR11TqDYAjMUHSrOD2AfHvidYKZrZQKRTf6A=; b=ZKsiQH497E9hJtAdV5UQ2Qq41w QyTE0tr/ZcWjNC6/3A0b38LRPZ+brovzmGvLkkoOZM/7w6SdIO/qv1jpwmWQELSA2FmUAXJj87/jw 7HP0DtZ2xgif4RRhejNureva4QcF4XJE7jbqV3Qgg2Rpiv23zWoA8bYTcxX05uU7xo9qwAz0f0NMS AXacHr+oTAr6btuCmeGk9Iq0MNnaOwJSBPzekb7gxV4N/pJvC9FxYj8q01s3RRdwLFOj+VYyv5deb CzgHiD24ILI697OeJJWh4OjSdyjG3Gavgqnb2GU6z+QfODTv6rSkNmHnVrGRevjgEtTrqgvClKAg1 fnsGQojQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swrrZ-0000000ESdV-2y2B; Fri, 04 Oct 2024 23:37:33 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1swrqG-0000000ESLb-3yV0 for linux-arm-kernel@lists.infradead.org; Fri, 04 Oct 2024 23:36:14 +0000 Received: from [10.0.0.114] (c-67-182-156-199.hsd1.wa.comcast.net [67.182.156.199]) by linux.microsoft.com (Postfix) with ESMTPSA id 2A53520DB378; Fri, 4 Oct 2024 16:36:10 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2A53520DB378 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1728084971; bh=12axO/5wR11TqDYAjMUHSrOD2AfHvidYKZrZQKRTf6A=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VFMWUCaIBQ8EPngTdqNePaLPH2kkoNqFcBK/p9OaD+RiCdUGSPby/3CpF48CZYHaY eY/NnzTien9H0BMtpRrMbaLJvgp4vqtsKvnLlAgaJ8zjpzojV8LzZ/bwvHv8uwKT4B kWIeP6x8lWVWbV3kya4o+mW+YLB+SThKWXYXNOSo= Message-ID: <17d5a6fd-9f4e-4987-a9fd-dff45cae10a2@linux.microsoft.com> Date: Fri, 4 Oct 2024 16:36:06 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] hyperv: Use hvhdk.h instead of hyperv-tlfs.h in Hyper-V code To: Simon Horman Cc: 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, 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, kuba@kernel.org, pabeni@redhat.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, arnd@arndb.de, sgarzare@redhat.com, jinankjain@linux.microsoft.com, muminulrussell@gmail.com, skinsburskii@linux.microsoft.com, mukeshrathor@microsoft.com References: <1727985064-18362-1-git-send-email-nunodasneves@linux.microsoft.com> <1727985064-18362-6-git-send-email-nunodasneves@linux.microsoft.com> <20241004191104.GI1310185@kernel.org> Content-Language: en-US From: Nuno Das Neves In-Reply-To: <20241004191104.GI1310185@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241004_163613_077397_827832EE X-CRM114-Status: GOOD ( 23.15 ) 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 On 10/4/2024 12:11 PM, Simon Horman wrote: > Hi, > > With this change in place I see allmodconfig x86_64 builds reporting that > HV_REGISTER_FEATURES is undeclared. > > arch/arm64/hyperv/mshyperv.c: In function 'hyperv_init': > arch/arm64/hyperv/mshyperv.c:53:26: error: 'HV_REGISTER_FEATURES' undeclared (first use in this function); did you mean 'HV_REGISTER_FEATURES_INFO'? > 53 | hv_get_vpreg_128(HV_REGISTER_FEATURES, &result); > | ^~~~~~~~~~~~~~~~~~~~ > | HV_REGISTER_FEATURES_INFO > arch/arm64/hyperv/mshyperv.c:53:26: note: each undeclared identifier is reported only once for each function it appears in > arch/arm64/hyperv/mshyperv.c:58:26: error: 'HV_REGISTER_ENLIGHTENMENTS' undeclared (first use in this function); did you mean 'HV_ACCESS_REENLIGHTENMENT'? > 58 | hv_get_vpreg_128(HV_REGISTER_ENLIGHTENMENTS, &result); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > | HV_ACCESS_REENLIGHTENMENT > Ah, I did forgot to check arm64. Thanks for the catch, I'll be sure to fix it for v2. > > And here too, with x86_64 allmodconfig. > > In file included from ./include/linux/string.h:390, > from ./include/linux/efi.h:16, > from arch/x86/hyperv/hv_init.c:12: > arch/x86/hyperv/hv_init.c: In function 'get_vtl': > ./include/linux/overflow.h:372:23: error: invalid application of 'sizeof' to incomplete type 'struct hv_get_vp_registers_input' > 372 | sizeof(*(p)) + flex_array_size(p, member, count), \ > | ^ > ./include/linux/fortify-string.h:502:42: note: in definition of macro '__fortify_memset_chk' > 502 | size_t __fortify_size = (size_t)(size); \ > | ^~~~ > arch/x86/hyperv/hv_init.c:427:9: note: in expansion of macro 'memset' > 427 | memset(input, 0, struct_size(input, element, 1)); > | ^~~~~~ > arch/x86/hyperv/hv_init.c:427:26: note: in expansion of macro 'struct_size' > 427 | memset(input, 0, struct_size(input, element, 1)); > | ^~~~~~~~~~~ > > [errors trimmed for the sake of brevity] > > ... > Thanks > > And, likewise, with this patch applied I see a number of errors when > compiling this file. This is with allmodconfig on x86_64 with: > > Modified: CONFIG_HYPERV=y (instead of m) > Added: CONFIG_HYPERV_VTL_MODE=y > Thanks again, Ah, I wish there was a way to check these different combinations of y/m more easily. > arch/x86/hyperv/hv_vtl.c: In function 'hv_vtl_bringup_vcpu': > arch/x86/hyperv/hv_vtl.c:154:34: error: 'HVCALL_ENABLE_VP_VTL' undeclared (first use in this function) > 154 | status = hv_do_hypercall(HVCALL_ENABLE_VP_VTL, input, NULL); > | ^~~~~~~~~~~~~~~~~~~~ > arch/x86/hyperv/hv_vtl.c:154:34: note: each undeclared identifier is reported only once for each function it appears in > In file included from ./include/linux/string.h:390, > from ./include/linux/bitmap.h:13, > from ./include/linux/cpumask.h:12, > from ./arch/x86/include/asm/apic.h:5, > from arch/x86/hyperv/hv_vtl.c:9: > arch/x86/hyperv/hv_vtl.c: In function 'hv_vtl_apicid_to_vp_id': > arch/x86/hyperv/hv_vtl.c:189:32: error: invalid application of 'sizeof' to incomplete type 'struct hv_get_vp_from_apic_id_in' > 189 | memset(input, 0, sizeof(*input)); > | ^ > ./include/linux/fortify-string.h:502:42: note: in definition of macro '__fortify_memset_chk' > 502 | size_t __fortify_size = (size_t)(size); \ > | ^~~~ > arch/x86/hyperv/hv_vtl.c:189:9: note: in expansion of macro 'memset' > 189 | memset(input, 0, sizeof(*input)); > | ^~~~~~ > arch/x86/hyperv/hv_vtl.c:190:14: error: invalid use of undefined type 'struct hv_get_vp_from_apic_id_in' > 190 | input->partition_id = HV_PARTITION_ID_SELF; > | ^~ > arch/x86/hyperv/hv_vtl.c:191:14: error: invalid use of undefined type 'struct hv_get_vp_from_apic_id_in' > 191 | input->apic_ids[0] = apic_id; > | ^~ > arch/x86/hyperv/hv_vtl.c:195:45: error: 'HVCALL_GET_VP_ID_FROM_APIC_ID' undeclared (first use in this function) > 195 | control = HV_HYPERCALL_REP_COMP_1 | HVCALL_GET_VP_ID_FROM_APIC_ID; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > ... Looks like I'm missing a one or two definitions in the new headers, and the names have changed slightly in couple of cases. I'll do some more thorough checking and have it all fixed for v2. I didn't know about this allmodconfig target, that will make it a bit easier! Nuno