Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2610978rwd; Mon, 22 May 2023 01:16:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7M0yMnq1ho7dwuEp5THBLFV5UNBJKdcWMjQeo7FvuWWVw/R+XkxWNmokRCpi1OLBl6JCoC X-Received: by 2002:a05:6a00:2185:b0:64d:46b2:9a58 with SMTP id h5-20020a056a00218500b0064d46b29a58mr8382440pfi.26.1684743401227; Mon, 22 May 2023 01:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684743401; cv=none; d=google.com; s=arc-20160816; b=A+1mZlsLitPfEBILmS0hIo4x97eAmJV5H5SwwLUvP7yuYCraogMWMddlBa+CM0RAYN +OJEkpsHLwexMR0x4ZUZ8H7BaruJmVYaWI/8I+NbnDmR/8hKSpNxSfrY0yThZIz2BUO8 TXW6lqh9glYgGIYWS1A/6oEPDVtd0WfXQcRqRnYkjSD4uRBtOhUOHbqaOYdBBFoIMkJG /6zb4itK8/1YV4bAM5HAiDOahNq64zjTpxLKGa9irBQLwukuJoalkDB6iPacLAwB5vUP mwua+JahztTZMxFn3d+jxe3cVn+ymV/BTSloqhVqSrjmhxWxo4iVmzbiwpmLuJqTMA9V oJbw== 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=mnTuNYqtea/wqsyRqkyQFOYLTYsaJ3v9g3ieEEK162A=; b=NsriAgUPHTisS3/IcGh0mSMEGCFbtYTHO4GnAtf0Vwmt1QHvWAxl81eSRtgwlPxKhm E9whez9hjVwcX2cdjuDvtDdyJDm48qSSjb0btbC1hcv/tIwvnR+iA+6BJggzf610IhJv 5Rqe9GbQImDu6+KlfHBkQYZjgFpf2TXKJAw3Gk5gezJjbJRb3BFfBLzJ2O2I5BhotGnb bGgtszT483UdKDM5sE83uje4i4bqLZ1qCzeDyWeEbBkWvKZ8lPadpgIlnh8+/6S3zqPd gxeqEq1d1odSEVCHnvjJGIxw3nqoxwPy0c7CsGijrIsY1MyZRgKNKC3QGAKc/u1zXvkw 4vYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WJ0waR8t; dkim=neutral (no key) header.i=@linutronix.de; 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 t127-20020a625f85000000b0064a35829154si4501152pfb.343.2023.05.22.01.16.28; Mon, 22 May 2023 01:16:41 -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=WJ0waR8t; dkim=neutral (no key) header.i=@linutronix.de; 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 S231151AbjEVION (ORCPT + 99 others); Mon, 22 May 2023 04:14:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjEVIOM (ORCPT ); Mon, 22 May 2023 04:14:12 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53024B0 for ; Mon, 22 May 2023 01:14:11 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684743249; 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=mnTuNYqtea/wqsyRqkyQFOYLTYsaJ3v9g3ieEEK162A=; b=WJ0waR8tuxofc2BBQx9ZogV075ptotLz7HjIA1mgfZHfmSKB0f2+/Rt4lMUPmJBPW8IYZL SFyB87BPgJ//XEG9wRIt3XOC/aYTWP4QJICD8ym9fLe1+tkejq1s0swg6oBPY2RHRObRHK 2pR5GNKcsWO/+JmANIY6MSvwvbrhLbis//mu8KuarnYcVY5UC8oL8cC1+XOehwLjuGK255 mP5y8PGY4jOKT3QIaQwQPTIVEWr0mStsh9nnWXIzsztb87sTkH7ehxpv7J3LuTdIeMlGff EoM61I2hHrVaP1E5VPAsvSI8xPrI3awvEHyUk2VZdQAvYYKwsW3ysuntSmTVJA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684743249; 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=mnTuNYqtea/wqsyRqkyQFOYLTYsaJ3v9g3ieEEK162A=; b=vfaDdpbJgRxBvsqf5x7986D6qhCoob6IScLazDVoZTyjzmeG1/2KOa78gmzog4PSJLQUS+ 4acd5z0MF5t0wiCQ== To: Feng Tang , 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 Cc: Feng Tang Subject: Re: [PATCH RFC] x86/tsc: Make recalibration default on for TSC_KNOWN_FREQ cases In-Reply-To: <20230522033018.1276836-1-feng.tang@intel.com> References: <20230522033018.1276836-1-feng.tang@intel.com> Date: Mon, 22 May 2023 10:14:08 +0200 Message-ID: <87h6s4ye9b.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 11:30, Feng Tang wrote: > Commit a7ec817d5542 ("x86/tsc: Add option to force frequency > recalibration with HW timer") was added to handle cases that the > firmware has bug and provides a wrong TSC frequency number, and it > is optional given that this kind of firmware issue rarely happens > (Paul reported once [1]). > > But Rui reported that some Sapphire Rapids platform met this issue > again recently, and as firmware is also a kind of 'software' which > can't be bug free, make the recalibration default on. When the > values from firmware and HW timer's calibration have big gap, > raise a warning and let vendor to check which side is broken. Sure firmware can have bugs, but if firmware validation does not even catch such a trivially to detect bug, then their validation is nothing else than rubber stamping. Seriously. Are any of these affected platforms shipping already or is this just Intel internal muck? > One downside is, many VMs also has X86_FEATURE_TSC_KNOWN_FREQ set, > and they will also do this recalibration. It's also pointless for those SoCs which lack legacy hardware. So why do you force this on everyone? Thanks, tglx