[CRIU] [PATCH 06/22] cpu: Prepare scaffold for obtaining cpu features

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 21 16:05:47 EST 2012


While this patch may look a big one, in real it does pretty simple things

 - adds ability to parse /proc/cpuinfo to find which FPU c/r modes
   _kernel_ does support (some features can be disabled via kernel
   command line, for example the kernel may run with "nofxsr" option
   which won't allow us to do a checkpoint)

 - adds ability to find some of rt-features the _cpu_ supports. In
   particular if xsave insn is supported we need to know how big memory
   slab is needed to keep complete fpu frame

 - it adds symbolic names for all the fetures known to the kernel at
   the moment, i decided to bring them all in because it allow us to
   extend parsing in more flexible way if needed (ie to add new feature
   parsing simply extend cpu_parse_flags by two lines of code)

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 Makefile             |    1 +
 cpu.c                |  144 ++++++++++++++++++
 include/cpu.h        |  412 ++++++++++++++++++++++++++++++++++++++++++++++++++
 include/proc_parse.h |    2 +
 proc_parse.c         |   28 ++++
 5 files changed, 587 insertions(+), 0 deletions(-)
 create mode 100644 cpu.c
 create mode 100644 include/cpu.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-cpu-Prepare-scaffold-for-obtaining-cpu-features.patch
Type: text/x-patch
Size: 26376 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/criu/attachments/20121122/65ddc41d/attachment-0001.bin>


More information about the CRIU mailing list