From patchwork Thu Feb 9 02:40:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hoo X-Patchwork-Id: 13133894 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C64EC05027 for ; Thu, 9 Feb 2023 02:42:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232186AbjBICmD (ORCPT ); Wed, 8 Feb 2023 21:42:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232237AbjBICl1 (ORCPT ); Wed, 8 Feb 2023 21:41:27 -0500 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B50E82B2A0 for ; Wed, 8 Feb 2023 18:41:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675910483; x=1707446483; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e8fJJStm95QS8qPwDBv072byIRMXgz9xMMo6V5XCCvA=; b=jQwKsSOHCTDtQrta/WZTYfa8M6rlrhNNdEjJPBt+OFsTRpKZVHE2bmDt bLewKNbk5VBKSLScJMAoP+JpD6OXzkDodux3hZVtlWZLd0bRp2QIhKLsh m4oFqyWT+KxyPT1K24mrVFmBTu9ZZf19n2h7ekjh8B5gTJDne/9EfhuY7 AAswwMFG5xAit7xXu5LkSBGaugUoHzbsfYrNVr0oTYLgon4fptRgT1aw7 vNATP4qyytv2Fk3uJfwt2RtgW5ot2rKN6JJItTCToLkpsF65NYMWXSgm6 sZ0yoLohQJKcvtdGCQgqVfy83KC5/QJLmMWCnmUm83mhNbY4cX405JwHA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="394586692" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="394586692" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 18:41:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="645094483" X-IronPort-AV: E=Sophos;i="5.97,281,1669104000"; d="scan'208";a="645094483" Received: from sqa-gate.sh.intel.com (HELO robert-clx2.tsp.org) ([10.239.48.212]) by orsmga006.jf.intel.com with ESMTP; 08 Feb 2023 18:41:20 -0800 From: Robert Hoo To: seanjc@google.com, pbonzini@redhat.com, yu.c.zhang@linux.intel.com, yuan.yao@linux.intel.com, jingqi.liu@intel.com, weijiang.yang@intel.com, chao.gao@intel.com, isaku.yamahata@intel.com Cc: kirill.shutemov@linux.intel.com, kvm@vger.kernel.org, Robert Hoo Subject: [PATCH v4 9/9] KVM: x86: LAM: Expose LAM CPUID to user space VMM Date: Thu, 9 Feb 2023 10:40:22 +0800 Message-Id: <20230209024022.3371768-10-robert.hu@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230209024022.3371768-1-robert.hu@linux.intel.com> References: <20230209024022.3371768-1-robert.hu@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org LAM feature is enumerated by (EAX=07H, ECX=01H):EAX.LAM[bit26]. Signed-off-by: Robert Hoo Reviewed-by: Jingqi Liu --- arch/x86/kvm/cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index b14653b61470..79f45cbe587e 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -664,7 +664,7 @@ void kvm_set_cpu_caps(void) kvm_cpu_cap_mask(CPUID_7_1_EAX, F(AVX_VNNI) | F(AVX512_BF16) | F(CMPCCXADD) | F(AMX_FP16) | - F(AVX_IFMA) + F(AVX_IFMA) | F(LAM) ); kvm_cpu_cap_init_kvm_defined(CPUID_7_1_EDX,