From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: ACJfBosLNo2fDe4VzZdtduii2MCV0tPMmJYMuT89hGhubFXMVv4zzl3mX3EkXBzaRpm651k9QfNE ARC-Seal: i=1; a=rsa-sha256; t=1516376864; cv=none; d=google.com; s=arc-20160816; b=PMWDWgRwhnDPozySof4qsS0tDpU5tsqJQlFDKcET1AfkZovfMGqSgUQVHrOwGhZs/z o0mLycLBVScxb8j6r2/dK8KcukH2681EQq0BmGIlEAt3gbcXlWU0nq5aiYoQgw1LTbVk aF+hmRHWwG0S68aYR7zy71n+wws5FHY8aetr7kpBqTvUYDbbwsh8ofu4L6dp2+uBZZ+c JuAXqo9jyI0H/PKz1EZhfzK/8WX9XEJnaZnZcRuYt+6h+94OWcqxo0tJFS0Bac45+jKs tDd5aLtOicK/xaickepz2GKelqAHDZXIrssXMXGgBufH5u/ZshO5y3sMVbgB62SuE5ra pHtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:arc-authentication-results; bh=FvSg35DVOLStvfYdYIseDCqnn9Oml1Dkyb3QWMFjFns=; b=kw80EwW4KdzQJOTSXvj7+gNhQrxubLEzqKTWroEYXF9wO2T15umykeBt0FWeJ7iXgM epbX5tB6BGJRJZVeVqlBu4U0WWUqL1yiJIUngvaMGAJ6Uyo3EN/zgL5VQPkY9/CqQGa/ ToqdpZrLtYQEX0l4xmbuy0+shflR9P1CL7glxjepB1x5PDwtgy+eJltOLrwakIpM0Uw3 OQ4fWQoNCb2knl4YeFKgd5E4VGCo5aNHyL9OatpbXpB687c6unGPumgDkp0IZwaoorFr lJVVzmQmbafbPPeUinZjNYJAYYXZ8o02LRzblSc/JvZx36+Nt0AdQlJEzQlVtbvmohEp 2v6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of aarcange@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=aarcange@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Authentication-Results: mx.google.com; spf=pass (google.com: domain of aarcange@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=aarcange@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcSW1wb3J0YW50Ig==?= X-GMAIL-THRID: =?utf-8?q?1589948948566960870?= X-GMAIL-MSGID: =?utf-8?q?1590036387021753304?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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