Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp7058675ybl; Wed, 15 Jan 2020 14:52:20 -0800 (PST) X-Google-Smtp-Source: APXvYqy1ti5ZPkls6na+im2II71+B9+vWbR1VOgm+4zWpc8ZGRuemTNTj/ML75kgHaXb6ssn6DFQ X-Received: by 2002:a9d:53cb:: with SMTP id i11mr4560136oth.158.1579128740473; Wed, 15 Jan 2020 14:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579128740; cv=none; d=google.com; s=arc-20160816; b=IymsMEKD0kVwIBCOyWidZdHD7ble18bg4GD+Ir+ukxuUZn8OklQ2PtEM0473Qt4Xip cThaceEYJZS/gZlK2exb8AOCH735H/NMglL0vjW0ut/3M5VAxIUvqeByKqTrBFtx4vj5 aCV+jqYiAgNlup7kpYdEahhGd/ewU5u+Czdu1mRF6x6AhvUXjtPvntpB4chg8s6BiFgJ LnsAyRYhOzUYsUADiSUJurFQTuYaqqrhVmej7cKwLZlBPliGtCbMB2L15WqPAPHGx21l 5Jh0eTNug02OHk2+dg6H8IUqIYHulh9R8AYuNyrR9T1Gp8fqQ/zJLN6Ud0L2Nu5wxeQo mMnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=61HpVAkdagu3WGEnANJOr7wqqcjf6a5eJzLYJYFC09M=; b=Is/vlOII6Y54IarVecCs/bMi7WbTGzaPaPb59GON1qXAcR1MDr8fsqIjZ1TF635unM aWY/QV5Sfk08c9XdW/sE+WbM4fZvwaw7j4a3+vvQI9476WJtI7AV86oJZtIosk8nX5/b cwcYZVBTEGbBByyGbWOGbinmzuKlgXcGEK0I2FpO137DDWenGWWH+jhhJeVMPn+dm/lh prSHe1sVWoca8ZKsIWmRTUeoWEOPcaoqiUpsOZHOriOvZAFdyoaeMph7qvOWM8SjNYd7 fW4ygcKFHKL0JCY87NDbsUVrjthK2nXAkZe7EsYe6rbFFHQij0LP3szTheEz7sAm1piE 0Jfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3si10349441oic.251.2020.01.15.14.52.08; Wed, 15 Jan 2020 14:52:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730252AbgAOVw3 (ORCPT + 99 others); Wed, 15 Jan 2020 16:52:29 -0500 Received: from mga11.intel.com ([192.55.52.93]:34246 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728925AbgAOVw3 (ORCPT ); Wed, 15 Jan 2020 16:52:29 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 13:52:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,323,1574150400"; d="scan'208";a="218293938" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.21]) by orsmga008.jf.intel.com with ESMTP; 15 Jan 2020 13:52:28 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id B5C4F301003; Wed, 15 Jan 2020 13:52:28 -0800 (PST) Date: Wed, 15 Jan 2020 13:52:28 -0800 From: Andi Kleen To: Josh Poimboeuf Cc: Pawan Gupta , Thomas Gleixner , Borislav Petkov , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Tony Luck , Michal Hocko , linux-kernel@vger.kernel.org, Neelima Krishnan , Dave Hansen Subject: Re: [PATCH] x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR Message-ID: <20200115215228.GH302770@tassilo.jf.intel.com> References: <2529b99546294c893dfa1c89e2b3e46da3369a59.1578685425.git.pawan.kumar.gupta@linux.intel.com> <20200115211513.mxzembrm4hf44d6j@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200115211513.mxzembrm4hf44d6j@treble> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 15, 2020 at 03:15:13PM -0600, Josh Poimboeuf wrote: > On Fri, Jan 10, 2020 at 02:50:54PM -0800, Pawan Gupta wrote: > > /proc/cpuinfo currently reports Hardware Lock Elision (HLE) feature to > > be present on boot cpu even if it was disabled during the bootup. This > > is because cpuinfo_x86->x86_capability HLE bit is not updated after TSX > > state is changed via a new MSR IA32_TSX_CTRL. > > > > Update the cached HLE bit also since it is expected to change after an > > update to CPUID_CLEAR bit in MSR IA32_TSX_CTRL. > > > > Signed-off-by: Pawan Gupta > > Tested-by: Neelima Krishnan > > Reviewed-by: Dave Hansen > > From the Intel TAA deep dive page [1], it says: > > "On processors that enumerate IA32_ARCH_CAPABILITIES[TSX_CTRL] (bit > 7)=1, HLE prefix hints are always ignored." > > So if the CPU has IA32_TSX_CTRL, HLE is implicitly disabled, so why > would the HLE bit have been set in CPUID in the first place? The CPUID is unchanged to avoid problems with software that checks for unchanged CPUID. Unfortunately that exists in the wild. -Andi