HomeFreeBSD

x86 vdso gettc: Add RDTSCP support

Description

x86 vdso gettc: Add RDTSCP support

Detect and use RDTSCP if available, instead of fence+RDTSC. For AMD Zens+,
use LFENCE+RDTSC instead of RDTSCP (or MFENCE;RDTSC previously).

Reviewed by: gallatin, markj
Tested by: pho
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D27986

Details

Provenance
kibAuthored on Jan 6 2021, 3:05 PM
Reviewer
gallatin
Differential Revision
D27986: x86 tsc: use RDTSCP in preference of fence + RDTSC
Parents
rG5bf4bafd13a4: x86 vdso gettc: eliminate duplicated code in ifunc selectors.
Branches
Unknown
Tags
Unknown