Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9928666ybi; Wed, 24 Jul 2019 12:30:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwO0dxpuz47/C+dbyQGPNtz7dsWc8XmLJ13+cYyolL98jOeCIksbdDRhOjTlZ2sLUXhmULT X-Received: by 2002:aa7:8b52:: with SMTP id i18mr13075004pfd.194.1563996610983; Wed, 24 Jul 2019 12:30:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563996610; cv=none; d=google.com; s=arc-20160816; b=Qwh6Do3DqNj1/gIC275jTocg86yYHGUYiZ/vy3oBcHg4ph7gBncz0xT9pH3ehvlDoM AXOVbT6ebAZ1q1Vqr/Qc9Nbm1Mm0kElglKwrJL8LRQ02pc0nxyk0tonrwrkOfRxKuFH0 +dBk2OIrpNE6jc0feqlTILHXPdoL9kNQWB5SqWJ5B3N1/unSpiPEg3AKRCDt06PFGM5Q 0ows+REcDftYmGKH+AKp/H/hrQevlW8niY2OnuKI14tyi0VnWTUFzCa7bIAyfjdZSkIZ LY4a+kiSI2fvXiDCdi61xUk9mTn9k5R10B6n4tWnAUVzED4mkIrKfmOAdoitzv9+hWST QikQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VQ249GSxRgwn1xcf0H5SZeaNgWhKbylpDSD7xo2CIKw=; b=mfk7WFfycAiHKm+67VXSBI75mcGhQ2E5xDwBAix2qn+OrfP6JiQYmsp3iv5r8FBr56 2DVeRbs7RO0jPLvZJ+eWNgD3h3oBNfuTas2PR6q8aZLkFYInnI2ZpTwe8EZLr199XKh0 TYeiXtzs53gN79KaOWKujalmb2nFtJB5P7gOkYEg9coHgbNs1JW4URk5RqVuYGelXC1j 3AbNA8EoCDstSyPt9D6ZJd3vPZ9WwnmbPEFRWva5mbtRU/DUnm+GNrhov/1WVJARwyU4 9OXkUptbPbDoaBWfj9pjvfJhgZF4Ez0k+2o650Ol5R+eThoPeREtuvJGAC2ltYAdhZH7 tCyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="eHv/xLdO"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 61si14353503plq.157.2019.07.24.12.29.55; Wed, 24 Jul 2019 12:30:10 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="eHv/xLdO"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388134AbfGXT1e (ORCPT + 99 others); Wed, 24 Jul 2019 15:27:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:45236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727195AbfGXT13 (ORCPT ); Wed, 24 Jul 2019 15:27:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45334229F4; Wed, 24 Jul 2019 19:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996448; bh=v3MjKObhyjpXhE1fPrp9pGxjjW+gNYX6LJYKcyoeLh4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eHv/xLdOjlqst6gp4nJtg++H+5a7xFKnPzqSY8MnpgAk8Z0iMXtueBnzOQltaHHL2 o4ZES4DZtIefm0/Y8oqIsRhxp7hU5c7c3E9dTDLGkU3pclN0qXdx9cd9o0pTy1W2ic 25n5JC3OV64tZwGhEPOngBDQpkk+lRfpGjrsW/MA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Aaron Lewis , Borislav Petkov , Jim Mattson , Fenghua Yu , Frederic Weisbecker , "H. Peter Anvin" , Ingo Molnar , Konrad Rzeszutek Wilk , marcorr@google.com, Peter Feiner , pshier@google.com, Robert Hoo , Thomas Gleixner , Thomas Lendacky , x86-ml , Sasha Levin Subject: [PATCH 5.2 100/413] x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS Date: Wed, 24 Jul 2019 21:16:31 +0200 Message-Id: <20190724191742.316204840@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit cbb99c0f588737ec98c333558922ce47e9a95827 ] Add the CPUID enumeration for Intel's de-feature bits to accommodate passing these de-features through to kvm guests. These de-features are (from SDM vol 1, section 8.1.8): - X86_FEATURE_FDP_EXCPTN_ONLY: If CPUID.(EAX=07H,ECX=0H):EBX[bit 6] = 1, the data pointer (FDP) is updated only for the x87 non-control instructions that incur unmasked x87 exceptions. - X86_FEATURE_ZERO_FCS_FDS: If CPUID.(EAX=07H,ECX=0H):EBX[bit 13] = 1, the processor deprecates FCS and FDS; it saves each as 0000H. Signed-off-by: Aaron Lewis Signed-off-by: Borislav Petkov Reviewed-by: Jim Mattson Cc: Fenghua Yu Cc: Frederic Weisbecker Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Konrad Rzeszutek Wilk Cc: marcorr@google.com Cc: Peter Feiner Cc: pshier@google.com Cc: Robert Hoo Cc: Thomas Gleixner Cc: Thomas Lendacky Cc: x86-ml Link: https://lkml.kernel.org/r/20190605220252.103406-1-aaronlewis@google.com Signed-off-by: Sasha Levin --- arch/x86/include/asm/cpufeatures.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h index 75f27ee2c263..1017b9c7dfe0 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -239,12 +239,14 @@ #define X86_FEATURE_BMI1 ( 9*32+ 3) /* 1st group bit manipulation extensions */ #define X86_FEATURE_HLE ( 9*32+ 4) /* Hardware Lock Elision */ #define X86_FEATURE_AVX2 ( 9*32+ 5) /* AVX2 instructions */ +#define X86_FEATURE_FDP_EXCPTN_ONLY ( 9*32+ 6) /* "" FPU data pointer updated only on x87 exceptions */ #define X86_FEATURE_SMEP ( 9*32+ 7) /* Supervisor Mode Execution Protection */ #define X86_FEATURE_BMI2 ( 9*32+ 8) /* 2nd group bit manipulation extensions */ #define X86_FEATURE_ERMS ( 9*32+ 9) /* Enhanced REP MOVSB/STOSB instructions */ #define X86_FEATURE_INVPCID ( 9*32+10) /* Invalidate Processor Context ID */ #define X86_FEATURE_RTM ( 9*32+11) /* Restricted Transactional Memory */ #define X86_FEATURE_CQM ( 9*32+12) /* Cache QoS Monitoring */ +#define X86_FEATURE_ZERO_FCS_FDS ( 9*32+13) /* "" Zero out FPU CS and FPU DS */ #define X86_FEATURE_MPX ( 9*32+14) /* Memory Protection Extension */ #define X86_FEATURE_RDT_A ( 9*32+15) /* Resource Director Technology Allocation */ #define X86_FEATURE_AVX512F ( 9*32+16) /* AVX-512 Foundation */ -- 2.20.1