[CRIU] [PATCH 00/14] FPU c/r, v4

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 19 16:58:29 EST 2012


On Thu, Dec 20, 2012 at 12:33:25AM +0400, Cyrill Gorcunov wrote:
> On Thu, Dec 20, 2012 at 12:25:04AM +0400, Pavel Emelyanov wrote:
> > On 12/19/2012 08:31 PM, Cyrill Gorcunov wrote:
> > > Finally I managed to grab xsave-capable machine and test
> > > FPU c/r on it. Please review, comments are welcome.
> > 
> > Some overview is required -- what FPU consists of, what
> > are the variants, how we dump them and how restore.
> 
> Ouch, sorry, will write, thanks!

Here is some review over all things we're doiing to c/r FPU
state

 - We require host cpu we're running on to have FPU up and
   running, this is because x86-64 series we're targeting do
   have such unit, since there is ARM port is coming, most
   likely we will need some level of abstraction and use
   cpu operations, say cpu->init() and such

 - There are two techniques used to fetch FPU stated from the
   kernel

	- via ptrace PTRACE_GETFPREGS facility, which uses fxsave
	  format for data provided to user-space

	- or via ptrace PTRACE_GETREGSET facility, which uses xsave
	  format for data encoding

   in both cases we decode data and carry it in user_x86_fpregs_entry
   protobuf entry (which in turn belongs to core@ file)

 - In restore procedure we simply decode data and form fxsave/xsave
   frame (which kernel understands) and then simply pass it to
   rt_sys_sigreturn syscall, whic does all hard work for us

	Cyrill


More information about the CRIU mailing list