Received: by 10.223.176.46 with SMTP id f43csp1167124wra; Fri, 19 Jan 2018 07:49:01 -0800 (PST) X-Google-Smtp-Source: ACJfBoskL2jFSK0SBkRyQK1a60KYLJEQGRbBcUemViu8DUct0iEvhV+S4lDcKK5+KIzvkuhL6mPM X-Received: by 2002:a17:902:22f:: with SMTP id 44-v6mr1783276plc.120.1516376941566; Fri, 19 Jan 2018 07:49:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516376941; cv=none; d=google.com; s=arc-20160816; b=nzyGxzkEpXmvHJ7cFl3/8tdVKz1DoUrYlcGGicKSj654/btAtgZ69eSwZIqG1m1mdV iVc+tWWU8VEfA8X8uUpeORtums1AsTMHhvjczrHbK7c8rlb6EFykNrMj68v205CCDrxI zl1ZCPmR80dChM9poqONogjg05yLGP6UknUVAgOfE+E9NJj6nltM1os5FZqKlVo2wgN/ VtXXYyYPNWXE+yvvY9nZVarNP1yw49oLVlTDuSaf2QQWYY26KOei81Us+eF+uRGmej8g AZvzQRFf+qTb5gVb3Gt6kh+pm0j5GF8z0WiDgF7sM6btCcnjqK5eAP+GrXBsHSml4jWl nqRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=FvSg35DVOLStvfYdYIseDCqnn9Oml1Dkyb3QWMFjFns=; b=ZxzIgg3AqMbbzdlp2hqF4AfNNlAs4cWuoac9CB+VuN2hHgDgzu+oF7RSpyQgrsDl65 /0sIO/ZJm1wIOAmxXRKaNfnN58cwaWMPrcxnd0Er0ojNW90ahOPUktiIEUCEkGekGsAx oqWM1TVtLKAfblZ6sDsHL1njBuRSosZAsKkx7n8ZyOLDpUTKZtQMdKWcG4T0AymwH2Wa mgBSTQO1WBn7kxsvjAolJC6pmvGfcS8QrkFoUbiqtk77ECNCADD/XNY/SxKZk3X5R4kP D8k+oosJ8xkc4UcPfeY1/veRmxBkCymyH825gp2Y4XJYEB9Qgf7gdAOk/FBtnpNGGGT5 cphw== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q14-v6si908278pls.557.2018.01.19.07.48.47; Fri, 19 Jan 2018 07:49:01 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756157AbeASPrv (ORCPT + 99 others); Fri, 19 Jan 2018 10:47:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755700AbeASPro (ORCPT ); Fri, 19 Jan 2018 10:47:44 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D5032C0567A2; Fri, 19 Jan 2018 15:47:43 +0000 (UTC) Received: from mail.random (ovpn-116-144.ams2.redhat.com [10.36.116.144]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 728705C25E; Fri, 19 Jan 2018 15:47:43 +0000 (UTC) Date: Fri, 19 Jan 2018 16:47:42 +0100 From: Andrea Arcangeli To: "Van De Ven, Arjan" Cc: Andy Lutomirski , Josh Poimboeuf , Paolo Bonzini , "Hansen, Dave" , Peter Zijlstra , David Woodhouse , Thomas Gleixner , LKML , "Raj, Ashok" , Tim Chen , Linus Torvalds , Greg KH , Andi Kleen , "Williams, Dan J" , "Nakajima, Jun" , "Mallick, Asit K" , Jason Baron Subject: Re: [PATCH 23/35] x86/speculation: Add basic speculation control code Message-ID: <20180119154742.GA24935@redhat.com> References: <20180118140152.830682032@infradead.org> <20180118163745.t5nmwdr53wjsl7o5@treble> <73a5735a-6a5b-0e0f-1f0b-e7cd955880d2@intel.com> <20180118182431.xvmk6kzxpzu43b43@treble> <20180118190842.GA14136@redhat.com> <20180119014105.GD14136@redhat.com> <0575AF4FD06DD142AD198903C74E1CC87A5E9136@ORSMSX103.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0575AF4FD06DD142AD198903C74E1CC87A5E9136@ORSMSX103.amr.corp.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 19 Jan 2018 15:47:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 19, 2018 at 04:15:33AM +0000, Van De Ven, Arjan wrote: > there is no such guarantee. Some of the IBRS implementations will > actually flush rather than disable, or flush parts and disable other > parts. To me it helps in order to memorize the spec to understand why the spec is the way it is. I tried to help explaining some of that, but I notice that I created more confusion... I never intended IBPB can be skipped in user to user switches if leaving IBRS set in userland, that's not what we do and it wouldn't be ok with certain smarter CPUs. > yes the wording is a bit cryptic, but it's also very explicit about > what it covers (and the rest is not covered!) and had to allow a few > different implementations unfortunately. We already follow the spec to the letter and we only depend on what is covered there. Surely the specs already explain everything better than I could ever do, so if anything wasn't clear in the two previous emails where I failed to explain the difference between setting or leaving IBRS set in userland (ibrs_user) and setting or leaving STIBP set in userland (stibp_user) you'll find all answers in the very explicit spec per above quote. Thanks, Andrea