Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757056AbeAHPIO (ORCPT + 1 other); Mon, 8 Jan 2018 10:08:14 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51864 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757400AbeAHPIN (ORCPT ); Mon, 8 Jan 2018 10:08:13 -0500 Date: Mon, 8 Jan 2018 16:08:00 +0100 From: Peter Zijlstra To: Tim Chen Cc: Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Greg KH , Dave Hansen , Andrea Arcangeli , Andi Kleen , Arjan Van De Ven , David Woodhouse , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature Message-ID: <20180108150800.GI32035@hirez.programming.kicks-ass.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 05, 2018 at 06:12:19PM -0800, Tim Chen wrote: > +void scan_spec_ctrl_feature(struct cpuinfo_x86 *c) > +{ > + 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? > + if (!ibrs_admin_disabled) { > + dynamic_ibrs = 1; > + ibrs_enabled = IBRS_ENABLED; > + } > + } > +}