On 24 Apr 2006, at 14:54, Jan Beulich wrote:
> Since native Linux isn''t considering the possibility of fxrstor
> faulting because of bad data I''m wondering why Xen is,
> and what kind of fault it is being thought of here; after all, the
> documentation also doesn''t say anything like that.
Linux only FXRSTORs state that was previously saved by the kernel using
FXSAVE. Hence Linux knows that the data is valid and reloading it will
not fault.
This is not the case in Xen, where the FPU info may come from a saved
image file (if someone executes ''xm restore'' on an image
file). The FPU
data block may contain bogus or malicious data and Xen must protect
itself from that.
Concretely, if the info has a corrupted MXCSR with 1s in reserved bit
positions then FXRSTOR will cause a general-protection fault. This
isn''t listed in the Protected Mode Exceptions section of the Intel
reference manual, but see the last sentence in the main description for
the instruction.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel