Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9843002rwr; Thu, 11 May 2023 23:22:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4kqYwBTPuRnQFIed9ZT3M2FndOF0RSLrFyCl0jp9rnhioSb/6ieHyOFTaigzd5R9RevPin X-Received: by 2002:a17:903:1d1:b0:1a6:9762:6eee with SMTP id e17-20020a17090301d100b001a697626eeemr27953522plh.40.1683872528871; Thu, 11 May 2023 23:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683872528; cv=none; d=google.com; s=arc-20160816; b=KQk5HMvOzSAaBTJJg7sEGtthpByJ07lqOv2QY1RVo4BIIlwVsesMCzZKVvu4RWozml dZEYuiVMxPCaPT7pu/VYvIfpnPbMDJKLiYyxMIMnkOgCcCykEj8jglFv5kONKBf1uF2F HvLG+KJnhmaueuw2ZIq2dVc6sdLCagHIHZcTuFeCzfjoA1d30O1TR6iqkcuQ1pyc1ekm DnWOSTRPCIX0UZqKDf3wmnQ+BDmN5E8814HTSwWeY1/Yfx+tokDQYIro8Y0Y1z9YbawM 3Es4+MjHh03iDjFi4Kz6lojNyQ3F26JJRSRNtS73WKDYSh4B+dRrSSlY+5GmITXMZDiz F54A== 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=JgTBFDjjwSw1zqVfagUl7AKzd0vmwdZDo99pKCmQQP0=; b=Ot7NW/ayP9l/+r9fZIQ7BdzBP6HrMq9VZQPvPnyv06xk9PsTrE0YmTXzItOsiiTvh9 JPn9NC4WFOeo6tWjweZsu8sZ7t/A3zxPjwlUPWfUDk5/QEAeLgM5AR23/yMAxaZ7puFx F/wSxnkR4oaiwwBKnjRAMs0sW71FKvNsU5jKB2FBAvZNg78pqHErfKPPJiGyssAShz8M QzNBfCDzN+BF0EJZzd3Fu7amov+dAjRN8rGCA1hqpv6RLZ6zF7aIILuz9/1EbcHda7G+ Rn7zw+RaAUmYvgRUzf+dRs3u7N1j/m18qJKhpCnPUIpA0weXdDS0JB+SQKqF1qu047Mj SO4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eDdL5ePv; 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 y5-20020a17090322c500b001ac718c3fc6si8943891plg.78.2023.05.11.23.21.53; Thu, 11 May 2023 23:22:08 -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=eDdL5ePv; 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 S239936AbjELGBs (ORCPT + 99 others); Fri, 12 May 2023 02:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230490AbjELGBp (ORCPT ); Fri, 12 May 2023 02:01:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 103B0449A; Thu, 11 May 2023 23:01:41 -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=JgTBFDjjwSw1zqVfagUl7AKzd0vmwdZDo99pKCmQQP0=; b=eDdL5ePvbY/jB1rcT9W4xmiaH/ 5m/v/TWCs08Qq8j4qKMc2vGMvLL5roJ3tIsKMaZQp2BX9VRHZfQWdfUwabjxBqW4Gn7SkBvwKP3ek hUsEpADpLyHP4WYDo9ohbtNjzgyWj2N6lntMZ81jWY93R8LmicuYVMlBrzPNMnOQfvTzz18Vgc0t4 YqLaDv86aJFPGJaZXoaeUGbN4o5aQ25kK75TN2AVlkFlZ4fxuPUlMdnZeXqkbUvLVQ8HYrYY+YipA jXwS+C4JUjbL4UND999W65sHHNBuZFwvPuCnGaugL8m/VLeHbPDw1MALFGqukWBIaNcHwHWrKFGbg NW2Um0lA==; 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 1pxLpq-000QcQ-7n; Fri, 12 May 2023 06:00: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 87025300338; Fri, 12 May 2023 08:00:54 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6D0322C7DB768; Fri, 12 May 2023 08:00:54 +0200 (CEST) Date: Fri, 12 May 2023 08:00:54 +0200 From: Peter Zijlstra To: "Michael Kelley (LINUX)" Cc: Wei Liu , "ltykernel@gmail.com" , "bigeasy@linutronix.de" , Mark Rutland , "maz@kernel.org" , "catalin.marinas@arm.com" , "will@kernel.org" , "chenhuacai@kernel.org" , "kernel@xen0n.name" , "hca@linux.ibm.com" , "gor@linux.ibm.com" , "agordeev@linux.ibm.com" , "borntraeger@linux.ibm.com" , "svens@linux.ibm.com" , "pbonzini@redhat.com" , "wanpengli@tencent.com" , "vkuznets@redhat.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "jgross@suse.com" , "boris.ostrovsky@oracle.com" , "daniel.lezcano@linaro.org" , KY Srinivasan , Haiyang Zhang , Dexuan Cui , "rafael@kernel.org" , "longman@redhat.com" , "boqun.feng@gmail.com" , "pmladek@suse.com" , "senozhatsky@chromium.org" , "rostedt@goodmis.org" , "john.ogness@linutronix.de" , "juri.lelli@redhat.com" , "vincent.guittot@linaro.org" , "dietmar.eggemann@arm.com" , "bsegall@google.com" , "mgorman@suse.de" , "bristot@redhat.com" , "vschneid@redhat.com" , "jstultz@google.com" , "sboyd@kernel.org" , "linux-kernel@vger.kernel.org" , "loongarch@lists.linux.dev" , "linux-s390@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-pm@vger.kernel.org" Subject: Re: [RFC][PATCH 7/9] x86/tsc: Provide sched_clock_noinstr() Message-ID: <20230512060054.GA2313201@hirez.programming.kicks-ass.net> References: <20230508211951.901961964@infradead.org> <20230508213147.853677542@infradead.org> <20230508214419.GA2053935@hirez.programming.kicks-ass.net> <20230511202351.GE2296992@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 Thu, May 11, 2023 at 11:11:07PM +0000, Michael Kelley (LINUX) wrote: > From: Peter Zijlstra Sent: Thursday, May 11, 2023 1:24 PM > > > Tianyu and Michael, what's your thought on this? > > > > > > Is the MSR-based GHCB usable at this point? > > > > > > What other clock source can be used? > > > > You do have TSC support -- which is what I fixed for you. It's just the > > whole MSR thing that is comically broken. > > > > You could do a read_hv_clock_msr() implementation using > > __rdmsr() and add some sanity checking that anything GHCB using (SEV?) > > *will* use TSC. > > > > Anyway, will you guys do that, or should I pull out the chainsaw and fix > > it for you? > > Peter -- I'll work on a fix. But it will be the first half of next week before > I can do it. OK, Thanks!