Received: by 10.223.176.46 with SMTP id f43csp1856846wra; Sun, 21 Jan 2018 06:04:09 -0800 (PST) X-Google-Smtp-Source: AH8x227YhcMty5eGfFyTsySOc+zW5ep2f3+gKzSSm5NQv0m8fLqx8tUQhYwe0JOs8vKGMqJqNaI3 X-Received: by 10.101.70.140 with SMTP id h12mr4679752pgr.166.1516543448942; Sun, 21 Jan 2018 06:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516543448; cv=none; d=google.com; s=arc-20160816; b=pHSyozR34YCaoJDDq3xJLNJSR3yX0SVV2huK9Y1tGpzrFBMYouEr4d0DsAw97GzNGS RJqOAxtJc8dXk0trbL+2eBGvETVUlBw9j1dZqlei4n440LsEGB8Zxg/XNbZu9Etkboow 21UYqEr+h52BkEkcunH3NRJyozd1fPGovIeJ6/y+kGeQq+sysZ1ImM9Ari/m0ouTYrUF cySJxwvY+dJrab3uU8gbxKE+2JuJpRPnYVxWA0bZQgf3Ym3RGMITsHjB5vb3AiRNywOJ kZgfvJUj2X9YWVc0jaIwgAdNUFm2dEhcmvXCbrJnbQMgXMQVqZN0euUQ9L7+keUXPUPt Q+eg== 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:user-agent :in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:dkim-signature:arc-authentication-results; bh=6DAX46yD4rbJpXXRmXjyuVVwxY8g7EJ8lneTN2PG+Yc=; b=q8mpPVgM4UJAxDHB0JUfsH8sJX3TrShvuRfOA6wh2IRklGi6H1m4AxVAfhbE04//Lu npVU2iWRfrZolIfaOMsh5kcpySOTFs8b8J3x44l9Uh33anCfgOCggJlt2lOYI0oRa8Nt 3iv33gOOcKuLnW7O6rpOF7bbJa7RdoXSltaTTWUortvHyJT8S0YVA+g0ARuWh9h+Y8dj NNPJjcoySxqiPb1uJna7zUzuMxW3oSmlHEMr3pKYxhcnYuA1zglTB8INBr3IelUKH2r+ mVgsDnuxSgmH0OdBjwiUD+atJ/xoHNYShZpDxVKk5FmFELv2jWJSnX2KNFZ/0Idu/DxK OazQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=HZT+pnH8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t8si12079834pgb.198.2018.01.21.06.03.42; Sun, 21 Jan 2018 06:04:08 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=HZT+pnH8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbeAUODF (ORCPT + 99 others); Sun, 21 Jan 2018 09:03:05 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:48766 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004AbeAUODD (ORCPT ); Sun, 21 Jan 2018 09:03:03 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0LE2Alt089796; Sun, 21 Jan 2018 14:02:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to : content-transfer-encoding; s=corp-2017-10-26; bh=6DAX46yD4rbJpXXRmXjyuVVwxY8g7EJ8lneTN2PG+Yc=; b=HZT+pnH8ZDDebaJUs+tKPHLVGVsCW5OfOXyYMKOrn1BqEqoZNdngFpRzvdni+Jz8fhju ykD4GutPwISBJdU6bblw984T3QRLRVHgteEVu5Ky3S5LqS4YDczHmiA183G8AsL6nXWV fql1tUaahBfg15uDVU6AjtbaSoegPpCIu+k1AjvHJNsyOtKZvOtaKmRc0aLRq7E97/sH tb2n/mqV4abB80z+mR90mfPJJ/BHgygV2D3LOjzs0c063d3bucIsyIAg3l0KpP9xmGQt o5BiO5s120pKPIjvSk1CP/9jeOlhyZ/n359k+TJah6V43e6ZDPvdP2m7d8cawqHzJ8f1 Uw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2fmtskr4kf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 21 Jan 2018 14:02:10 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0LE2921012369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 21 Jan 2018 14:02:09 GMT Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w0LE27Jx030872; Sun, 21 Jan 2018 14:02:07 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 21 Jan 2018 06:02:07 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id 3F9BC6A0180; Sun, 21 Jan 2018 09:02:05 -0500 (EST) Date: Sun, 21 Jan 2018 09:02:05 -0500 From: Konrad Rzeszutek Wilk To: KarimAllah Ahmed , Mihai Carabas Cc: linux-kernel@vger.kernel.org, Andi Kleen , Andrea Arcangeli , Andy Lutomirski , Arjan van de Ven , Ashok Raj , Asit Mallick , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , Greg Kroah-Hartman , "H . Peter Anvin" , Ingo Molnar , Janakarajan Natarajan , Joerg Roedel , Jun Nakajima , Laura Abbott , Linus Torvalds , Masami Hiramatsu , Paolo Bonzini , Peter Zijlstra , Radim =?utf-8?B?S3LEjW3DocWZ?= , Thomas Gleixner , Tim Chen , Tom Lendacky , kvm@vger.kernel.org, x86@kernel.org Subject: Re: [RFC 00/10] Speculation Control feature support Message-ID: <20180121140205.GB21306@char.us.oracle.com> References: <1516476182-5153-1-git-send-email-karahmed@amazon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1516476182-5153-1-git-send-email-karahmed@amazon.de> User-Agent: Mutt/1.8.3 (2017-05-23) Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8780 signatures=668655 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801210206 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 20, 2018 at 08:22:51PM +0100, KarimAllah Ahmed wrote: > Start using the newly-added microcode features for speculation control = on both > Intel and AMD CPUs to protect against Spectre v2. Thank you posting these. >=20 > This patch series covers interrupts, system calls, context switching be= tween > processes, and context switching between VMs. It also exposes Indirect = Branch > Prediction Barrier MSR, aka IBPB MSR, to KVM guests. >=20 > TODO: >=20 > - Introduce a microcode blacklist to disable the feature for broken mic= rocodes. > - Restrict/Unrestrict the speculation (by toggling IBRS) around VMExit = and > VMEnter for KVM and expose IBRS to guests. >=20 Depend on what we expose to the guest. That is if the guest is not suppos= e to have this exposed (say cpuid 27 bit is not exposed) then trap on the MSR (and give an #GP)? Mihai (CC-ed) is working on this, when ready he can post an patch against= this tree? > Ashok Raj (1): > x86/kvm: Add IBPB support >=20 > David Woodhouse (1): > x86/speculation: Add basic IBRS support infrastructure >=20 > KarimAllah Ahmed (1): > x86: Simplify spectre_v2 command line parsing >=20 > Thomas Gleixner (4): > x86/speculation: Add basic support for IBPB > x86/speculation: Use Indirect Branch Prediction Barrier in context > switch > x86/speculation: Add inlines to control Indirect Branch Speculation > x86/idle: Control Indirect Branch Speculation in idle >=20 > Tim Chen (3): > x86/mm: Only flush indirect branches when switching into non dumpable > process > x86/enter: Create macros to restrict/unrestrict Indirect Branch > Speculation > x86/enter: Use IBRS on syscall and interrupts >=20 > Documentation/admin-guide/kernel-parameters.txt | 1 + > arch/x86/entry/calling.h | 73 ++++++++++ > arch/x86/entry/entry_64.S | 35 ++++- > arch/x86/entry/entry_64_compat.S | 21 ++- > arch/x86/include/asm/cpufeatures.h | 2 + > arch/x86/include/asm/mwait.h | 14 ++ > arch/x86/include/asm/nospec-branch.h | 54 ++++++- > arch/x86/kernel/cpu/bugs.c | 183 +++++++++++++++-= -------- > arch/x86/kernel/process.c | 14 ++ > arch/x86/kvm/svm.c | 14 ++ > arch/x86/kvm/vmx.c | 4 + > arch/x86/mm/tlb.c | 21 ++- > 12 files changed, 359 insertions(+), 77 deletions(-) >=20 >=20 > Cc: Andi Kleen > Cc: Andrea Arcangeli > Cc: Andy Lutomirski > Cc: Arjan van de Ven > Cc: Ashok Raj > Cc: Asit Mallick > Cc: Borislav Petkov > Cc: Dan Williams > Cc: Dave Hansen > Cc: David Woodhouse > Cc: Greg Kroah-Hartman > Cc: H. Peter Anvin > Cc: Ingo Molnar > Cc: Janakarajan Natarajan > Cc: Joerg Roedel > Cc: Jun Nakajima > Cc: Laura Abbott > Cc: Linus Torvalds > Cc: Masami Hiramatsu > Cc: Paolo Bonzini > Cc: Peter Zijlstra > Cc: Radim Kr=C4=8Dm=C3=A1=C5=99 > Cc: Thomas Gleixner > Cc: Tim Chen > Cc: Tom Lendacky > Cc: kvm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: x86@kernel.org >=20 > --=20 > 2.7.4 >=20