Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp572295pxb; Sat, 10 Apr 2021 11:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc1vBHiKSbOPrRhVHBr8m1wZ4iYXg7RAyF9O70DCNQctE2RZQWpeTUDYNiwG5PKaHSADpI X-Received: by 2002:a17:906:560c:: with SMTP id f12mr20347508ejq.363.1618080289343; Sat, 10 Apr 2021 11:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618080289; cv=none; d=google.com; s=arc-20160816; b=rFIrRz5HOcM3z03NfxjJBysmfnC1lQRBXO+EzIfa6PFbma1fMbieFfu8O8cJhDbZa8 9VqUo9bE2PLNmJYOmJhamwRb/KFDphfivlP83rYaTICvM8HnzJrcIII0rWTMBEccCNUh Yw0ZKZmNiIjp0COBWaB6JmrvfGmdvrrn2gLxbk2DqgKHErDQ6f9YuGDat2T8aDld3xa1 k10AOYrnaZzom116OGh3Cuq2r6Fny5hW5OeSndfm0NGpk+iai89NM0deSjvp4NXlIq6g D649LWTLBumvS/STSL+DXA3jysVkAo9SrZzj0phhHDw9/5md8t1rsoY9XZ/r3UmNUPVn n0Ug== 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=d4XQwk4nUTgQqJA9NE+O84z5sHqbSD0/n7q9/Ovq2w0=; b=ItrX674WpylntFgoTz2ZjTQjiDJY9wpYqFNNKLnz2cdbdPKg4BMWKV1qpF0xluDJMR qhPycjSdx6B2OqmsXcFcztvFtj1bUPPf6aqWljSfH+eM5OavJWrJAI/dbqhntUuBNqwz zEhonDV2aHc+Q75cKu1pid8DQSJPMTR5BjumK43Q55sxevMCgVrCRNDLYIH24dYQPfyZ K9gb5UYXFJDyJvq8HjEIrhY+dLMHr9wFsF1hMg+HkdogqQ+Z62UT6PgpM1YtX5OcnAtx FOdJPkCRsr2rKMf+OO3foIoZQGOpcKNhIypjlGfb/Ha40kyCcuyaVfifMyaHH2AHXDNw fDKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TqAODkmb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si4591018edb.398.2021.04.10.11.44.24; Sat, 10 Apr 2021 11:44:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=TqAODkmb; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234874AbhDJSnq (ORCPT + 99 others); Sat, 10 Apr 2021 14:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234768AbhDJSnp (ORCPT ); Sat, 10 Apr 2021 14:43:45 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE152C06138A for ; Sat, 10 Apr 2021 11:43:30 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1618080207; 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=d4XQwk4nUTgQqJA9NE+O84z5sHqbSD0/n7q9/Ovq2w0=; b=TqAODkmbuIdv9Gy14NeeBnnzS4xD+iM+Pbhzec1eIh68GJepJLO2Z0JES+F/zh2/VHtLoa NgMqBfrwdc/DSFaM6HbrTsNaYfgsnnwRvqCnEJAB1Ia31LwajrrhfBQ7VZYRDpXp7SW2ll BxN7deQ8lnn1yC2wkRINS+Va9CBzD8Z8rxwxddPqtr/MGAXE9ISXTtN8fHb0W7VbCKMKSv xtrquFfxJicBrUCyxMotV6EV/A4WghJwrVCatDuqvD4LU1gMINADafFAp9az/bNiODwlRv PqXCzCBqmIDzal0hO4AAjujZPObtGQNQmL+7slfD2B3IF5ERt9XWi9wWdeWd0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1618080207; 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=d4XQwk4nUTgQqJA9NE+O84z5sHqbSD0/n7q9/Ovq2w0=; b=wRskDAGxOOOMp4ce3CA/WJ4tQFJRxCxIDYV7IaY6R5+UItAQ8jnmSPXfQw9oMZmPQh2hgA pL6L9KCZKqTcc6CA== To: Borislav Petkov Cc: Feng Tang , Ingo Molnar , "H . Peter Anvin" , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com, andi.kleen@intel.com, dave.hansen@intel.com, len.brown@intel.com Subject: Re: [RFC 1/2] x86/tsc: add a timer to make sure tsc_adjust is always checked In-Reply-To: <20210410094752.GB21691@zn.tnic> References: <1617092747-15769-1-git-send-email-feng.tang@intel.com> <87y2dq32xc.ffs@nanos.tec.linutronix.de> <20210410094752.GB21691@zn.tnic> Date: Sat, 10 Apr 2021 20:43:27 +0200 Message-ID: <87fszy2d68.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 10 2021 at 11:47, Borislav Petkov wrote: > On Sat, Apr 10, 2021 at 11:27:11AM +0200, Thomas Gleixner wrote: >> On Tue, Mar 30 2021 at 16:25, Feng Tang wrote: >> > Normally the tsc_sync will be checked every time system enters idle state, >> > but there is still caveat that a system won't enter idle, either because >> > it's too busy or configured purposely to not enter idle. Setup a periodic >> > timer to make sure the check is always on. >> >> Bah. I really hate the fact that we don't have a knob to disable writes >> to the TSC/TSC_ADJUST msrs. That would spare this business alltogether. > > We have the MSR filtering and I'd *love* to add those MSRs to a > permanent ban list of MSRs which will never ever be written to from > luserspace. That's good, but what I really want is a knob which prevents BIOS/SMM from writing to it. The only reason why BIOS ever needs to write is for physical hotplug and perhaps for 4+ socket machines on boot. After that every write is a bug. Thanks, tglx