Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6982539ybl; Wed, 15 Jan 2020 13:27:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwHyw96/Rb1eo/IJEyVrX0GfPk4BIt14fhS9MLUWa5zRP/7op9G2LBBX4dD6TW3F+/66UUC X-Received: by 2002:aca:ec4f:: with SMTP id k76mr1543215oih.156.1579123632829; Wed, 15 Jan 2020 13:27:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579123632; cv=none; d=google.com; s=arc-20160816; b=EU/bwCIXSenJTKfS8eJySFfr1waJyJ5pviuHvjwDPBq1fi6ZFSEeVC2pwqsw+1NXfU 82hvtmSCT3rWqkGhoRd29U2UNfCuq16DV9IvYQ+6hDHKX3xWdhaKXEZalrH6XqTHqCGA 9VQAmliGVX/ovByEQPPGttuReDErzBockY9aFAHnyq57xpjrGc3ONEy5dSXPNKtO7GMO t04MUswsVJm4tzy9E6bC3lcvSIcd0jjLjZz3u9itjFIOISFYLfhn1EVG6qmRM+yXOH6v GGFn5MJ/sCqxs6jdS6qOViizBCgWhCMt8ptI+hRVlyiIAZCwHIidCA0G4GE/cHrlpBmW ZEQQ== 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 :dkim-signature; bh=muxxPebkhn0816OH3sFQELSDbHRR8DpTYRznlvVGJa4=; b=sAb/HZaQyaDNLjh4fhj88qPWUDdtVCa/YP2R8fxGjUE3DHBcq0dVrfHv5AX24R5Eg5 yLzpvm8KqNClsRKcWWppWR6A9zJRcI543YYU8tXkoV1Y93XFxhZOnkCJ1tUz21+Oi1IF YwqMkywY6WrTbrh1Xw5P0BIcyRb5wKEcGbQlMncP497XB678OBgsEkz0Xuy96jcMOK8F eioWzUA9qKgX/hYB+NF39iGa3Gz6K0TH8gLUZHfJGgL1/of+7speu4CSrWuk0EsM/g5b WBPSKPpGq6A2ZI4vtfPIw325LdYdNn11jB7jm4Jw5oUbfv8Eeb6xol3k93LxlcXSzvH1 Lp5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VNmywsPb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c26si12482392otf.288.2020.01.15.13.27.00; Wed, 15 Jan 2020 13:27:12 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VNmywsPb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729821AbgAOVPY (ORCPT + 99 others); Wed, 15 Jan 2020 16:15:24 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:40510 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729605AbgAOVPY (ORCPT ); Wed, 15 Jan 2020 16:15:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579122923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=muxxPebkhn0816OH3sFQELSDbHRR8DpTYRznlvVGJa4=; b=VNmywsPbgevR9vgB36yWIw5kDP6PA+6T8OZGrDDmBeHDkvRsGDX9q8CG7mKzshZccpeEnN V5m02vJ+eKhYw9uH/GA6TlIS9b/q+UBR9+jJ3Tawxsg+66XrwqxcGRQ2i88qWTub4lcZUg 0dl/wxXCfEeLt72l4UYfn8Nwdapv+mc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-288-7a51uNlGMiaVLisYQv0icw-1; Wed, 15 Jan 2020 16:15:19 -0500 X-MC-Unique: 7a51uNlGMiaVLisYQv0icw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DDB941005502; Wed, 15 Jan 2020 21:15:17 +0000 (UTC) Received: from treble (ovpn-121-224.rdu2.redhat.com [10.10.121.224]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D31AD60BE0; Wed, 15 Jan 2020 21:15:15 +0000 (UTC) Date: Wed, 15 Jan 2020 15:15:13 -0600 From: Josh Poimboeuf To: Pawan Gupta Cc: 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 , Andi Kleen Subject: Re: [PATCH] x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR Message-ID: <20200115211513.mxzembrm4hf44d6j@treble> References: <2529b99546294c893dfa1c89e2b3e46da3369a59.1578685425.git.pawan.kumar.gupta@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2529b99546294c893dfa1c89e2b3e46da3369a59.1578685425.git.pawan.kumar.gupta@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? [1] https://software.intel.com/security-software-guidance/insights/deep-dive-intel-transactional-synchronization-extensions-intel-tsx-asynchronous-abort -- Josh