Commit f165bdc9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

cpu: x86 -- Fix --cpu-cap=fpu handling on restore mode

Our CPU_CAP_s are bitmaps so if cpuinfo image is present
but we require only FPU to check we need to check this
bit being sole on comman line.

It was a typo in first place which caused statement to
be false always (it's not a problem though and not a
@stable candidate because with this mistake we fall
into strict match cpu mode).
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2fd795b6
...@@ -276,7 +276,7 @@ static int cpu_validate_features(CpuinfoX86Entry *img_x86_entry) ...@@ -276,7 +276,7 @@ static int cpu_validate_features(CpuinfoX86Entry *img_x86_entry)
return -1; return -1;
} }
if ((opts.cpu_cap & ~CPU_CAP_FPU) == CPU_CAP_FPU) { if (opts.cpu_cap == CPU_CAP_FPU) {
/* /*
* If we're requested to check FPU only ignore * If we're requested to check FPU only ignore
* any other bit. It's up to a user if the * any other bit. It's up to a user if the
......
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