Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4855004rwb; Tue, 6 Sep 2022 13:58:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7D9smEsXfkqM1Prdg1V5ckDXudwjyuTOPQs9t+1Vk8QXuLAh+tnerOtwal+v+zB9zNU42F X-Received: by 2002:a05:6402:28c8:b0:43e:8622:1c21 with SMTP id ef8-20020a05640228c800b0043e86221c21mr382201edb.135.1662497892599; Tue, 06 Sep 2022 13:58:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662497892; cv=none; d=google.com; s=arc-20160816; b=x1c9fmck44qYs9Ceah6AY3ir/CdJ5kc66MChBaKquCsjzDgdXuceTLrpQIW0FMGaOw EKx9DpclZWVgJkNmolRdoMGxO7doT9eiO+89DmE/+y+mAuuAUzST8oxRmhupHrVgR3yQ XjMi95hyE3ZPrSXNTokvyBejvhtYi36JM/zpc9EQUbo0dOAs5SLTyCoF2y7IXjRkTOM2 gpg8yQ75tSljqdtd8THP8/9F0DtC97sz5xUlauZD8PzZhJK7tER5XqupBhJBLZYonYIi iZdRya+rBk0fmJGXKg2HBQzQ8OvuUpW8mRPdhBHidL3hGwrDKw6HAb1kDC5cFIC5pvrp xRxQ== 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=34l93la2gO+EHI9/WnpSj4Mpu+xDsxTXmdZM9558mAE=; b=rvBvES1qTZONMYQCWyWq4p67APBWdyNeDm2fbV4HQoro0W7PMsCYlQ0ewDNYeNjp9s H+VDPzCOcdED1JRi9Ys+9tIuBGVWJt0Xj3diGJhvKLUhz3IZ5J2gPyAPwJFAgFEY8nl0 uhi+vwCbG1VqspZPTYD5scj3W4iBxp5NmRjW5bL/BZ4xdDwbtvJYX9RdhR9bG64nTo6O 6zCO23ZM77sj/GFO4xwIIc1mFfYVWLBiwEjnNAnCkeAL0ZKLk9yaYMlIO6IMQp5Wf181 4rsLDTZym5IMsJ95h4bEvjUKwYZuU+1qAjlRLkDPP/2NmbHMfYTufHC9MbBUGJbukftz lQ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=J7eoFfDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb2-20020a1709071c8200b0072b3b8d31f8si10463630ejc.63.2022.09.06.13.57.43; Tue, 06 Sep 2022 13:58:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=J7eoFfDl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231144AbiIFUoE (ORCPT + 99 others); Tue, 6 Sep 2022 16:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbiIFUoC (ORCPT ); Tue, 6 Sep 2022 16:44:02 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19F228B9AF for ; Tue, 6 Sep 2022 13:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=34l93la2gO+EHI9/WnpSj4Mpu+xDsxTXmdZM9558mAE=; b=J7eoFfDljRdXX9+fIK9yK8bK+w +fRy8NaTSMbIs99y/1lp5pAWtcYtfCzGXHIYMeNBzr6X8rwq6CM7G5CfMHCKygRM+T3R9ZyM97c7O ZByZeeuRWGPIPtzv1QIVfB+e6+XquVHrkYmpNleP94FtpgcEfBdx8MEJZjY2UnYnqroJmB32zZhCg VEU7sLA/FFG5f7rW7WyPYkgZrMYHh8hWbRErpl4Lj4QDAK2+BwqrBy0KPH8e+3ihHL1TKTcDm9X6N 3kf9PynflBd7pQNciy7uJdKXnJHIuDzHnRqqjO6bw00Pj9EE+VfZuC1pzNPIMpyCpRDv9WCrZY26T u6/xFbWw==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVfQD-00Akd0-M0; Tue, 06 Sep 2022 20:43:49 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 18238300244; Tue, 6 Sep 2022 22:43:47 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 000512B976538; Tue, 6 Sep 2022 22:43:46 +0200 (CEST) Date: Tue, 6 Sep 2022 22:43:46 +0200 From: Peter Zijlstra To: Hans de Goede Cc: "Rafael J . Wysocki" , Pavel Machek , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, Dave Hansen Subject: Re: [PATCH] x86/cpu: Avoid writing MSR_IA32_TSX_CTRL when writing it is not supported Message-ID: References: <20220906201743.436091-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220906201743.436091-1-hdegoede@redhat.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Sep 06, 2022 at 10:17:43PM +0200, Hans de Goede wrote: > On an Intel Atom N2600 (and presumable other Cedar Trail models) > MSR_IA32_TSX_CTRL can be read, causing saved_msr.valid to be set for it > by msr_build_context(). > > This causes restore_processor_state() to try and restore it, but writing > this MSR is not allowed on the Intel Atom N2600 leading to: FWIW, virt tends to do this same thing a lot. They'll allow reading random MSRs and only fail on write.