Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36915073rwd; Tue, 11 Jul 2023 07:16:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlHGsgtc7XuGF2f/GReLUQrWKDnlkvwTz/5/yamlXBKjkCOhZaud33vpUd9bT1eveWHeBRPq X-Received: by 2002:a17:906:73ce:b0:993:d90e:3102 with SMTP id n14-20020a17090673ce00b00993d90e3102mr13090162ejl.6.1689084967299; Tue, 11 Jul 2023 07:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689084967; cv=none; d=google.com; s=arc-20160816; b=GsPUquS31/hLuoWnOqnvoDhLH8Dvz4av1oarMXZfVsgie5Sb14TbYaSWd5A82SYEwa NS/o9movO6XDL46PMlPqFvCzROF5zZ5pfuB0ntP9Qv6/S26JQLpo1WJ1+rfN3A1Zrcuh MnSA9Tspm8vgV3r+DWW1FES6epD40WIRVgqteUiVwC0pYL1DTlxMw64fzBAS41uybqX2 An50IEP4/hw8EbwiCrOMhhSPjQI29k3VnDEZHYtgfEjjxAI59sZbWXGz+CX6dB3wTMCX s/OQKfE+Px17Fwrn6uJfeTRRSL6X69J+5a3pjDssF/uM6118cPor+HlbiV3UHTi1UTb8 caaQ== 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=NIbIs7qALfTkQpijTnEcAoyrwK1musx6nJU1Uy2RWNc=; fh=kAEXOIVhruBPyC1ZNDvsMjR3f4ZLV1mJ9t2bu/jfuJI=; b=VGqXYJclMJ04jfwHOeWjaDv/Nz8FxgQ9gfZ59RBU5OsZBta0hFhVX57Djdieoi/K24 IRa8HklftmPslHkUhdz2Fu7FNDw2WN7mz4AS0hOT0tlZmYVq3oAgfBPxxIb0tpOOiORj nyRzOTbrx2IFxg4IlDfA3lp7GPM18dxK9rhZnRoDML9xEr6jSwe8zzitYTsaClayBk8b ivmB7efnhVWYyp9atS//M9IDpxql9CF8xM3axfqOW6rtDTrnTD22W9MvW+oxnFMIc99D FlQcbIEP/adGslNtyzHl91xBZES8UxOUXA71NX5TgdedbA3XC08ixgPVyRsm3U1UIVNH IWDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=iwVQ1n9K; 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 q19-20020a170906145300b0098843bd4387si1948443ejc.320.2023.07.11.07.15.42; Tue, 11 Jul 2023 07:16:07 -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=iwVQ1n9K; 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 S232446AbjGKN0F (ORCPT + 99 others); Tue, 11 Jul 2023 09:26:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230078AbjGKN0E (ORCPT ); Tue, 11 Jul 2023 09:26:04 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A321E5F for ; Tue, 11 Jul 2023 06:26: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=NIbIs7qALfTkQpijTnEcAoyrwK1musx6nJU1Uy2RWNc=; b=iwVQ1n9K/yCsf96VsGZlhJtCU2 chrMyygEfGuAHO8LtJ9CMTYW+6zdciQqrt6J6ji+6NRBqlEA9UNFSkaHB+THwgZIKF37CHn0KNlm4 UJBe/5DCjF+jJpYoojBHbWVR94zXz9JaLSoEZ+V3fr5FMGhJ3YLgnkGit8DhF46qrSlk6asmH1GYn gV+0JycjUegHNJPUozmYIhAkl0uDBZF29g5LrHNQtIJ3raHoInfI9PyaWP6AuuBB2u9XoP4VEzP8A rS5wIIeFurDR/K8QNOk+W+FHw9Q4FMqM1A9gNbH9ooKh6Oa2Z9mRcnD58ZM7KscHeTw2R5botU17K NkDn5VtQ==; 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 1qJDNK-00FkgC-Cs; Tue, 11 Jul 2023 13:25:54 +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 0923E300222; Tue, 11 Jul 2023 15:25:54 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id E665A243429D2; Tue, 11 Jul 2023 15:25:53 +0200 (CEST) Date: Tue, 11 Jul 2023 15:25:53 +0200 From: Peter Zijlstra To: Bruno Goncalves Cc: arjan@linux.intel.com, rafael.j.wysocki@intel.com, x86@kernel.org, LKML Subject: Re: [6.5.0-rc1] unchecked MSR access error: RDMSR from 0xe2 at rIP: 0xffffffff87090227 (native_read_msr+0x7/0x40) (intel_idle_init_cstates_icpu) Message-ID: <20230711132553.GN3062772@hirez.programming.kicks-ass.net> References: <20230711112421.GI3062772@hirez.programming.kicks-ass.net> <20230711125557.GM3062772@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230711125557.GM3062772@hirez.programming.kicks-ass.net> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, Jul 11, 2023 at 02:55:57PM +0200, Peter Zijlstra wrote: > Oohh, this vm-guest mode is new :/ But it doesn't make sense, that > commit babbles something about waking CPUs from idle to do TLB > invalidate, but that shouldn't be the case, that's what we have > kvm_flush_tlb_multi() for, it should avoid the IPI and flush on > vcpu-enter. > > Arjan, what is the actual problem you're trying to solve any why hide > this in intel_idle ? static __always_inline int __intel_idle_hlt(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { raw_safe_halt(); raw_local_irq_disable(); return index; } Which does: STI HLT CLI static __cpuidle int intel_idle_hlt_irq_on(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index) { int ret; raw_local_irq_enable(); ret = __intel_idle_hlt(dev, drv, index); raw_local_irq_disable(); return ret; } That is nonsensical code; because now you have: STI STI HLT CLI CLI And that makes sense how? Rafael, can we please just pull these patches and try again later?