Commit ee478bed authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

x86: cpu -- Move strict capability mode into own block

It should be there from the beginning but happen to escape.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmaill.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent ddd373f4
...@@ -294,10 +294,12 @@ static int cpu_validate_features(compel_cpuinfo_t *cpu_info) ...@@ -294,10 +294,12 @@ static int cpu_validate_features(compel_cpuinfo_t *cpu_info)
/* /*
* Strict capability mode. Everything must match. * Strict capability mode. Everything must match.
*/ */
if (memcmp(cpu_info->x86_capability, rt_cpu_info.x86_capability, if (opts.cpu_cap & CPU_CAP_CPU) {
sizeof(cpu_info->x86_capability))) { if (memcmp(cpu_info->x86_capability, rt_cpu_info.x86_capability,
pr_err("CPU capabilities do not match run time\n"); sizeof(cpu_info->x86_capability))) {
return -1; pr_err("CPU capabilites do not match run time\n");
return -1;
}
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment