[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87twdl9fz8.fsf@tassilo.jf.intel.com>
Date: Mon, 12 Sep 2016 10:37:31 -0700
From: Andi Kleen <andi@...stfloor.org>
To: Kyle Huey <khuey@...ehuey.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction.
Kyle Huey <me-OhBmq/TcCDJWk0Htik3J/w@...lic.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
Powered by blists - more mailing lists