From: Andi Kleen <andi@firstfloor.org>
To: Kyle Huey <khuey@kylehuey.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction.
Date: Mon, 12 Sep 2016 10:37:31 -0700 [thread overview]
Message-ID: <87twdl9fz8.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <1473640169-24145-1-git-send-email-khuey@kylehuey.com> (Kyle Huey's message of "Sun, 11 Sep 2016 17:29:23 -0700")
Kyle Huey <me-OhBmq/TcCDJWk0Htik3J/w@public.gmane.org> writes:
> rr (http://rr-project.org/), a userspace record-and-replay reverse-
> execution debugger, would like to trap and emulate the CPUID instruction.
> This would allow us to a) mask away certain hardware features that rr does
> not support (e.g. RDRAND) and b) enable trace portability across machines
> by providing constant results.
>
> Intel supports faulting on the CPUID instruction in newer processors. Bit
> 31 of MSR_PLATFORM_INFO advertises support for this feature. It is
> documented in detail in Section 2.3.2 of
> http://www.intel.com/content/dam/www/public/us/en/documents/application-notes/virtualization-technology-flexmigration-application-note.pdf.
This will explode when an interrupt handler executes cpuid, won't it?
The cpuid char driver does this, other code may too.
You probably would need to protect these CPUIDs with an exception
handler that temporarily disables this bit and retries.
-Andi
next prev parent reply other threads:[~2016-09-12 17:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-12 0:29 [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction Kyle Huey
2016-09-12 9:07 ` Borislav Petkov
2016-09-12 14:15 ` Kyle Huey
2016-09-12 14:34 ` Borislav Petkov
2016-09-13 18:42 ` Kyle Huey
2016-09-12 16:56 ` Andy Lutomirski
2016-09-12 17:18 ` Borislav Petkov
2016-09-12 17:56 ` Jann Horn
2016-09-12 21:07 ` Andy Lutomirski
2016-09-14 6:13 ` Kyle Huey
2016-09-14 18:52 ` Andy Lutomirski
2016-09-14 19:22 ` Andrew Cooper
2016-09-14 19:23 ` Boris Ostrovsky
2016-09-14 19:28 ` Andrew Cooper
2016-09-14 19:36 ` Andy Lutomirski
2016-09-14 19:42 ` Andrew Cooper
2016-09-12 17:37 ` Andi Kleen [this message]
2016-09-12 18:25 ` Henrique de Moraes Holschuh
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=87twdl9fz8.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=khuey@kylehuey.com \
--cc=linux-kernel@vger.kernel.org \
--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