Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp36796795rwd; Tue, 11 Jul 2023 06:00:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUc1p2bx1aAzXoE5/iwD2Ykz/qgTLWChMYlWmwC8gmD+ZbrB0mbDkTJ81SfpTtgrdk8851 X-Received: by 2002:a05:6402:1b0b:b0:51e:29cf:afae with SMTP id by11-20020a0564021b0b00b0051e29cfafaemr11916369edb.42.1689080424830; Tue, 11 Jul 2023 06:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689080424; cv=none; d=google.com; s=arc-20160816; b=umT8ZA+Z4lRenaesLcz9FnZRqArT2WIYDDS95NIPSxfh34iSciriLsqrmFRQtX2+as OuIGreH0DItNF3fhgUmIx99IZ7AXbCypl5y846DxjV75+OXiGnJmAKbsl7ObFP56VcPY sFLnTSemw6LIK4+a+HVe6U7pqT2kiNJ0VQ3m6L9RCkeiD2X+wrUc2dGXFOJCWBF4qf/4 R84FPvygcvuEOQ2ZnqDKlj/UOizOcnO6qxmgDe+vQFA0qf5ne6Tb8aKCwFtL5dZlvbjQ K9N3pRsKgUycanPQ1WlzCdxVkELHJM3yQDLEXBp8wicw2Or9SFRxUukjBJREvrYnRWxF j9qA== 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=r9i6weXtCQBIcpKSCSUwr85Jp5moQkqAZtJtqfjaqy0=; fh=kAEXOIVhruBPyC1ZNDvsMjR3f4ZLV1mJ9t2bu/jfuJI=; b=s3zNXuYuUeg2OJQqDqv7+7YJ+CIEVebWRkQBKkg+YtIfkcOOGAVc8B91xTswwNS8+R mjmbaNwTKmHmOUn2Ioz/N0J/OuJ7jdhU4Q0Z3ORm7+yPCXzGze4DxwonjXeN0D/cqCzD T3tHt6iq3ZEtQqJhl54DDs1Ih6Rn0+BRNnLBxCtWFxlUVcxypJJouKlWKAitWHKN4gFp WGqe/qXMqly8v4KxkcrhVLxQlk39pbIZlCJjwL+HnI4k4721LSV6fl9xOkKTHNFMWSs7 q1L7MfgkU/8BdkcVInVmXKvbz9DZdtFFx8s94SmZF5kZJ6eieE+SUwopMvNX39bDdele Eepw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=Adup15vW; 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 b6-20020aa7d486000000b0051de510755dsi1931921edr.243.2023.07.11.05.59.57; Tue, 11 Jul 2023 06:00:24 -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=desiato.20200630 header.b=Adup15vW; 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 S229811AbjGKM4K (ORCPT + 99 others); Tue, 11 Jul 2023 08:56:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjGKM4J (ORCPT ); Tue, 11 Jul 2023 08:56:09 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE106120 for ; Tue, 11 Jul 2023 05:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=r9i6weXtCQBIcpKSCSUwr85Jp5moQkqAZtJtqfjaqy0=; b=Adup15vWkIxKZXzhNA9pSTKVa5 Ld1dmFFs5pUEF4yW7ZoNV5oxJCw2TWlnhMqq0uV9jSoDJqOpj8p+Kp5sgu62H6pBhX3T8XhkuyRzs Q6GsiOAlAH/C/xj5vDLskBqYAtyzQePFZri/SOG7HyhofEAHYyJhnqlVytjX+HNJ+qihWEL8aNg/y 9odb8F2lK+9mYNM555PNZJb6odZlXLKGMxSsy8IJ3L1/c7MQ4W9JxmeWxb1hO5uUy7sIVbxZ26+f9 LvkBPeiYW0MDJnb7LWeoKqupfVthXWMNkwXOHl9bzsGCv13ePGZ97OSKpoLUQymAB4LurR0pYBEhT dOTJU9QQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qJCuM-002OpK-1Z; Tue, 11 Jul 2023 12:55:58 +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) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 7FBA130014A; Tue, 11 Jul 2023 14:55:57 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3A99A243A2FA5; Tue, 11 Jul 2023 14:55:57 +0200 (CEST) Date: Tue, 11 Jul 2023 14:55:57 +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: <20230711125557.GM3062772@hirez.programming.kicks-ass.net> References: <20230711112421.GI3062772@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:25:51PM +0200, Bruno Goncalves wrote: > R640 2x Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GHz Gawd, I hate our naming :/ Google tells me that is a skylake. > and start the VM with: > > -accel kvm -cpu > Skylake-Server-IBRS,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rsba=on,skip-l1dfl-vmentry=on,pschange-mc-no=on You tell it to be a skylake > The decoded call trace: > /builds/4626306068/workdir/drivers/idle/intel_idle.c:1820 And that's skx_idle_state_table_update() reading MSR_PKG_CST_CONFIG_CONTROL and that code has been around since 2021. So things are somewhat consistent. But I find it weird that intel_idle gets selected for a guest, I'm not exactly sure what's up with that. 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 ?