Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction.

From: Henrique de Moraes Holschuh
Date: Mon Sep 12 2016 - 14:25:29 EST


On Mon, 12 Sep 2016, Andi Kleen wrote:
> The cpuid char driver does this, other code may too.

Such as anything that calls sync_core().

That includes processor hotplug paths, and who knows what else...

> You probably would need to protect these CPUIDs with an exception
> handler that temporarily disables this bit and retries.

Better time that MSR access first. Hopefully, it is fast enough for
that.

--
Henrique Holschuh