lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1807192240260.1693@nanos.tec.linutronix.de>
Date:   Thu, 19 Jul 2018 22:44:13 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Pavel Tatashin <pasha.tatashin@...cle.com>
cc:     peterz@...radead.org, Steven Sistare <steven.sistare@...cle.com>,
        Daniel Jordan <daniel.m.jordan@...cle.com>,
        linux@...linux.org.uk, schwidefsky@...ibm.com,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        John Stultz <john.stultz@...aro.org>, sboyd@...eaurora.org,
        x86@...nel.org, LKML <linux-kernel@...r.kernel.org>,
        mingo@...hat.com, hpa@...or.com, douly.fnst@...fujitsu.com,
        prarit@...hat.com, feng.tang@...el.com,
        Petr Mladek <pmladek@...e.com>, gnomes@...rguk.ukuu.org.uk,
        linux-s390@...r.kernel.org, boris.ostrovsky@...cle.com,
        jgross@...e.com, pbonzini@...hat.com
Subject: Re: [PATCH v14 20/25] x86/tsc: calibrate tsc only once

On Thu, 19 Jul 2018, Pavel Tatashin wrote:

> On Thu, Jul 19, 2018 at 12:49 PM Pavel Tatashin
> <pasha.tatashin@...cle.com> wrote:
> >
> > > So create two functions. native_...early..() and native....(). The early
> > > one does not contain the hpet/pmtimer stuff and it replaces the ops.pointer
> > > with the late one which contains all of it.
> >
> > Good idea. Actually, the late one will contain only hpet/pmtimer and I
> > will set it only if tsc frequency was not determined only.
> 
> If we determined tsc early in boot using one of the quick methods:
> from cpuid/msr/quick_pit, can we assume that frequencies of all other
> CPUs will be determined the same way? Or do we still have to fallback
> to PIT/HPET/PMTIMER? I wondering if we support heterogeneous
> multi-socket platforms with different CPUs, because that the only
> platforms where I see such scenario is possible.

The frequency for secondary CPUs is usually taken from the boot CPU and the
only reason why recalibration can happen is when the CPU does not have a
constant frequency TSC.

For that case the quick PIT + hpet/pmtimer calibration bundle is
required. So yes, the early calibration might work with quick PIT (those
CPUs definitely do not have MSR/CPUID based calibration), but the
recalibration might fail the quick PIT calibration for various reasons.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ