Message ID | 1683816877-10747-2-git-send-email-ssengar@linux.microsoft.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp4442849vqo; Thu, 11 May 2023 08:03:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ784lDFqrqmtcFReQWHDDQHPHftnWCKe21jBAnFwiqrxmyk38ZeU2anzFZ/czwDgJZa6YjW X-Received: by 2002:a17:902:ec92:b0:1ac:aba5:7885 with SMTP id x18-20020a170902ec9200b001acaba57885mr9132453plg.47.1683817391464; Thu, 11 May 2023 08:03:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683817391; cv=none; d=google.com; s=arc-20160816; b=a9SzVK/pngOfy8FVTGBILDFoMeCqvrm1YYKsXCl4z4JeOTCgAiABCN8lhfdF2rwlpv bLzAre+4FrwvuojUlvJaCeBUhANKi9k790RqO3uWEgYim7Kq8UQG3aCzysPzBVYpQgrV 08dgGGp5+yrMHDsITnt66o1OPk6O6qg5ZTpcz0kPoX5GLv86DWN1Bjqt33OLLNVtYC0D mTp2lITd1FOvL0NVivOGkr7MqtEi5jqr+H59CiJaAQI42OYTl6A28YwbMqs1E6TPVssN yiKAHY9sh87Bi0nqCEbbIiNBa3nuDGYp7Dqpczq2dD6IJ4tYqiCilH8MDmEdpdH+njbp hb/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature:dkim-filter; bh=O4J9DTHM5ykaLqmtABIlS+wEAau1jelC6LEZQR7BwQU=; b=sid4iX/N3TBNd4vPU+slYzhhmyMYbBK2iCX8xjtXR0zSm3F4dZZHPNNvG8hwBe71HB rfIRJirW1DHvGiMjhUiTMjokLSzeQ6gHgkkgX/CNJOq/p7TCBTaw65aBjiYiUiut2VV8 ctihs1vJnkpPtQbRarKb7JjH1oKjUeWMkXla+wu6RPdjaYxDHXuv0Li9QwhS+6S7W/jr B2VS/lPMdZwmqp8qfltazr8QKn8TAokdWSdn1VtqsFXonSpmmf1CXpoMyUoaiYZ+Uotx 28Sqg5uq4IMhTUSpOkYKfTfi10676j6ZZBdCag+yVRwiMgwjZ19UjIUh9uqlIBoXnTDz A/ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=TmNzbGlB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jm16-20020a17090304d000b001ab286e740bsi6417343plb.328.2023.05.11.08.02.44; Thu, 11 May 2023 08:03:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=TmNzbGlB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238334AbjEKO4j (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Thu, 11 May 2023 10:56:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238282AbjEKO4X (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 11 May 2023 10:56:23 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B57611B48; Thu, 11 May 2023 07:55:58 -0700 (PDT) Received: from linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id A007220EAB6B; Thu, 11 May 2023 07:55:00 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A007220EAB6B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1683816900; bh=O4J9DTHM5ykaLqmtABIlS+wEAau1jelC6LEZQR7BwQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TmNzbGlBq8Eg1wauWEGCh5NWemaFbFcRw00GOHRqhR/k4N+JHh/ImOh9ZSKTA1Dp5 V9lvh4Wgnens8yhjLrhGK/SUPbuMEi7QWkgNy1U91iv45Odv5OwCBu56bq0UIZHRXx dcZOVAsORNvKspJArl7ZBXznMayL/GVh/FuaCFfo= From: Saurabh Sengar <ssengar@linux.microsoft.com> To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, mikelley@microsoft.com, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org Cc: ssengar@microsoft.com Subject: [PATCH 2/2] Drivers: hv: Kconfig: Add HYPERV_VTL_MODE dependencies Date: Thu, 11 May 2023 07:54:37 -0700 Message-Id: <1683816877-10747-2-git-send-email-ssengar@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1683816877-10747-1-git-send-email-ssengar@linux.microsoft.com> References: <1683816877-10747-1-git-send-email-ssengar@linux.microsoft.com> X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765610504803055602?= X-GMAIL-MSGID: =?utf-8?q?1765610504803055602?= |
Series |
[1/2] x86/Kconfig: Allow CONFIG_X86_MPPARSE disable for OF platforms
|
|
Commit Message
Saurabh Singh Sengar
May 11, 2023, 2:54 p.m. UTC
MTRRs are not per-VTL and are controlled by VTL0, make sure it
is disabled for all other VTLs.
X86_MPPARSE scans low memory for MP tables, which is not required
for Hyper-V VTL platforms.
Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
---
drivers/hv/Kconfig | 2 ++
1 file changed, 2 insertions(+)
Comments
From: Saurabh Sengar <ssengar@linux.microsoft.com> > > MTRRs are not per-VTL and are controlled by VTL0, make sure it > is disabled for all other VTLs. Clarifying the wording a bit: MTRRs are not per-VTL, but are always controlled by VTL0. Allow building for VTLs other than VTL0 only when MTRR functionality is disabled. > > X86_MPPARSE scans low memory for MP tables, which is not required > for Hyper-V VTL platforms. Is the above statement saying that MP tables aren't required, so remove the code to save space? Or is there a problem/failure if MP table code runs and scans low memory? *Requiring* that it be disabled, and the reference to scanning low memory makes me think it might be the latter, in which case I'd suggest this more forceful wording: The MP table code scans low memory, which causes failures in VTLs other than VTL0. Allow building for VTLs other than VTL0 only when MP table functionality is disabled. If you can give slightly more detail about "causes failures" (a panic? some other problem?) that would be good too. Michael > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> > --- > drivers/hv/Kconfig | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig > index 00242107d62e..c8d443886b9d 100644 > --- a/drivers/hv/Kconfig > +++ b/drivers/hv/Kconfig > @@ -16,6 +16,8 @@ config HYPERV > config HYPERV_VTL_MODE > bool "Enable Linux to boot in VTL context" > depends on X86_64 && HYPERV > + depends on !MTRR > + depends on !X86_MPPARSE > default n > help > Virtual Secure Mode (VSM) is a set of hypervisor capabilities and > -- > 2.34.1
> -----Original Message----- > From: Michael Kelley (LINUX) <mikelley@microsoft.com> > Sent: Saturday, May 20, 2023 10:20 PM > To: Saurabh Sengar <ssengar@linux.microsoft.com>; tglx@linutronix.de; > mingo@redhat.com; bp@alien8.de; dave.hansen@linux.intel.com; > x86@kernel.org; hpa@zytor.com; KY Srinivasan <kys@microsoft.com>; > Haiyang Zhang <haiyangz@microsoft.com>; wei.liu@kernel.org; Dexuan Cui > <decui@microsoft.com>; linux-kernel@vger.kernel.org; linux- > hyperv@vger.kernel.org > Cc: Saurabh Singh Sengar <ssengar@microsoft.com> > Subject: [EXTERNAL] RE: [PATCH 2/2] Drivers: hv: Kconfig: Add > HYPERV_VTL_MODE dependencies > > From: Saurabh Sengar <ssengar@linux.microsoft.com> > > > > MTRRs are not per-VTL and are controlled by VTL0, make sure it is > > disabled for all other VTLs. > > Clarifying the wording a bit: > > MTRRs are not per-VTL, but are always controlled by VTL0. Allow > building for VTLs other than VTL0 only when MTRR functionality is disabled. Ok > > > > > X86_MPPARSE scans low memory for MP tables, which is not required for > > Hyper-V VTL platforms. > > Is the above statement saying that MP tables aren't required, so remove the > code to save space? Or is there a problem/failure if MP table code > runs and scans low memory? *Requiring* that it be disabled, and the > reference to scanning low memory makes me think it might be the latter, in > which case I'd suggest this more forceful wording: > > The MP table code scans low memory, which causes failures in VTLs > other than VTL0. Allow building for VTLs other than VTL0 only when > MP table functionality is disabled. Ok > > If you can give slightly more detail about "causes failures" (a panic? > some other problem?) that would be good too. When CONFIG_X86_MPPARSE is enabled, the kernel will scan low memory, looking for MP tables. In Hyper-V VBS setup, lower memory is assigned to VTL0. This lower memory may contain the actual MPPARSE table for VTL0, which can confuse the VTLx kernel and cause issues. (x > 0) > > Michael > > > > > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> > > --- > > drivers/hv/Kconfig | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index > > 00242107d62e..c8d443886b9d 100644 > > --- a/drivers/hv/Kconfig > > +++ b/drivers/hv/Kconfig > > @@ -16,6 +16,8 @@ config HYPERV > > config HYPERV_VTL_MODE > > bool "Enable Linux to boot in VTL context" > > depends on X86_64 && HYPERV > > + depends on !MTRR > > + depends on !X86_MPPARSE > > default n > > help > > Virtual Secure Mode (VSM) is a set of hypervisor capabilities and > > -- > > 2.34.1
diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig index 00242107d62e..c8d443886b9d 100644 --- a/drivers/hv/Kconfig +++ b/drivers/hv/Kconfig @@ -16,6 +16,8 @@ config HYPERV config HYPERV_VTL_MODE bool "Enable Linux to boot in VTL context" depends on X86_64 && HYPERV + depends on !MTRR + depends on !X86_MPPARSE default n help Virtual Secure Mode (VSM) is a set of hypervisor capabilities and