From patchwork Mon Feb 27 08:45:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hoo X-Patchwork-Id: 13153103 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 7BF39C64ED8 for ; Mon, 27 Feb 2023 08:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231710AbjB0I4j (ORCPT ); Mon, 27 Feb 2023 03:56:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbjB0I4E (ORCPT ); Mon, 27 Feb 2023 03:56:04 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E272D1114B for ; Mon, 27 Feb 2023 00:48:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677487682; x=1709023682; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=e8fJJStm95QS8qPwDBv072byIRMXgz9xMMo6V5XCCvA=; b=AK/fmqRzYDCPosFzu5nSYJy8Zw6G/wVaNtN+2/Oy2BwBXhTOP3ilai7T KOPKfCpqDm71ikfrrp8XAql9FhcH2GFGFQ5SlcluINr5BLXl2DhjUFN+c gP5A7RNVWTF6pGP2XG2cpCWobomQKTKSg6LeWF5pbd4G0mVtdZeL13OHN rmxwTed0IIb3bo1bE/FcH6JcSG/mwf4kf7eV7k9vM92qAckJD63pXKSoG 0pSZGTWc9f/gyW2/PV9LdiPXed2D20xUrJ4bTGJn4/IEKPhfxCRXa/r8n Zvmk07GkCr7bjijwz0CZ8fCyjjDZg5pUInO+zcceN6cSB56ibHUbRavR3 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10633"; a="322057707" X-IronPort-AV: E=Sophos;i="5.97,331,1669104000"; d="scan'208";a="322057707" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Feb 2023 00:46:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10633"; a="651127095" X-IronPort-AV: E=Sophos;i="5.97,331,1669104000"; d="scan'208";a="651127095" Received: from sqa-gate.sh.intel.com (HELO robert-clx2.tsp.org) ([10.239.48.212]) by orsmga006.jf.intel.com with ESMTP; 27 Feb 2023 00:46:19 -0800 From: Robert Hoo To: seanjc@google.com, pbonzini@redhat.com, chao.gao@intel.com, binbin.wu@linux.intel.com Cc: kvm@vger.kernel.org, Robert Hoo , Jingqi Liu Subject: [PATCH v5 5/5] KVM: x86: LAM: Expose LAM CPUID to user space VMM Date: Mon, 27 Feb 2023 16:45:47 +0800 Message-Id: <20230227084547.404871-6-robert.hu@linux.intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230227084547.404871-1-robert.hu@linux.intel.com> References: <20230227084547.404871-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,