Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752662AbeADSgc (ORCPT + 1 other); Thu, 4 Jan 2018 13:36:32 -0500 Received: from mga07.intel.com ([134.134.136.100]:20618 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751762AbeADSgb (ORCPT ); Thu, 4 Jan 2018 13:36:31 -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,315,1511856000"; d="scan'208";a="21451520" Subject: Re: [PATCH 6/7] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature To: Borislav Petkov , Tim Chen References: <4d4b3752e8e533201c6983d8473eea95c747ea33.1515086770.git.tim.c.chen@linux.intel.com> <20180104183345.od2o4hsfu2tv6nc4@pd.tnic> Cc: Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Greg KH , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , linux-kernel@vger.kernel.org From: Dave Hansen Message-ID: Date: Thu, 4 Jan 2018 10:36:30 -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: <20180104183345.od2o4hsfu2tv6nc4@pd.tnic> 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/04/2018 10:33 AM, Borislav Petkov wrote: >> 2. At run time >> echo 0 > /sys/kernel/debug/ibrs_enabled will turn off IBRS >> echo 1 > /sys/kernel/debug/ibrs_enabled will turn on IBRS in kernel >> echo 2 > /sys/kernel/debug/ibrs_enabled will turn on IBRS in both userspace and kernel > I am not sure that tristate is really needed. What's wrong with on/off > only? Lots of things: Distros have the tri-state already deployed. Paranoid people want "IBRS always" aka "ibrs 2". Future CPUs may have cheap-enough IBRS to not be worth switching it.