Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp909662imb; Fri, 1 Mar 2019 18:54:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyQZ8bt9wuCTlAe+RQUs7z73OTYPoITQyegR74L5GKCCpZCY572M6WgewaNhrEvmDLWJzdf X-Received: by 2002:a63:28c1:: with SMTP id o184mr8125467pgo.123.1551495240223; Fri, 01 Mar 2019 18:54:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551495240; cv=none; d=google.com; s=arc-20160816; b=t96/Ldlj3HfcLVpLj/mh3D32jqW+K+jOjbj2eK42RRHXQW85Ycd0AQguUH6VaCLOwn Vj5FgoDLas33ZbaxzT1eouQFakyqj4EZOwe+ugpZM2VJM9bVvLqKd8TaCbkj4+eEpfrD 8xjHEsN/mFAlbspDt5LnkTWHkNIr3d1RXu2nNZFXmJy843NaNwOGUDgyG7bCh0ed7hiR T7ks+q2Df6VhxvRr+oi3h15iAgBF+OiXyAPa2tqenz8AoI8t0bbnIzkpVDFOrNOtb1t2 fZb0Hd/wrFTQzh9s7Vk8Zm/Ai2dWGja+ehaZYList3MeZ4TjsBFF811aqLsKQPnD23qA CkHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=75io6B5+Jb/kq9DkgN6Mei3bmNiuPuhy04LYkH0zJJQ=; b=BZH8sM4ZRrWLsAM2RJZKOzzkHv85v68R+1hcJYebFzxl3LvJA3yapoaloBEbSTSRsF PNHGUZmVSlk0qjFlc2YBGKaxsjdlbNDbpy+TlXVUZq8Ve1Ir/BkMI7PD/O/K9Tr7dVG8 AqUEVnryZ88tGoHz0UZF/bu95Da7mJKLTQiayfCpZ8AjfJSoVVGTGxXnMNEyHD4/Lvg8 RmjCih6iix3x1KKoMdFXZnNw+bbPR9vwaoTjtkRRH179Ufu9OlOcaDuxuMRQt9tkaXvi ttj+s/fCb5q+21+ug3tafqx5Cpm3unezImxLtjy7TO/zpbPawS41apYSZTWnoy5YQK4N BcQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 38si8612039plc.288.2019.03.01.18.53.30; Fri, 01 Mar 2019 18:54:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727985AbfCBCwo (ORCPT + 99 others); Fri, 1 Mar 2019 21:52:44 -0500 Received: from mga04.intel.com ([192.55.52.120]:49764 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727899AbfCBCwd (ORCPT ); Fri, 1 Mar 2019 21:52:33 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2019 18:52:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,430,1544515200"; d="scan'208";a="148572631" Received: from romley-ivt3.sc.intel.com ([172.25.110.60]) by fmsmga004.fm.intel.com with ESMTP; 01 Mar 2019 18:52:29 -0800 From: Fenghua Yu To: "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" , "H Peter Anvin" , "Paolo Bonzini" , "Dave Hansen" , "Ashok Raj" , "Peter Zijlstra" , "Ravi V Shankar" , "Xiaoyao Li " Cc: "linux-kernel" , "x86" , kvm@vger.kernel.org, Xiaoyao Li Subject: [PATCH v4 15/17] kvm: x86: Report CORE_CAPABILITY on GET_SUPPORTED_CPUID Date: Fri, 1 Mar 2019 18:45:09 -0800 Message-Id: <1551494711-213533-16-git-send-email-fenghua.yu@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1551494711-213533-1-git-send-email-fenghua.yu@intel.com> References: <1551494711-213533-1-git-send-email-fenghua.yu@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xiaoyao Li In the latest Intel SDM, CPUID.(EAX=7H,ECX=0):EDX[30] will enumerate the presence of the IA32_CORE_CAPABILITY MSR. Update GET_SUPPORTED_CPUID to expose this feature bit to user space, so that user space know this bit can be enabled in CPUID. Signed-off-by: Xiaoyao Li --- arch/x86/kvm/cpuid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index c07958b59f50..e0e17b9c65da 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm/cpuid.c @@ -410,7 +410,8 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, /* cpuid 7.0.edx*/ const u32 kvm_cpuid_7_0_edx_x86_features = F(AVX512_4VNNIW) | F(AVX512_4FMAPS) | F(SPEC_CTRL) | - F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES) | F(INTEL_STIBP); + F(SPEC_CTRL_SSBD) | F(ARCH_CAPABILITIES) | F(CORE_CAPABILITY) | + F(INTEL_STIBP); /* all calls to cpuid_count() should be made on the same cpu */ get_cpu(); -- 2.7.4