Commit 41ebf5c3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

cpu: Add testing if host cpu is suitable to FPU c/r

The cpu we're running on must at least support fxsave feature.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent cf2e6c54
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
#include "tty.h" #include "tty.h"
#include "net.h" #include "net.h"
#include "sk-packet.h" #include "sk-packet.h"
#include "cpu.h"
#ifndef CONFIG_X86_64 #ifndef CONFIG_X86_64
# error No x86-32 support yet # error No x86-32 support yet
...@@ -1640,6 +1641,9 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts) ...@@ -1640,6 +1641,9 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
pr_info("Dumping processes (pid: %d)\n", pid); pr_info("Dumping processes (pid: %d)\n", pid);
pr_info("========================================\n"); pr_info("========================================\n");
if (cpu_init())
goto err;
if (network_lock()) if (network_lock())
goto err; goto err;
......
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "pstree.h" #include "pstree.h"
#include "net.h" #include "net.h"
#include "tty.h" #include "tty.h"
#include "cpu.h"
#include "protobuf.h" #include "protobuf.h"
#include "protobuf/sa.pb-c.h" #include "protobuf/sa.pb-c.h"
...@@ -1236,6 +1237,9 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts) ...@@ -1236,6 +1237,9 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts)
if (check_img_inventory() < 0) if (check_img_inventory() < 0)
return -1; return -1;
if (cpu_init() < 0)
return -1;
if (prepare_task_entries() < 0) if (prepare_task_entries() < 0)
return -1; return -1;
......
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