Re: [RFC] x86: xsave/xrstor support, ucontext_t extensions

From: Suresh Siddha
Date: Thu May 22 2008 - 21:49:34 EST


On Thu, May 22, 2008 at 02:34:45PM -0700, H. Peter Anvin wrote:
> Suresh Siddha wrote:
> >
> >can you please elaborate? even in presence of virtualization, appropriate
> >cpuid bits need to be set/visible for application, for xsave/xrstor to work
> >properly.
> >
>
> For many paravirtualization solutions, CPUID "leak" from the hypervisor.
> The fact that CPUID cannot be disabled (made ring 0 only) is a major
> flaw in the architecture.
>
> Therefore, relying on CPUID is too dangerous.

hmm.. so the kernel needs to export all the cpuid info (that the kernel enables
and supports) to the user through some mechanism then?

atleast in the xsave case, hypervisor can completely control the
OSXSAVE flag. I am still not convinced whether I need to add prctl()
to indicate the layout. If I have to add, then it should not just
be about whether xsave information is included in _fpstate or not, it should also
be about the whole cpuid information provided by the xsave architecture. Because
the user potentially needs all that information, to make sense out of
the data layout included in the extended state area.

thanks,
suresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/