Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1292466rwd; Thu, 1 Jun 2023 13:19:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4D2SSQkcR78W6/d2BjYUDXs6PGP4g5U18M3n78WYMN3M1b+wmBMD/Ozg6XovBgKjbdfndC X-Received: by 2002:a05:6a00:24d4:b0:63b:64f7:45a0 with SMTP id d20-20020a056a0024d400b0063b64f745a0mr12853490pfv.12.1685650766441; Thu, 01 Jun 2023 13:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685650766; cv=none; d=google.com; s=arc-20160816; b=htoX2rF4HAZ1iAtWRz51OMNOG2xh2G3cJGXcy+kcWR/ncDB90q5m8gNA7ES5Vj6Ucl 2zkrXX2scuz+H779cvUogLLI1dRNNWvSA0W50kJScLR8xZvlLoQYfgavjSt47hZNrME8 EZC7XFXzctdBh+cGwYSwdOVGK/fU8SD4bEZQn8zVuv1Ho1dF7M1Wx8VH1yzLdMj48ne9 cSSCo3LqkLsWPEtMF4nl8lCS/UOZCesWd+VEPag6UsN+wYhXaLGOX+/0gZsYkAJ4YX0H HziO61itUU5ZiGeep4wxYVq165vDwqvr/FH/t37KzCKAqEom2CXf+Luic33aJM1K3+lL DMSQ== 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=VhqYS2lyDFfuoa88kODGtonbyEtHNG3TXqkVpEvaQl8=; b=aw8koyvKKNyzJGobuwTD4X/1c0TxoOKsjhrmrZGEFb/N4uU2v0xsUM8M/cthmRVDY+ Zt0z98z76oVMWVockLDgX0QRgf/B9fklIFJnn8j/X6lwq8HNkychHjuTrTW0c5rOwTUb YulCrZ3/l+Ehnd/+p6//vAZ+LgvhRLxMiBrddnkNgQvtUSMf3ixGkxO+v/azUf5sey9I CnbS64k7D/cp2V9eX/dOXskSOrLWEE1+tupbaoLrjzf8y3CsVFhY7kNDDrzyV0/4X1ss /zUojHvCwNGbXo+5VN/mRXKfnxZ6XF2Q2tgbVIM/8eX6Uj0WeIdLjL19RqnALw15Yp74 zCAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PGlHMojZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 134-20020a63028c000000b0053eee173732si3472186pgc.161.2023.06.01.13.19.11; Thu, 01 Jun 2023 13:19:26 -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=PGlHMojZ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S229536AbjFAUNd (ORCPT + 99 others); Thu, 1 Jun 2023 16:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjFAUNc (ORCPT ); Thu, 1 Jun 2023 16:13:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DB16D1; Thu, 1 Jun 2023 13:13:31 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685650409; 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=VhqYS2lyDFfuoa88kODGtonbyEtHNG3TXqkVpEvaQl8=; b=PGlHMojZjN/9GkSbz2rHDfnwxnlRvrOxaaLVJunjL9LP8LHNGsxTaALStcWxUxIi8sdJX8 lqvT3ilMtpVyNXbpQeqU81GEIRUGIPEklrKJKr5YEgd7xaLFHSyZz/zdHQWZaBJnzTb4Dd I8AEhgdqt2QnVwEIx+HzhdQIjKHNiXWzDTJ2uWIC/vh6X+GcLfc+cOx5jpLsSuuY7AwlXq TQKRmBK2E5db9IpX6/1KXh7U0yhsB6Ok2fxS7jdrnS/SM3YhPnKeIl8EqPhZKtBnN9zDvX w709Is3z8nO4YgoJ41KJ5VOx+pGJkACicnoqZLXtsfM07ekiRkGNjUeZALfsHA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685650409; 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=VhqYS2lyDFfuoa88kODGtonbyEtHNG3TXqkVpEvaQl8=; b=xleRV+bWpbXMbVWK7dfSAyfJ/A8lvCBKqJk3V6HyfWibUAieNU5VU48PDtqZp09tXaj8ag 6rd61mxCICbDZ6CQ== To: Steven Noonan Cc: Muhammad Usama Anjum , Jonathan Corbet , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:DOCUMENTATION" , open list , "Guilherme G. Piccoli" , kernel@collabora.com Subject: Re: Direct rdtsc call side-effect In-Reply-To: <871qivdjui.ffs@tglx> References: <6719fb05-382c-8ec4-ccda-72798906a54b@collabora.com> <87mt1jeax1.ffs@tglx> <87h6rrdoy0.ffs@tglx> <871qivdjui.ffs@tglx> Date: Thu, 01 Jun 2023 22:13:29 +0200 Message-ID: <87y1l3c55i.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 Thu, Jun 01 2023 at 22:10, Thomas Gleixner wrote: > > So back to the options: > > 1) Kernel > > If at all then this needs to be disabled by default and enabled by > a command line option along with a big fat warning that it might > disable TSC for timekeeping and bug reports related to this are > going to be ignored. > > Honestly I'm not too interested in this. It's yet another piece of > art which needs to be maintained and kept alive for a long time. > > The fact that we need to check for synchronized TSCs in the first > place is hillarious already. TSC_ADJUST makes the resynchronization > attempt at least halfways sensible. > > Without it, it's just a pile of never going to be correct > heuristics with a flood of "this fixes it for my machine (and > breaks the rest)" patches. > > > 2) Binary patching > > Unfortunately RDTSC is only a two byte instruction, but there are > enough advanced binary patching tools to deal with that. > > It might be a completely crazy idea, but I wouldn't dismiss it > before trying. Duh. Hit send too early 3) Virtualization Obviously not trivial either but definitely workable. Thanks, tglx