Re: [Xen-devel] [PATCH 10/24] xen: mask XSAVE from cpuid

H. Peter Anvin
2009-03-17T15:56:21Z

Andi Kleen wrote:
>> The point is YOU DON'T KNOW. In particular, there might be new traps,
>> there might be new state, there might be new MSRs, there might be new
>> control bits... anything. Therefore, you cannot blindly pass the bit
>> on, even though XSAVE solves one part of the problem.
>
> I think what will happen if you don't expose it is that there will
> be always hypervisors which are behind and applications/OS will end up
> doing probing for opcodes instead of trusting CPUID bits.
>
> Probably not what you intended.
>

Probing for opcodes is even more harmful, though. But yes, we don't
have a good answer to this, and I believe we *can't* have a good answer
to this either -- we could architect the CPUID instruction a bit
differently, but that doesn't account for the various needs of
differnent hypervisors.

Hypervisor vendors can of course make this easier by making their CPUID
code pluggable so the end user can "hotfix" upgrade it without upgrading
the hypervisor (which makes a lot of them nervous.)

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.