Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37043108rwd; Tue, 11 Jul 2023 08:44:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHmHUB8G4byAu+qCtyU0gtzJFMTXf1NLPjnFlZWfNb1xtcwT2zHTea5VvhjRp7BTGXyXJDY X-Received: by 2002:a17:902:e54e:b0:1b9:ebf4:5d2 with SMTP id n14-20020a170902e54e00b001b9ebf405d2mr2972465plf.33.1689090278955; Tue, 11 Jul 2023 08:44:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689090278; cv=none; d=google.com; s=arc-20160816; b=LRvQUR7AZJ9BDeZnDmg4bzvI4v2OBpvRQuaHVdIVPKsurMk9Cj531GntJp9C3sQhVO fGGszfzOHQ3nHwd8WikCiAWjsr2j6YhmCnc51HqA0dWnpSADOzsTH5VSL2NIeUhVb6/u ROW5Tzg78Fgcl/ZY7AO018JZxoUN5/D/RFOKFp1nEpk0wG/SfwUuH7f37cMSciJh1Qzl vzsDmkJYdIvuG4CjNLfha1f0ah4bREFh1i8pOxAWVLKzg36gPiqSmS0wqYxIh/Zc5l6j EUJ/Q7uYa4YQhiFOkIJH2EVSgmldASUgazAPObbnL1S/a+pBhNg6qr7oH9ekgE1UjOor pAGg== 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=VyhSPjFr2+/YCa+XkML0MylJ6XHvXgKAc/2kn7i0jmw=; fh=hmPat2QxwnDMYXfEdSl0GRb+MiJN6wSZGWGEhz/XB9c=; b=rc7myL+86g9g97cBhqtxDFRcUo+SkBVyeW/2HwEyoES3dOuZMNDZL9aJieCDrN/EpH dsWpLxh7NGfp45JBbBRVFJfX8KitY/Uo77DEkHuUSC7dUdHIh1WvdoTrRwqCNuHkZi/Q SmrRm/iYh/vCD440RJ0yZnpOnCXti4pw6kDEH739zkRy4fTnfWaMWARsHpFrUrwtE6IO 0d49RC6Hf/3qUD+X+NaXP4dJ0foZpB6evqOJhKu+XU+65EBPyP+AkwL1a3ouZp4LRykm QGUouxgUGe49dNcbirNpGptKzaYNz+u7LZbp0z4zuBn2hc14LTEeOTdK5sLmmBSJq35T WLEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=s5yqW9+A; 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 j14-20020a170903024e00b001b69de1eae1si1747549plh.620.2023.07.11.08.44.26; Tue, 11 Jul 2023 08:44:38 -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=s5yqW9+A; 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 S232486AbjGKPdU (ORCPT + 99 others); Tue, 11 Jul 2023 11:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232939AbjGKPc5 (ORCPT ); Tue, 11 Jul 2023 11:32:57 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED311709 for ; Tue, 11 Jul 2023 08:32:45 -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=VyhSPjFr2+/YCa+XkML0MylJ6XHvXgKAc/2kn7i0jmw=; b=s5yqW9+A5vr+jBu4NXIxS6+jVR DovdoA3HsICh5sVYvTiIMpFwGB3frbxxZBWiwUIufPi4revHlrgVP5uWUpJ2KdWY8Z2QIdkS1kw59 WetE8Fc5zZN2ttmF95uZYs2ht8rEkSo9WHjt0/g/Cvgp2fqioad/DUSPAFXTHGedSpnslTgpd5nu6 oPx++TJyFtz+YYtCP70oAv+PQl+EeVy8ovlUt015rSgQHLu3OxQrrh3NtCZ8PfD7L2uktM5QCKAyc KCKx4EZjFQeD6K5AkYG6YGLlW9K4iDvx20P5htTip/v5zYznCG38qwXDGLQrc1XfItnISX7jlc8cn LUXbhz5g==; 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 1qJFLw-00FqIN-3D; Tue, 11 Jul 2023 15:32:36 +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 EF01530057E; Tue, 11 Jul 2023 17:32:34 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D53852439FF31; Tue, 11 Jul 2023 17:32:34 +0200 (CEST) Date: Tue, 11 Jul 2023 17:32:34 +0200 From: Peter Zijlstra To: Arjan van de Ven Cc: Bruno Goncalves , 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: <20230711153234.GO3062772@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: 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,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 07:26:26AM -0700, Arjan van de Ven 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 ? > > I'm trying to solve to get guests on par with bare metal in terms of all > the idle capabilities -- including TLB flushing before going idle, but > also all the other latency control mechanisms that cpuidle brings. I'm probably stupid, but the TLB thing doesn't make sense to me. What TLB invalidations are you having problems with? Also, you patches come with 0% performance data. > And yes this is in intel_idle for 2 reasons > 1) we use the host latencies for the deeper C state and that needs intel idle information How are guest idle and host idle related in any way? Guest might think it will go idle for a long time, but the host will happily run another vCPU. This doesn't add up. > 2) we are about to add umwait support to this as well (patches on the mailing list for > the base infrastructure for this) The only way umwait makes sense for a guest is to amortize the VMEXIT cost, and in that respect it seems a perfect fit for that haltpoll thing.