Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934474AbeAJMtL (ORCPT + 1 other); Wed, 10 Jan 2018 07:49:11 -0500 Received: from twin.jikos.cz ([91.219.245.39]:55432 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933868AbeAJMtJ (ORCPT ); Wed, 10 Jan 2018 07:49:09 -0500 Date: Wed, 10 Jan 2018 13:47:22 +0100 (CET) From: Jiri Kosina To: Andrea Arcangeli cc: David Woodhouse , Peter Zijlstra , Dave Hansen , Thomas Gleixner , LKML , Linus Torvalds , x86@kernel.org, Borislav Petkov , Tim Chen , Andi Kleen , Greg KH , Andy Lutomirski , Arjan Van De Ven Subject: Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code In-Reply-To: <20180110124119.GG9706@redhat.com> Message-ID: References: <20180110011350.855878109@linutronix.de> <20180110092234.GY29822@worktop.programming.kicks-ass.net> <1515576479.22302.81.camel@infradead.org> <20180110115419.GA9706@redhat.com> <1515585534.22302.122.camel@infradead.org> <20180110120158.GB9706@redhat.com> <1515586174.22302.126.camel@infradead.org> <20180110121755.GD9706@redhat.com> <1515587384.22302.132.camel@infradead.org> <20180110124119.GG9706@redhat.com> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 10 Jan 2018, Andrea Arcangeli wrote: > Perhaps the confusing come from "less privileged prediction mode" and > you thought that meant "less privileged ring mode". It says "predction > mode" not ring 3. Well, prediction mode is defined by "CPL3 vs CPL0-2" and "VMX root vs VMX non-root", with obvious ordering of privileges. So if IBRS is set, branch predictor will not allow the predicted target to be influenced by code that executed in less privileged prediction mode before value of '1' IBRS mode was last written to, and that's pretty much it. -- Jiri Kosina SUSE Labs