Message ID | 20240207172646.3981-17-xin3.li@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp2409325dyb; Wed, 7 Feb 2024 10:06:26 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWRMSDaofPUSCcqP8iqkOqWmqviGVtlId7JRRImjCYIa1pCclrSUbE/jn8qgzxNYRu1cYTEP5rrzxsEh+51SuZpnXgSgA== X-Google-Smtp-Source: AGHT+IHIWNhklBKruOEvBg6UmfTAVucKFnPfbZty41+deHCBtDyYgkNT453QjHx7yUSAYpzfgAz9 X-Received: by 2002:a05:6512:70b:b0:511:46c0:d879 with SMTP id b11-20020a056512070b00b0051146c0d879mr4161956lfs.47.1707329186104; Wed, 07 Feb 2024 10:06:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707329186; cv=pass; d=google.com; s=arc-20160816; b=g1IbZXK1TxCshw7qSkPzxKCLQ+giwjuKwi2dL0RE+Ui2eKCrMIB6yvV3QVDnlkzZrs 7gW87h+eePfeFuCxPp2b5aaeqvxpa9C3bPInWElPQDtYlk6zDE5g1gkjPu9ezeDSpLhh mX6nevbxyltKipIP0VPhXKVx+vC8yDKLIrZY0pKfV2pf8V7dQIHtf9+uLfn95KJj17BA gCa6CIG58uFGREOBH2HvsIvnXUpBDwmjzM39rYtsO+MhHNbxHObzHFymd7GGuXdmtH7n sLzKbOAnZIKt3KaF8ktv1ms4kmdIVErhjoBfC6c0ZAPbV7lJtJV3o+2rhhjMp6jNii6/ aRUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EUec2dPEGKl52G8SBBommKDjKc08dscdk9Rv3UI0bPE=; fh=bzWhc9vvo/fFGQyNnocwI+uV7cb2dNbcEATUP2+7hz8=; b=vZMhhzPchmFojWuuVrkX82vDRDfq12Epn7UDSJE4sHBcP1kopJuEQCnKgjKxkWntRl zJldH37ENoduycYlcKq0V98U3SzT/Lg1tA5pOziPe3o1nLcyNwOsaarMYZK2rixQmkO7 qBEXIZYIoVJTcxOBhqhofjPMhnyyLTekrJ4IKC7J+VrAbeGHu2JUVk/j0qzhNqQ6O2Af ZaIAhPafJAw4xlrHB05iavxeA8YTp9Sje3HQtfpMxKV40wbYD5KAw+AcKrNLCy1/uv7b mvSRkBAgmGB/Nb2KV8Sbxf6Ev7EpxrJFxff9L25hRZvALSqbKR0QJReLMGZbUtJpj65S ovwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MkP6UW/r"; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCWcujaKi0pcwRoGMDLuCWqDG45Tt2UbxB7I7/2iIagAxwiNy5zP9HndaWU4jiR2jY/XBccC1ef36W2BGukAw1pMtsRCZg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i21-20020a1709061cd500b00a382a80b161si1183428ejh.381.2024.02.07.10.06.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 10:06:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="MkP6UW/r"; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56870-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 13BA11F2143E for <ouuuleilei@gmail.com>; Wed, 7 Feb 2024 18:06:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DF3E1350FA; Wed, 7 Feb 2024 17:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MkP6UW/r" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C48912E1FF; Wed, 7 Feb 2024 17:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707328757; cv=none; b=XCSGxIPlIX0xUYnhGsN8k4qhDha/1mQgTWkyYyMRLXWBgfUbJ9XbHAZTFgxgwfNrXGvPpd08NVTx9pCG7wl72SxAEB7a7is68OpNMYDZG+3Qm2rlqDh0fpIJZzZKcodtDFNV3T9EdlhSWxEltkC/NyCI0nJ5jr77ngHhVhpPEXk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707328757; c=relaxed/simple; bh=3pK7WhYRNrzUuExDIrRQm3nMz+8daA5Durxbr8goEqA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rZtypkzkCruF4+WtzOYcROMg4XRswVp+w/KiV5Pkt5D2IyB/I+A1LewlIl8jvFokHESKQ67+pIZo1yCqhxd3EncJswtjBpdv3TfD/50S35jtpEWxvd/NJMsmVt1Y+geGbSQaS9YwvDo99pkZqjdBEtDwPzJjiwurdYQMC5uqinY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MkP6UW/r; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707328756; x=1738864756; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3pK7WhYRNrzUuExDIrRQm3nMz+8daA5Durxbr8goEqA=; b=MkP6UW/r7J2zFPdKcii71cIHypVuCxcYH4n9BtlYmiefG3pi82t5a3Oa bAjUhDe2W+0qGJFJhvsjNph6g6BSDk7PiaiS9niDXjo2qIyj/Ez0v/ksh 32cxftjDiDD3y5BWEh+uNOlP02A/Eu90grm69zlZKLB2aORKkilug60Ce 4kttSkCAhNpmAN/f1mgGZPT8GCHJz33eNpF9sJJL+JVCjg/neVJ8kSkrx 3mxo0jg7MRvXFoWJgE08tZjHBbrnS0u0sE+gTaA5lQxbTsK0tYEyWppeQ sxUCEbxZu1F+Zf3sXnRX4wx7U3kgj4X6zcD/eEjM7Q4p+fJ7AFv3quVdW Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10977"; a="11622640" X-IronPort-AV: E=Sophos;i="6.05,251,1701158400"; d="scan'208";a="11622640" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2024 09:58:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,251,1701158400"; d="scan'208";a="6020744" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmviesa004.fm.intel.com with ESMTP; 07 Feb 2024 09:58:57 -0800 From: Xin Li <xin3.li@intel.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, corbet@lwn.net, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, shuah@kernel.org, vkuznets@redhat.com, peterz@infradead.org, ravi.v.shankar@intel.com, xin@zytor.com Subject: [PATCH v2 16/25] KVM: VMX: Invoke vmx_set_cpu_caps() before nested setup Date: Wed, 7 Feb 2024 09:26:36 -0800 Message-ID: <20240207172646.3981-17-xin3.li@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207172646.3981-1-xin3.li@intel.com> References: <20240207172646.3981-1-xin3.li@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790264408353579020 X-GMAIL-MSGID: 1790264408353579020 |
Series |
Enable FRED with KVM VMX
|
|
Commit Message
Li, Xin3
Feb. 7, 2024, 5:26 p.m. UTC
Set VMX CPU capabilities before initializing nested instead of after,
as it needs to check VMX CPU capabilities to setup the VMX basic MSR
for nested.
Signed-off-by: Xin Li <xin3.li@intel.com>
---
arch/x86/kvm/vmx/vmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index e3409607122d..fc808d599493 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -8912,6 +8912,8 @@ static __init int hardware_setup(void) setup_default_sgx_lepubkeyhash(); + vmx_set_cpu_caps(); + if (nested) { nested_vmx_setup_ctls_msrs(&vmcs_config, vmx_capability.ept); @@ -8920,8 +8922,6 @@ static __init int hardware_setup(void) return r; } - vmx_set_cpu_caps(); - r = alloc_kvm_area(); if (r && nested) nested_vmx_hardware_unsetup();