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 B5F1FC25B75 for ; Wed, 15 May 2024 18:04:35 +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=L9/Vx9PMkOGmEXZYAy9uqK/Jeg0lgh2Ixg8mnsUyXZM=; b=y1JpiQjCzT6X0v WvMvCTpmNqV1h+9K78VAF55B+irI8G1zScIGpvSUqHTJ7EuhYJBNOcMs7Mbf0J0g9/Qd9849u269G q+0jAiroH2y/yJXbVVbc56svmKLjgHnZvyTDl2ovLRH7ZlmI6eorl6Us1a98jR+RGAG9gU9uWi0eK 3kuhTGyZgDX0bGJti9p6vTZwQuG2vYDjz1PqON1Ih7BvSXd4QRKyFcxF6jABZ7betU/zpq8TUYAAM HjnDQFaenJpbeYj3pS38xOILVRsnUDlTs/pyYNiHzt7hMxZumx3Ufb7vazDBX+wSbQXaFhNZUhcO+ b/uv+gVOaYm4cUF9Dinw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7IzC-00000002UTv-3vFr; Wed, 15 May 2024 18:04:19 +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 1s7Iz9-00000002USo-2vs5 for linux-arm-kernel@lists.infradead.org; Wed, 15 May 2024 18:04:17 +0000 Received: from [10.137.186.190] (unknown [131.107.159.62]) by linux.microsoft.com (Postfix) with ESMTPSA id B467520B915A; Wed, 15 May 2024 11:04:13 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B467520B915A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1715796253; bh=ScMr1hwCVv5qZHMAEN659FeB99CmF3S+HpysOb7Qq6Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=glvQcZr9UxFyBDZUkJ7h/dhCU29YraLKpJcAkfJiZcmA7IocRiKi6vhKB6QrQ3ugC MtRTGJZEX2gEJkbhFfm53wk/2lXFWpEVFopy5XF6Lq5R4keOUg8kwHKf/VS5ObjeUZ EqGMgquAB+DH/UnDqqIknS6Sw5SB71iyb3keFUc0= Message-ID: Date: Wed, 15 May 2024 11:04:13 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/6] drivers/hv: Enable VTL mode for arm64 To: Michael Kelley , "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" , "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-3-romank@linux.microsoft.com> Content-Language: en-US From: Roman Kisel In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240515_110415_944368_3F4CDD16 X-CRM114-Status: GOOD ( 23.41 ) 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 6:37 AM, Michael Kelley wrote: > From: Roman Kisel Sent: Tuesday, May 14, 2024 3:44 PM >> >> Kconfig dependencies for arm64 guests on Hyper-V require that be ACPI enabled, >> and limit VTL mode to x86/x64. To enable VTL mode on arm64 as well, update the >> dependencies. Since VTL mode requires DeviceTree instead of ACPI, don't require >> arm64 guests on Hyper-V to have ACPI. >> >> Signed-off-by: Roman Kisel >> --- >> drivers/hv/Kconfig | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig >> index 862c47b191af..a5cd1365e248 100644 >> --- a/drivers/hv/Kconfig >> +++ b/drivers/hv/Kconfig >> @@ -5,7 +5,7 @@ menu "Microsoft Hyper-V guest support" >> config HYPERV >> tristate "Microsoft Hyper-V client drivers" >> depends on (X86 && X86_LOCAL_APIC && HYPERVISOR_GUEST) \ >> - || (ACPI && ARM64 && !CPU_BIG_ENDIAN) >> + || (ARM64 && !CPU_BIG_ENDIAN) >> select PARAVIRT >> select X86_HV_CALLBACK_VECTOR if X86 >> select OF_EARLY_FLATTREE if OF >> @@ -15,7 +15,7 @@ config HYPERV >> >> config HYPERV_VTL_MODE >> bool "Enable Linux to boot in VTL context" >> - depends on X86_64 && HYPERV >> + depends on HYPERV >> depends on SMP >> default n >> help > > These changes make it possible to build a normal VTL 0 Hyper-V > guest (i.e., CONFIG_HYPERV_VTL_MODE=n) if CONFIG_ACPI is > not set, which won't work. While we can say "don't do that", it > would be better if the Kconfig dependencies expressed that > requirement. > > A possible fix is to remove the "depends on HYPERV" from > HYPERV_VTL_MODE. Then for HYPERV, make > the "depends on ACPI" be conditional on !HYPERV_VTL_MODE > (for both ARM64 and X86). > > I think we originally had "depends on HYPERV" in > HYPERV_VTL_MODE because there was a VTL-related function > in a non-Hyper-V code path, and we wanted to prevent that code > from running in non-Hyper-V environments. But in practice, that > turned out not to work well because occasionally people would > do an "all config" build where both CONFIG_HYPERV and > CONFIG_HYPERV_VTL_MODE were set, and it would panic during > boot in their non-Hyper-V environment. Such people were not > happy. :-( So Saurabh made a relatively simple change (see commit > 14058f72cf13e) that got the VTL code out of that non-Hyper-V code > path. With that change, it shouldn't matter if someone sets > CONFIG_HYPERV_VTL_MODE=y in a build where > CONFIG_HYPERV=n. > > At least that's my theory. :-) Someone would need to check > it carefully. I'll explore that, appreciate sharing the context! > > Michael -- Thank you, Roman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel