[CRIU] [PATCH 00/19] FPU c/r, v1

Cyrill Gorcunov gorcunov at openvz.org
Fri Nov 16 11:33:14 EST 2012


On Fri, Nov 16, 2012 at 08:15:56PM +0400, Pavel Emelyanov wrote:
> On 11/16/2012 06:50 PM, Cyrill Gorcunov wrote:
> > Hi guys, here is a first attempt to implement FPU c/r, please take a look.
> 
> Some overall notes on the approach would help.

Sure. The idea is pretty simple -- to dump FPU frame we
use native fxsave/xsave commands in parasite code. This
instructions do write the memory block with FPU state
data. Then we convert the data to PB format and write it
in image.

On restore we read the FPU data and form the memory
area with it and the kernel recognize that FPU state
is provided on rt_sigreturn call.

Because fxsave/xsave can be used only if kernel and
cpu supports them -- we do parse /proc/cpuinfo to
figure out which command we should use. This information
is saved in core image and then read on restore.

Note that xsave FPU format is not yet complete and will
be addressed in future work. Just wanted to share code
early.

	Cyrill


More information about the CRIU mailing list