Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2810613rwd; Mon, 22 May 2023 04:52:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ649ho80PQ5vfYfag0kW+l3FYJXgZOU6ZPmcyey43R9Q7/znJV9tDnZ+xrj0XmbQF9YrlVe X-Received: by 2002:a17:902:82c4:b0:1ac:8db3:d4e3 with SMTP id u4-20020a17090282c400b001ac8db3d4e3mr11540448plz.37.1684756336945; Mon, 22 May 2023 04:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756336; cv=none; d=google.com; s=arc-20160816; b=KRvlxHDtrNzoTT/ULgK/TYP3tExZxJjagMOYiTXt1GaBD4FSWZCd55D93eNY0cPQFp aTDd3kNLBiuVhyl9CfTQ+LCt5FL474zaINCpj0M45+1U3MraAnCL4zyIWRAYGGb+5pcD 7iZ/A6Wd+304lBPIPyXToK0Wqon9tEMXI0A1vhZ31+tVSKEHLiGbag7gpJtETyX5fjrH 9BPZMnXNGgw4QwU6MYb2bBTWrsgk/pwyem3jp8qxEcH1jP7I1nD+CgAff5ofUbT+CUiS L9GD8nfBxXGK+W9flGu/GSpztksORNBNJlB7957vu0TDv5COc9DBBXmM2WHmecljW8YE GE3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=FlLarggdQsf0haQgR3ollNP2QNScxMoguXmxrvoJ7aM=; b=MHAbXrcjmtqNPQzQHuyGc57iQgVLhwMly79VpfbOXCZXVvYrwIJk/ct+CwzSo8gh9f bpkFiCKOnWy3vKD6lbfe0z3Ba3BFc78b+OJQjv0hYXuUH7i6Jxbs1yGZm6VQ/7MhO5Wn lskF7pKd2FQ+QrlvJofWgC/CVjz5lI7XliRQdGXrIW35GJQRPyZ/LuwaI5VWbBKC+nF8 7+OCsfl64zfoKtKq8ESNM9fTBZG8c/7ze9qshK8Te9+7IWwaMJ1L3qzTB9jB7AkIaNEa tq/2y7nyGqwmD7ReBUY7jef3zKdFdtC3QgtsadbzkfvqEKiAGCbYyjT6qQQDVPW3UIsd A5CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=B1Q9CozS; dkim=neutral (no key) header.i=@linutronix.de header.b=YDmcaRDy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a64-20020a639043000000b00530b7ce3d34si2911622pge.305.2023.05.22.04.52.02; Mon, 22 May 2023 04:52:16 -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=@linutronix.de header.s=2020 header.b=B1Q9CozS; dkim=neutral (no key) header.i=@linutronix.de header.b=YDmcaRDy; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233511AbjEVLu1 (ORCPT + 99 others); Mon, 22 May 2023 07:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233538AbjEVLuH (ORCPT ); Mon, 22 May 2023 07:50:07 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC1E19D for ; Mon, 22 May 2023 04:49:55 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684756193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FlLarggdQsf0haQgR3ollNP2QNScxMoguXmxrvoJ7aM=; b=B1Q9CozSzAZC6BgwYCrQMmSdWA5nvQpN40HCIZPcrZXmJ1gNLv8LNwSq3rvA9TDR0zlsO2 MJiqeHZZtT2zOE9Y2m+IeY5D+H0LJFdFdFTmhnIDVLd1goHNbzs9f3nphNb4qVPCTYcyoe jk8gaH5CckvoPcrVZB37RkrjEAzAcIGr4JOVpBKsIhgKdTQ7+dMZzB6v1c6fZsJxSNxwXG Zeif40Z7H3QBaCgmmWatpJnZrcy6Ydb+7W37C2k4My/XKX2qwGGz375QytL/47v5XmpkMV uV8xeu/iw45la4H94B7F7tqrbX5UnL5BOiKvEddMJJh08Z/r3DJ8vcG+0EdlRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684756193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FlLarggdQsf0haQgR3ollNP2QNScxMoguXmxrvoJ7aM=; b=YDmcaRDypFv0yLUxfXJmqOV+YKpBBaWJzr7oS/HbhcEyrW8qi4yF5oMs40vmeQqn7GmigY WHlOl6hNS08VfuCA== To: Feng Tang Cc: Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Peter Zijlstra , paulmck@kernel.org, rui.zhang@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RFC] x86/tsc: Make recalibration default on for TSC_KNOWN_FREQ cases In-Reply-To: References: <20230522033018.1276836-1-feng.tang@intel.com> <87h6s4ye9b.ffs@tglx> Date: Mon, 22 May 2023 13:49:53 +0200 Message-ID: <87zg5wwppa.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain 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_PASS,T_SCC_BODY_TEXT_LINE 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 Mon, May 22 2023 at 16:47, Feng Tang wrote: > On Mon, May 22, 2023 at 10:14:08AM +0200, Thomas Gleixner wrote: >> On Mon, May 22 2023 at 11:30, Feng Tang wrote: >> Are any of these affected platforms shipping already or is this just >> Intel internal muck? > > Paul and Rui can provide more info. AFAIK, those problems were raised > by external customers, so the platform were already shipped from > Intel. But I'm not sure they are commercial versions or early > engineering drops. So its at a company which knows how to update firmware, right? >> So why do you force this on everyone? > > How about we keep the optional parameter, and enforce the check for > bare metal platforms which got TSC frequency info from CPUID(0x15), > like: What prevents a hypervisor from providing this info in CPUID(0x15)? > @@ -670,8 +670,10 @@ unsigned long native_calibrate_tsc(void) > * frequency and is the most accurate one so far we have. This > * is considered a known frequency. > */ > - if (crystal_khz != 0) > + if (crystal_khz != 0) { > setup_force_cpu_cap(X86_FEATURE_TSC_KNOWN_FREQ); > + tsc_force_recalibrate = 1; > + } > > /* > * Some Intel SoCs like Skylake and Kabylake don't report the crystal and five lines further down: /* * For Atom SoCs TSC is the only reliable clocksource. * Mark TSC reliable so no watchdog on it. */ if (boot_cpu_data.x86_model == INTEL_FAM6_ATOM_GOLDMONT) setup_force_cpu_cap(X86_FEATURE_TSC_RELIABLE); So its reliable and needs recalibration against hardware which does not exist. Thanks, tglx