From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9548EC38145 for ; Tue, 6 Sep 2022 20:44:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbiIFUoE (ORCPT ); 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> 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.