The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* RDTSCP | IA32_TSC_AUX on x86-32
@ 2022-11-23  9:46 Sebastian Andrzej Siewior
  2022-11-23  9:59 ` Borislav Petkov
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Andrzej Siewior @ 2022-11-23  9:46 UTC (permalink / raw)
  To: x86, linux-kernel
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	H. Peter Anvin

Hi,

the RDTSCP opcode is translated as "Read Time-Stamp Counter and
Processor ID". It does not read the Processor ID is merely returns the
value of IA32_TSC_AUX which has been previously written by the OS. This
is documented but is misleading if you never made it past the headline.

Now. On 64bit there is __vdso_getcpu and IA32_TSC_AUX is setup (it also
contains the node number but…) for its purpose.
On 32bit there is no __vdso_getcpu and IA32_TSC_AUX is not setup.
RDTSCP is not privileged and returns the proper timestamp but the "CPU"
field is always zero.

Is the format OS specific and not for user purpose or could IA32_TSC_AUX
be setup on 32bit?

Sebastian

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-28 14:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-23  9:46 RDTSCP | IA32_TSC_AUX on x86-32 Sebastian Andrzej Siewior
2022-11-23  9:59 ` Borislav Petkov
2022-11-23 10:02   ` Sebastian Andrzej Siewior
2022-11-23 10:23     ` Borislav Petkov
2022-11-28 14:14       ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox