[CRIU] [PATCH 00/22] FPU c/r, v2
Cyrill Gorcunov
gorcunov at openvz.org
Wed Nov 21 16:05:41 EST 2012
Hi guys,
I'm pleased to announce the v2 of FPU c/r. What have been
changed since v1
- xsave now properly supported and we can c/r up to ymm
registers now
- all series get reordered and simplified
Here is overall design is pretty simple:
- The FPU is damped via parasite by fxsave or xsave
instruction which fills memory slab with complete
FPU state
- Then we restore the FPU state by providing its state
inside sigreturn frame and the kernel initialize it
for us
Note, at moment we don't do additional analisys and simply
dump complete FPU state. Since on all machines I've been
testing this functioanlity the libc did use FPU we always
have FPU in "touched" state and we have to checkpoint it.
In future we could add some command line option flag which
would allow the user to decide if FPU is to be saved or
not.
Cyrill Gorcunov (22):
make: Add utilities.mak
make: Add test that "fxsaveq" instruction is supported
Include fpu.h
protobuf: Add cpu.proto
protobuf: Update core.proto for new features
cpu: Prepare scaffold for obtaining cpu features
dump,restore: Initialize cpu run-time features
parasite: Add ability to dump FPU state
dump: Allocate enough space for FPU dumping in PB objects
dump: Fill cpu features on checkpoint
dump: Checkpoint the FPU state
dump: Drop padding from FPU state
restorer: Extend thread_restore_args to keep xsave structure
restorer: Make rt_sigcontext::fpstate being void
restore: Add test that registers are present in image
restore: Add test for xsave data present in image
restore: Add ability to restore FPU data
zdtm: Don't wait too long for restore
zdtm: Add cpuid.h
zdtm: Enable fpu00 test-case
zdtm: Add fpu01 test
zdtm: Enable fpu01 test
Makefile | 4 +
Makefile.inc | 4 +
config/feature-tests.mak | 7 +
config/utilities.mak | 188 ++++++++++++++++++
cpu.c | 144 ++++++++++++++
cr-dump.c | 110 ++++++++---
cr-restore.c | 126 ++++++++++++
include/cpu.h | 412 ++++++++++++++++++++++++++++++++++++++++
include/fpu.h | 165 ++++++++++++++++
include/parasite-syscall.h | 3 +
include/parasite.h | 7 +
include/proc_parse.h | 2 +
include/restorer.h | 10 +-
parasite-syscall.c | 19 ++
parasite.c | 24 +++
proc_parse.c | 28 +++
protobuf/Makefile | 1 +
protobuf/core.proto | 15 ++
protobuf/cpu.proto | 13 ++
restorer.c | 8 +
test/zdtm.sh | 4 +-
test/zdtm/lib/cpuid.h | 39 ++++
test/zdtm/live/static/Makefile | 1 +
test/zdtm/live/static/fpu01.c | 105 ++++++++++
24 files changed, 1407 insertions(+), 32 deletions(-)
create mode 100644 config/feature-tests.mak
create mode 100644 config/utilities.mak
create mode 100644 cpu.c
create mode 100644 include/cpu.h
create mode 100644 include/fpu.h
create mode 100644 protobuf/cpu.proto
create mode 100644 test/zdtm/lib/cpuid.h
create mode 100644 test/zdtm/live/static/fpu01.c
--
1.7.7.6
More information about the CRIU
mailing list