Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10527516ybi; Thu, 25 Jul 2019 00:56:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIeccEB0hQWiU5xnMb1zkpFSacXAoSz54zrtQG9wPlhwvK55K9u0ytYXWqGbWNoRHTrcPL X-Received: by 2002:a17:90a:1d8:: with SMTP id 24mr92883913pjd.70.1564041418021; Thu, 25 Jul 2019 00:56:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564041418; cv=none; d=google.com; s=arc-20160816; b=M5dlYJp5Pw1IPZV2sYetttDftwXYEX2i3S2IGODYx946JRFUNrSycXClzo80nThoRg I3yDvmpPEC+l1dm+o98VlXPCLKTNCWjbAH5nXC/jDnvNdK4zPm9Qz8XkIpXgPlbp9yq+ IwY7Y0Kx21mrktLSSRdPF2lN/VwIF8e+JBChXaDDlOth6WUbnbR/SxQpoMvPb8XiAXQb +/AMtw2OmpgBYQSg4qvOcyj2b01ibnkW+GnMz1v2SBrd128wpg03kt8pt/WK8vivzoYU t+loV+D+lLOAWV1cNpF+iMXppt2avGVYGv8Ns4L5pNsb0BTHRog+ItsxZ9LRfBSP3jGj GE9g== 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=BDNa1Fg/Ueqo2iY04yXgOrSnk3pTAiR6AfmwTTctN/M=; b=LzbSVJilwBxLQ+u2W2xj8TElCyxdV4biZTzhaf9TCXAxauO31ktz3hXqvHj2Fs/uHq lJcfTsGP3goh5VRfNSyWF43MOa1HMVgVHWT3EdEeg+nvCMp+wd/OIYHsaH4CopSQMLnH QnUsRJV1QCX+UmpkO9sfB+WRoTJ8cV7FcBEjqdoP2RGSMOn6FwG74b4egJTJnCtWK7y3 9IPP/XieDJ3Vm5LtzR0TM2dtpD2QenNn2YKjBlm9S1ZiR5Egj8eQgwqi8TErnj6cUp6L 1FWfAUnElflcgRN9C8uhYAiaKdTLLU0e9zSen9fGuPJXBK7lYN9/Pt7NsxBxCbE2MsR+ aFKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=asQD8dH1; 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 o14si19459027pgk.45.2019.07.25.00.56.39; Thu, 25 Jul 2019 00:56:58 -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=asQD8dH1; 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 S2392518AbfGXUE0 (ORCPT + 99 others); Wed, 24 Jul 2019 16:04:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:55464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392481AbfGXUEY (ORCPT ); Wed, 24 Jul 2019 16:04:24 -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 7D428205C9; Wed, 24 Jul 2019 20:04:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563998663; bh=H9u1xa7YsbUe3hWwnVKvACBm9t0wPTbDfkTZCV9QaKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=asQD8dH1y+D/4VkCYe59OFf9Ha/qUpuQ3APtGYgILTkXGWomTo2tBRp1JqHNCnihL u8QcU2kZBdN8yoW2pyFiRODqBm0MF+m6MROCvAD2Qax43b4a8m4K6zJb2aRnGfFZD9 1MZWZhzXmmmBkpQ3E6t5Muvmgg7QEb1t5s6IFmGs= 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.19 070/271] x86/cpufeatures: Add FDP_EXCPTN_ONLY and ZERO_FCS_FDS Date: Wed, 24 Jul 2019 21:18:59 +0200 Message-Id: <20190724191701.195708124@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191655.268628197@linuxfoundation.org> References: <20190724191655.268628197@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 69037da75ea0..0cf704933f23 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