[lkml]   [2009]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [Xen-devel] [PATCH 10/24] xen: mask XSAVE from cpuid
>>> Jeremy Fitzhardinge <> 13.03.09 09:11 >>>
>From: Jeremy Fitzhardinge <>
>Xen leaves XSAVE set in cpuid, but doesn't allow cr4.OSXSAVE
>to be set. This confuses the kernel and it ends up crashing on
>an xsetbv instruction.
>At boot time, try to set cr4.OSXSAVE, and mask XSAVE out of
>cpuid it we can't. This will produce a spurious error from Xen,
>but allows us to support XSAVE if/when Xen does.

As pointed out on an earlier thread, it seems inappropriate to do probing
like this when there is a cpuid feature flag (osxsave) that can be used to
determine whether XSAVE can be used. And even without that flag,
simply reading CR4 and checking whether osxsave is set there would
suffice. This is under the assumption that Xen's to-be-done implementation
of XSAVE support would match that of FXSAVE (Xen turns its support on
unconditionally and for all [pv] guests).


 \ /
  Last update: 2009-03-13 11:25    [W:0.130 / U:57.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site