Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965378AbeAJO76 (ORCPT + 1 other); Wed, 10 Jan 2018 09:59:58 -0500 Received: from mga02.intel.com ([134.134.136.20]:13124 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965361AbeAJO75 (ORCPT ); Wed, 10 Jan 2018 09:59:57 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,340,1511856000"; d="scan'208";a="193859439" Subject: Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code To: Andrea Arcangeli , Thomas Gleixner References: <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> <20180110125710.GH9706@redhat.com> <1515589641.22302.145.camel@infradead.org> <20180110141047.GD9417@redhat.com> Cc: David Woodhouse , Jiri Kosina , "asit.k.mallick" , "Van De Ven, Arjan" , Peter Zijlstra , LKML , Linus Torvalds , x86@kernel.org, Borislav Petkov , Tim Chen , Andi Kleen , Greg KH , Andy Lutomirski From: Dave Hansen Message-ID: <1610a587-fe9e-28bd-dcd1-b9ec940c07ef@intel.com> Date: Wed, 10 Jan 2018 06:59:54 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180110141047.GD9417@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/10/2018 06:10 AM, Andrea Arcangeli wrote: > Tim and Dave please comment too, Tim you originally wrote that code > that leaves IBRS always on and never toggles it in the kernel entry > point so you must know full well if Arjan is correct that you must > toggle IBRS every time you enter kernel and in turn ibrs_enabled 2 > isn't valid mode. Hi Andrea, The "writing IBRS=1 acts as a barrier when it is already IBRS=1" behavior is something which I misunderstood in the past. Thanks, Arjan, for clearing it up.