Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3784255ybi; Mon, 29 Jul 2019 12:33:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz3eDcTgDvlQwZs2WdH4Qlc60shEET3p6E+5jwMZP8xV159A9fxcAJi2JRkH4wJuCi7aj4d X-Received: by 2002:a17:902:24c:: with SMTP id 70mr110785026plc.2.1564428815861; Mon, 29 Jul 2019 12:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428815; cv=none; d=google.com; s=arc-20160816; b=oo9gnILiCMXdx87GrV/0KaY/GxXfl9J0EmEufk7j5R3wry2JeJ7HZsL+ec13p1TB7Y Ki1xfDjifPAPXzspKKPxmPSbdJ9+CFgRsHxA3km5urIPV0huJfOpiMqN8grWBt4bAKlm RlYZHR1sn8RzLjNr99MIsr7PHz2MtCByqYPgzgsUXljVdNXA3AySGctewjoVhZcJlcMm 7AlHEccL8YbmmCHH6iPSVgRwxL1RCwWrbMCS1e33kK6+HBfEbDIheYNXSkMG25KjE5b4 bHtxdIOfs1qCejs2Iit5eQ7KYSttpVDvV2AA92Tn4ZbTkr9crCHfmdCPPR2AQAo3cdZB 5crg== 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=OP7/HcrmJC9O5QLwA4EtZF4dExibjVjywVjbabtbjDQ=; b=WmyBK02cTaXrSt2MVLS2uBozxwkqwBVxj6Sg88YbGU53RrA1W9NHB7aPmDQ9XJOJZb 9Wu83+hE+Ccd12rpDLGB0o/5NAloSYoTP7QhStsK22tIGhuPLl6YP5mYVdk8DPtVRX6m emetYUpdTdgIfTkZoRpWgphESWrpnooM5bIdfZKAs2tuGUjJvsM1ad7csD6DZZLRG91A +i8LiwAGJTwZTC2xykvmuV8OoYQ85t0gAoMQgt7ItzM7o1U32x7O/Jd7IJ9x2ag2TEmG istOxl5d6O+PxD10oacTcM8zGkLn+d5c/QwEhwOosEsf6kfPuUUQW7tj3EVGQUF3mdRq oyDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ClUpkKMK; 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 k72si31100581pge.95.2019.07.29.12.33.20; Mon, 29 Jul 2019 12:33:35 -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=ClUpkKMK; 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 S2388335AbfG2T0D (ORCPT + 99 others); Mon, 29 Jul 2019 15:26:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:38390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388324AbfG2T0C (ORCPT ); Mon, 29 Jul 2019 15:26:02 -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 A4C7C20C01; Mon, 29 Jul 2019 19:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428361; bh=+sI7MiA78Xynau4wxY7rl427YDpjWCmjVg0wXCpSfkU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ClUpkKMKGW1aDTn77/k447wgfCpdB712H2aqlR5BlbaMwwlSiaxa5aZfoIpirW3xl WZyCWRBv5xpbv9KyFygbNvsdA1P1rfSwoitJy5FUncVadLkwrdiDLT8EB/nf9WB4DT iq++k0s02XIz3o3pgGoswxU6PquHbVfTQfISWPm0= 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 4.14 050/293] x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS Date: Mon, 29 Jul 2019 21:19:01 +0200 Message-Id: <20190729190827.345614425@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 48ef9ed8226d..4cb8315c521f 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