From ee478bed970117c276aeecb28c80857eea9b6eca Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 30 Aug 2018 14:00:20 +0300 Subject: [PATCH] x86: cpu -- Move strict capability mode into own block It should be there from the beginning but happen to escape. Signed-off-by: Cyrill Gorcunov Reviewed-by: Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by: Andrei Vagin --- 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 6ffe97131..1945a3dc3 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 capabilities 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;