Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp183470lqo; Wed, 15 May 2024 11:04:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0NwVHghEdeiyV9eMa77S8pBAK0fDduG+gTVTvoRs5M7ua0B4PJ49QHoT+GIZUOtTa6aS4Zqrwd+bF3kVMLtpdAV7/sY4QSxiky2RqjQ== X-Google-Smtp-Source: AGHT+IEBKZ17mC5SRKHUHp77lU5eNiG2JgZeE4RFvafcsDekxAGBGWIHNQ4lKLxUZ8Z8RgJhcupf X-Received: by 2002:a17:90a:f2cf:b0:2b9:ddde:fdad with SMTP id 98e67ed59e1d1-2b9dddefe09mr2409316a91.25.1715796265983; Wed, 15 May 2024 11:04:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715796265; cv=pass; d=google.com; s=arc-20160816; b=igWD0bw2hvSi4qFGa22s7He8eUV8/iWqpAUOisZ8Eno8Wl5UGwV083ngzClOPyhCv2 gF8uYpVA3+juGGEhlv4VxA1SmGlGoHpnW5SfxLeUnPvPrUrbyeb1qo62tutwCwMlJ7uC 2Tkt65xO8k84g43cOee+4Fo4L6BZhha9JacbJ/yM12cFdclCAyzcLsoizYISVzuZRngk u202+wZonAdD/YGy8X0MZMK2/8TVVsHB1eaq+H983Q1MLCz+OT+cU8/FV2xM5Gs5m4Dr YEeIIZcKe3ONaryE0ZP6vPjeYIxfvlgYlFisy3C6AxYWshQIB7HQLRZvVESTn/E2Fjzg FSpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=ScMr1hwCVv5qZHMAEN659FeB99CmF3S+HpysOb7Qq6Q=; fh=x6fEPjf6dqYgBkZ6EHcX6AOpoGKqPM/d5P3I2JzqUiU=; b=VZkOqRxysC1k+ylF6juNsfeT+T19fGyYK5g68qhXAbS77Qt3tFP18NZA58iXl0Hos4 14jb0ecIs7jFoK7IedfHADgEMEvgPXjPlSWAMajV+HlxV5/BvogR0LkHUmwNIcHRZZMw JKktww85i6Jagau59jIVrX5P8w4JelLoMmanr33/zUEdgIl14sYwVARGzBvYK9f0F0JU cfeAlaVKxD4qpgf4jS12vA7h/Uq1f8OH9ZMEwN135sbMYejvLHZPxhjfk+1uYi8wQS9d /iH+SnaQIRt/8g56Lw4od3x7uTOIe37uYNFBFN5uPD6iFYrdS4Nw9ZYu9fDE4hnp9r7s 0/cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=glvQcZr9; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-180239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628fc6287si17020288a91.146.2024.05.15.11.04.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 11:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=glvQcZr9; arc=pass (i=1 spf=pass spfdomain=linux.microsoft.com dkim=pass dkdomain=linux.microsoft.com dmarc=pass fromdomain=linux.microsoft.com); spf=pass (google.com: domain of linux-kernel+bounces-180239-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 88F432847A9 for ; Wed, 15 May 2024 18:04:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81306158DBE; Wed, 15 May 2024 18:04:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="glvQcZr9" Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56450158845; Wed, 15 May 2024 18:04:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=13.77.154.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715796255; cv=none; b=Vz4nCJo5PXFhssP05YEIfm9br9vzEIiqM5mQjECyYhG1XnzOvpibt7U4dc4qoDPPfHl4UjL3FoeJkiUKY9F+hwr1AmLM1k0QGGsM8boqrDwHcx0zs7ShAtfvWs4BxP+N1tY6tz/ORkG5iKg72/LUwyO3njh+3p/iwueiw+bHDDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715796255; c=relaxed/simple; bh=/uC6r8iw//SMzZ8NGS9Vxf3Rfafd5om3I6TH7HLW1bE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RyrENekSeySU8OUGBkzkt5renl5WR0Y1y726T33TMzWFw/PQqZ8+alSfBkoOuNHtM4hZpjNmVs6EhdaRpB7B1r4IFKFH1tS55AT1xJ5HnIM5iF6vsmJjWc35u6+/sgk9tyYkOfnY+JymqQNGxtwRD2QYi0++RWNrnflpLKPK7RU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com; spf=pass smtp.mailfrom=linux.microsoft.com; dkim=pass (1024-bit key) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b=glvQcZr9; arc=none smtp.client-ip=13.77.154.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.microsoft.com 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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