From patchwork Thu Nov 10 13:28:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hoo X-Patchwork-Id: 13038792 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 F2B0AC4332F for ; Thu, 10 Nov 2022 13:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230498AbiKJN32 (ORCPT ); Thu, 10 Nov 2022 08:29:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230494AbiKJN3W (ORCPT ); Thu, 10 Nov 2022 08:29:22 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D4D773761 for ; Thu, 10 Nov 2022 05:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668086959; x=1699622959; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ANvf/+DuZdNP+k0tyUr4KncUf13m/TMY5kMB8zUMcX8=; b=NnlvVX2q9gWTh/lfTuOvA81jNEABCE70LPs2/S8AAtMx5k/MBhk+gujt AWaebejnGmPFCxcbb0NXjV7VtvA5LCaC6+QRm9AUX4Kql2OXesLlyXElJ pNtuAIDjb2RRWDNE9XQI3A3veYxpzWgnCDspXvMwT+V3o0HlH49E8zNuc 6BsI5EGMb3Dl/5qc2/UJ9F2of9uFsHNZU2eicOJsAN33FxT7LZij5j/fB AlZjkNBxB4eN1xPlVo9JCJDcZcRMblyOtFR4Slss+jdCmdsvBAo9c2FVo RcFGhiFksV04vCkyGnfxJnPrKMnVIjR152Fu57PvuxYM/Bgh+73UYx0u3 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="311306369" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="311306369" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2022 05:29:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10526"; a="812038354" X-IronPort-AV: E=Sophos;i="5.96,153,1665471600"; d="scan'208";a="812038354" Received: from sqa-gate.sh.intel.com (HELO robert-clx2.tsp.org) ([10.239.48.212]) by orsmga005.jf.intel.com with ESMTP; 10 Nov 2022 05:29:17 -0800 From: Robert Hoo To: pbonzini@redhat.com, seanjc@google.com, kirill.shutemov@linux.intel.com Cc: kvm@vger.kernel.org, Robert Hoo , Jingqi Liu Subject: [PATCH v2 9/9] KVM: x86: LAM: Expose LAM CPUID to user space VMM Date: Thu, 10 Nov 2022 21:28:48 +0800 Message-Id: <20221110132848.330793-10-robert.hu@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221110132848.330793-1-robert.hu@linux.intel.com> References: <20221110132848.330793-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 02baeb936974..49592c699272 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -657,7 +657,7 @@ void kvm_set_cpu_caps(void) kvm_cpu_cap_set(X86_FEATURE_SPEC_CTRL_SSBD); kvm_cpu_cap_mask(CPUID_7_1_EAX, - F(AVX_VNNI) | F(AVX512_BF16) + F(AVX_VNNI) | F(AVX512_BF16) | F(LAM) ); kvm_cpu_cap_mask(CPUID_D_1_EAX,