Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbeADXmb (ORCPT + 1 other); Thu, 4 Jan 2018 18:42:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43884 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbeADXma (ORCPT ); Thu, 4 Jan 2018 18:42:30 -0500 Date: Fri, 5 Jan 2018 00:42:27 +0100 From: Andrea Arcangeli To: Tim Chen Cc: Peter Zijlstra , Thomas Gleixner , Andy Lutomirski , Linus Torvalds , Greg KH , Dave Hansen , Andi Kleen , Arjan Van De Ven , linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] x86/idle: Disable IBRS entering idle and enable it on wakeup Message-ID: <20180104234227.GB13348@redhat.com> References: <50b92931dd3cd403d60e69533f5583bbdbbb88d0.1515086770.git.tim.c.chen@linux.intel.com> <20180104224731.GE32035@hirez.programming.kicks-ass.net> <0ebb1848-c3ab-f636-f6f9-67716e814915@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ebb1848-c3ab-f636-f6f9-67716e814915@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 04 Jan 2018 23:42:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 04, 2018 at 03:22:09PM -0800, Tim Chen wrote: > No one should be calling this with IRQs enabled. This check is probably > just paranoid. I can get rid of it. Yes, confirmed. > It probably doesn't matter as we will be switching the check > to the spec_ctrl_ibrs a couple of patches later. The other problem with static_cpu_has is later the code intends to support the cpuid rescan post late microcode update which will set bits in boot_cpu_data (and transfer them to each cpu_has). If we'd only support early microcode update static_cpu_has should have been ok too.