[CRIU] [PATCH 06/14] checkpoint: Add dumping of FPU state

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 19 15:36:09 EST 2012


On Thu, Dec 20, 2012 at 12:26:09AM +0400, Pavel Emelyanov wrote:
> On 12/19/2012 08:31 PM, Cyrill Gorcunov wrote:
> > 
> > The dumping of FPU state is done with help of ptrace
> > facility. There are two cases which we need to handle
> > depending on which features are available on host machine
> > 
> > 1) The dump via ptrace(PTRACE_GETFPREGS ...)
> > 
> >    In this case the kernel will use fxsave approach
> >    inside the kenrel and provides us back the data
> >    encoded in i387_fxsave_struct format.
> > 
> > 2) The dump via ptrace(PTRACE_GETREGSET ...)
> > 
> >    In this case the kernel will use xsave approach
> >    inside the kernel and provides us back the data
> >    encoded in xsave_struct format
> 
> Doesn't kernel decide itself what way to get FPU stuff to use?

No, it doesn't. For backward compatibility reason. Previously
there were no AVX extension thus old programs which are
note ready for new registers should not fail when they do
PTRACE_GETFPREGS/PTRACE_SETFPREGS.

	Cyrill


More information about the CRIU mailing list