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 90A4CC25B7D for ; Wed, 15 May 2024 17:34:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=b5ouW47t93HYc61enkT9JgPEhjblwFncaxU1eO3rw84=; b=Olcsyw3YMBp2DO wrbFI/jaiji1KNf7/nLjbilHXGnul8Q7U+QyOAWyPvV7CRlX2nH3cjEx7iofZgv960wB0hrxE+2+6 FTcu/MnNMlpGOSFfKkvUGF1fAgDZBLmeQquDKs263Mx+nWVOqOA445RP+Pg7U+tkrUtQVne/ze8iN Tv3tPu9y1Z9xpcEnPcRfxetqI+D2rNn0736TD6P0xVjxd261rRIWKzvz2dFa8wEqivIxgSPska5v4 kKTkrSDSudKIA3xjhNEo6/AA3lwjG2laZTF4BIUqp2eQp59Fj+5lTAOrZd6kbeCzlX9G57dFryVF+ 4H8BqrW+kNLJxLbp5xmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7IVk-00000002QhQ-0ee3; Wed, 15 May 2024 17:33:53 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7IVh-00000002Qfz-0KdM for linux-arm-kernel@lists.infradead.org; Wed, 15 May 2024 17:33:50 +0000 Received: from [10.137.186.190] (unknown [131.107.159.62]) by linux.microsoft.com (Postfix) with ESMTPSA id 60AFD20BE570; Wed, 15 May 2024 10:33:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 60AFD20BE570 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1715794426; bh=6znshs1azYcVfLPlekdOCordB4FAVfBn0O3niN9s+zc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=EplThCPgxf2K/F8p5LTNBB2FpK+/bTpXukCuYhXyOYYlCqRIQfd1AiYryJzcSEWgl do+VYONXpz2SmVJUnMOFCJEWS/WmfZ+cUgYk3Rc9B+4zraitQvTQHirrfupbFHpAS6 qeNcZTp64f+P2tdvuN9exTKusSQCv8GS8E4jKlCM= Message-ID: <267ef0e2-2384-44bd-81f9-f33dda7bb9d2@linux.microsoft.com> Date: Wed, 15 May 2024 10:33:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] arm64/hyperv: Support DeviceTree To: Krzysztof Kozlowski , arnd@arndb.de, bhelgaas@google.com, bp@alien8.de, catalin.marinas@arm.com, dave.hansen@linux.intel.com, decui@microsoft.com, haiyangz@microsoft.com, hpa@zytor.com, kw@linux.com, kys@microsoft.com, lenb@kernel.org, lpieralisi@kernel.org, mingo@redhat.com, mhklinux@outlook.com, rafael@kernel.org, robh@kernel.org, tglx@linutronix.de, wei.liu@kernel.org, will@kernel.org, linux-acpi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, x86@kernel.org Cc: ssengar@microsoft.com, sunilmut@microsoft.com, vdso@hexbites.dev References: <20240514224508.212318-1-romank@linux.microsoft.com> <20240514224508.212318-2-romank@linux.microsoft.com> <1766fc9a-1d10-4c93-a9db-a7e0db8b01e7@linaro.org> Content-Language: en-US From: Roman Kisel In-Reply-To: <1766fc9a-1d10-4c93-a9db-a7e0db8b01e7@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240515_103349_453837_E03B80A0 X-CRM114-Status: GOOD ( 15.19 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/15/2024 12:45 AM, Krzysztof Kozlowski wrote: > On 15/05/2024 00:43, Roman Kisel wrote: >> The Virtual Trust Level platforms rely on DeviceTree, and the >> arm64/hyperv code supports ACPI only. Update the logic to >> support DeviceTree on boot as well as ACPI. >> >> Signed-off-by: Roman Kisel >> --- >> arch/arm64/hyperv/mshyperv.c | 34 +++++++++++++++++++++++++++++----- >> 1 file changed, 29 insertions(+), 5 deletions(-) >> >> diff --git a/arch/arm64/hyperv/mshyperv.c b/arch/arm64/hyperv/mshyperv.c >> index b1a4de4eee29..208a3bcb9686 100644 >> --- a/arch/arm64/hyperv/mshyperv.c >> +++ b/arch/arm64/hyperv/mshyperv.c >> @@ -15,6 +15,9 @@ >> #include >> #include >> #include >> +#include >> +#include >> +#include >> #include >> >> static bool hyperv_initialized; >> @@ -27,6 +30,29 @@ int hv_get_hypervisor_version(union hv_hypervisor_version_info *info) >> return 0; >> } >> >> +static bool hyperv_detect_fdt(void) >> +{ >> +#ifdef CONFIG_OF >> + const unsigned long hyp_node = of_get_flat_dt_subnode_by_name( >> + of_get_flat_dt_root(), "hypervisor"); > > Why do you add an ABI for node name? Although name looks OK, but is it > really described in the spec that you depend on it? I really do not like > name dependencies... Followed the existing DeviceTree's of naming and approaches in the kernel to surprise less and "invent" even less. As for the spec, the Hyper-V TLFS'es part discussing Hypervisor Discovery talks about x86 (https://learn.microsoft.com/en-us/virtualization/hyper-v-on-windows/tlfs/feature-discovery) only and via the ISA-provided means only. For arm64, Hyper-V code discovers the hypervisor presence via ACPI. Felt only natural to do the same for DeviceTree and arm64. > > Where is the binding for this? > Have not added, my mistake. Will place under Documentation/devicetree/bindings/bus/microsoft,hyperv.yaml > Best regards, > Krzysztof -- Thank you, Roman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel