Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935352AbeAHRCZ (ORCPT + 1 other); Mon, 8 Jan 2018 12:02:25 -0500 Received: from mga03.intel.com ([134.134.136.65]:55378 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932624AbeAHRCY (ORCPT ); Mon, 8 Jan 2018 12:02:24 -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,330,1511856000"; d="scan'208";a="19249526" Subject: Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature To: "Van De Ven, Arjan" , Peter Zijlstra Cc: Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Greg KH , "Hansen, Dave" , Andrea Arcangeli , Andi Kleen , David Woodhouse , "linux-kernel@vger.kernel.org" References: <20180108150800.GI32035@hirez.programming.kicks-ass.net> <0575AF4FD06DD142AD198903C74E1CC87A56EF1A@ORSMSX103.amr.corp.intel.com> From: Tim Chen Message-ID: <1273a895-6a8c-dc62-3b8d-a83c37c2c89d@linux.intel.com> Date: Mon, 8 Jan 2018 09:02:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <0575AF4FD06DD142AD198903C74E1CC87A56EF1A@ORSMSX103.amr.corp.intel.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/08/2018 07:29 AM, Van De Ven, Arjan wrote: >>> + if ((!c->cpu_index) && (boot_cpu_has(X86_FEATURE_SPEC_CTRL))) { >> >> We should test X86_BUG_SPECTRE_V1 here too before default enabling this, >> no? > > > we shouldn't default enable this. > Patch 7 disables ibrs if retpoline is in use. Tim