From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: RDTSCP | IA32_TSC_AUX on x86-32
Date: Wed, 23 Nov 2022 10:46:07 +0100 [thread overview]
Message-ID: <Y33r3w6xvEeZH2XY@linutronix.de> (raw)
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
next reply other threads:[~2022-11-23 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 9:46 Sebastian Andrzej Siewior [this message]
2022-11-23 9:59 ` RDTSCP | IA32_TSC_AUX on x86-32 Borislav Petkov
2022-11-23 10:02 ` Sebastian Andrzej Siewior
2022-11-23 10:23 ` Borislav Petkov
2022-11-28 14:14 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y33r3w6xvEeZH2XY@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox