[CRIU] [PATCH 4/5] opt: cpu-cap -- Introduce "cpuinfo" capability

Cyrill Gorcunov gorcunov at openvz.org
Mon Sep 8 14:39:39 PDT 2014


This will serve testing of cpu instruction level
capability.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 crtools.c            | 2 ++
 include/cr_options.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/crtools.c b/crtools.c
index 3d52f4a70f35..44c02d36fe7d 100644
--- a/crtools.c
+++ b/crtools.c
@@ -113,6 +113,8 @@ static int parse_cpu_cap(struct cr_options *opts, const char *optarg)
 			____cpu_set_cap(opts, CPU_CAP_ALL, inverse);
 		else if (!strncmp(optarg, "none", 4))
 			____cpu_set_cap(opts, CPU_CAP_NONE, inverse);
+		else if (!strncmp(optarg, "cpuinfo", 7))
+			____cpu_set_cap(opts, CPU_CAP_CPUINFO, inverse);
 		else
 			goto Esyntax;
 	}
diff --git a/include/cr_options.h b/include/cr_options.h
index 2be676563d6e..48706de69df3 100644
--- a/include/cr_options.h
+++ b/include/cr_options.h
@@ -9,6 +9,7 @@
  * CPU capability options.
  */
 #define CPU_CAP_FPU		(1u)
+#define CPU_CAP_CPUINFO		(2u)
 #define CPU_CAP_ALL		(-1u)
 #define CPU_CAP_NONE		(0u)
 
-- 
1.9.3



More information about the CRIU mailing list