Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp572252pxb; Tue, 15 Feb 2022 22:29:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwx/oI+ng2W0gT0LfiHqMPAUYrrbfBSrnaKSs3pPvK8yGq5xxzFNpzOU9bMeaaR9Nm4R7va X-Received: by 2002:a17:903:1107:b0:14d:80cb:da8 with SMTP id n7-20020a170903110700b0014d80cb0da8mr1018214plh.62.1644992945147; Tue, 15 Feb 2022 22:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644992945; cv=none; d=google.com; s=arc-20160816; b=yIDLiwK546ZY0s/VzMg5bB3dr87xjlriq1XwO2+U8Sl8uetIF6MCCC00C4re5Z8tXA ResKv6hd2CgdWhmhrLsR9xwxj9Z3jAKnZ+gktFLB6XPUU2QxSrufrBk822/gCShP31+X 1lV1jE6T9d/57YIrimYPk3r5/tS+avK1mCDqpr/3Hj8mMuX1Bd+wokdbqFUSrLqTL1qd E3nuUMmqcdyCaRYPBLOFjpjWTQ8KowdMVeY4QFT6DD/S5/thWn4MHNzNq+5xb6KumTvZ 0AJ9n64FvIgOZXImWWUnlhqrAHICXblvhD5KeOCYy513kz29ekgxsmQ6RrUou5UuQ0rk mL6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=meapHTkDicDHTqTRDUN8X2JnxCKucH0EDtj9t2Mp+f8=; b=Kab7W0uk0pu3e6mI5EOpRmZ51PT7A8x1UFolVHylGpEPTW29ezWm73VcJ7hJBOzc9f qjIUxbKyuCeYmElB+s8CaAuH/24kiiEAVQ/mk9U4SuL0c9Ht5a5hbu/QOu0kCbfarkpT Ds1I0OkA/bNISHBzdUmDrah+84847HqbJw0UKr8eDEs/RIYPDgNc9MaujNOAq99sNuRv 7MXr0weK+OVW8glNJWkc+qRo1JX+D42s7/xe5MhHKwcKFRgC/sahOcNdG4IAhAEM2SXQ yIjtASH/s/vMAimhGqsK/26v07P707781/DJkOKDRSf1TRBSlswJsDtqHzGeh1+p4Zgw v3QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pJFTcQAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n15si18555244plc.468.2022.02.15.22.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:29:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pJFTcQAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A3E621B31C1; Tue, 15 Feb 2022 22:23:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243670AbiBOTeF (ORCPT + 99 others); Tue, 15 Feb 2022 14:34:05 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:34622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243675AbiBOTeD (ORCPT ); Tue, 15 Feb 2022 14:34:03 -0500 X-Greylist: delayed 32989 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 15 Feb 2022 11:33:53 PST Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E355C1CB8; Tue, 15 Feb 2022 11:33:53 -0800 (PST) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DB31E1EC0518; Tue, 15 Feb 2022 20:33:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644953628; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=meapHTkDicDHTqTRDUN8X2JnxCKucH0EDtj9t2Mp+f8=; b=pJFTcQAnhEGXoRv7eZbwUIX2WRgVwGwSsGH8+boQ6QAAU+41nKDaDQZW8rMypTNB1Z0+F1 RZBy72AJlO8niJCkhI65qrgBgHOXxGZ+ZShnx0pBTPpm4ov0vFrNepzh14/4j24Hlbkkxe vix9Bf/cCr1dVBVjsSTv3XErNsLgjPo= Date: Tue, 15 Feb 2022 20:33:49 +0100 From: Borislav Petkov To: Pawan Gupta Cc: Andrew Cooper , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Andi Kleen , Tony Luck , linux-kernel@vger.kernel.org, antonio.gomez.iglesias@linux.intel.com, neelima.krishnan@intel.com, stable@vger.kernel.org Subject: Re: [PATCH] x86/tsx: Use MSR_TSX_CTRL to clear CPUID bits Message-ID: References: <5bd785a1d6ea0b572250add0c6617b4504bc24d1.1644440311.git.pawan.kumar.gupta@linux.intel.com> <20220214224121.ilhu23cfjdyhvahk@guptapa-mobl1.amr.corp.intel.com> <20220215002014.mb7g4y3hfefmyozx@guptapa-mobl1.amr.corp.intel.com> <20220215121103.vhb2lpoygxn3xywy@guptapa-mobl1.amr.corp.intel.com> <20220215181931.wxfsn2a3npg7xmi2@guptapa-mobl1.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220215181931.wxfsn2a3npg7xmi2@guptapa-mobl1.amr.corp.intel.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 15, 2022 at 10:19:31AM -0800, Pawan Gupta wrote: > I admit it has gotten complicated with so many bits associated with TSX. Yah, and looka here: https://github.com/andyhhp/xen/commit/ad9f7c3b2e0df38ad6d54f4769d4dccf765fbcee It seems it isn't complicated enough. ;-\ Andy just made me aware of this thing where you guys have added a new MSR bit: MSR_MCU_OPT_CTRL[1] which is called something like MCU_OPT_CTRL_RTM_ALLOW or so. And lemme quote from that patch: /* * Probe for the February 2022 microcode which de-features TSX on * TAA-vulnerable client parts - WHL-R/CFL-R. * * RTM_ALWAYS_ABORT (read above) enumerates the new functionality, * but is read as zero if MCU_OPT_CTRL.RTM_ALLOW has been set * before we run. Undo this. */ so MCU_OPT_CTRL.RTM_ALLOW=1 would have CPUID.X86_FEATURE_RTM_ALWAYS_ABORT=0, which means, we cannot tie TSX disabling on X86_FEATURE_RTM_ALWAYS_ABORT only. So this would need more work, it seems to me. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette