[CRIU] [PATCH 5/9] x86: cpu -- Move strict capability mode into own block
Cyrill Gorcunov
gorcunov at gmail.com
Tue Aug 7 19:35:13 MSK 2018
It should be there from the beginning but happen to escape.
Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
---
criu/arch/x86/cpu.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/criu/arch/x86/cpu.c b/criu/arch/x86/cpu.c
index 10529260df05..6fe6ace6a198 100644
--- a/criu/arch/x86/cpu.c
+++ b/criu/arch/x86/cpu.c
@@ -294,10 +294,12 @@ static int cpu_validate_features(compel_cpuinfo_t *cpu_info)
/*
* Strict capability mode. Everything must match.
*/
- if (memcmp(cpu_info->x86_capability, rt_cpu_info.x86_capability,
- sizeof(cpu_info->x86_capability))) {
- pr_err("CPU capabilites do not match run time\n");
- return -1;
+ if (opts.cpu_cap & CPU_CAP_CPU) {
+ if (memcmp(cpu_info->x86_capability, rt_cpu_info.x86_capability,
+ sizeof(cpu_info->x86_capability))) {
+ pr_err("CPU capabilites do not match run time\n");
+ return -1;
+ }
}
return 0;
--
2.14.4
More information about the CRIU
mailing list