[CRIU] [PATCH 2/2] x86: restore -- Allow to restore fpu even if image is incomatible with cpu state

Pavel Emelyanov xemul at parallels.com
Wed Jan 29 04:12:56 PST 2014


On 01/28/2014 05:47 PM, Cyrill Gorcunov wrote:
> 
> Sometime, especially when testing, we migrate checkpointed tasks between
> nodes which have different CPU capabilities. In particular some CPUs have
> xsave feature while others -- do not. So to be able to continue migration
> procedure even in such conditions we introducing --fpu-mode option which
> would force criu to restore FPU state ignoring extended status present in
> image files.
> 
> This feature is pretty dangerous and should not be used until you really
> know what you're doing.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  Documentation/criu.txt |  9 +++++++++
>  arch/x86/crtools.c     | 16 ++++++++++++----
>  crtools.c              | 23 +++++++++++++++++++++++
>  include/cr_options.h   |  9 +++++++++
>  4 files changed, 53 insertions(+), 4 deletions(-)

> +	/* Backward compatible mode: no fpu -> fxsave -> xsave transition allowed */
> +	FPU_MODE_COMPAT		= 0,
> +
> +	/* Any mode: process even breaking backward compatibility */
> +	FPU_MODE_ANY		= 1,

Can you shed more light on this. Where do we have fpu/fxsave/xsave states
in the code? And why do we have only two modes, when there are 4 potential
conversions (1 of which is src_fpu == dst_fpu)? And why do we call it
"backward compatibility"?

Thanks,
Pavel


More information about the CRIU mailing list