summaryrefslogtreecommitdiffstats
path: root/recipes-containers/criu
diff options
context:
space:
mode:
authorDengke Du <dengke.du@windriver.com>2019-05-23 10:33:44 +0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-05-29 23:57:22 -0400
commit1f26faec8a8ebcc177e1d29c62bd8b8dbe0fe1cc (patch)
tree475063fa6358fc0cf12d00a2248e2f8f1a485791 /recipes-containers/criu
parenta7e7310b682a7c6d3e0cfb9e5dee667c2a04ccf8 (diff)
downloadmeta-virtualization-1f26faec8a8ebcc177e1d29c62bd8b8dbe0fe1cc.tar.gz
criu: fix dump error on Intel Apollo Lake SOC
Fix dump error when executing: criu dump -D checkpoint -t pid ------------------------------------------------- Error (criu/arch/x86/crtools.c:362): x86: Corruption in XFEATURE_YMM area (expected 64 but 0 obtained) Error (criu/cr-dump.c:1280): Can't infect (pid: 2874) with parasite Error (criu/cr-dump.c:1732): Dumping FAILED. ------------------------------------------------- Backport upstream patch on criu-dev branch to fix this: [https://github.com/checkpoint-restore/criu/commit/5a52e34655636a8f00a664cf42716e1439ea2ef0] Signed-off-by: Dengke Du <dengke.du@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/criu')
-rw-r--r--recipes-containers/criu/criu_git.bb1
-rw-r--r--recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch48
2 files changed, 49 insertions, 0 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index c6981c93..6fb60dbc 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -21,6 +21,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
21 file://0002-criu-Skip-documentation-install.patch \ 21 file://0002-criu-Skip-documentation-install.patch \
22 file://0001-criu-Change-libraries-install-directory.patch \ 22 file://0001-criu-Change-libraries-install-directory.patch \
23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ 23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
24 file://0001-x86-crtools-do-not-error-when-YMM-is-missing.patch \
24 " 25 "
25 26
26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 27COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
diff --git a/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch b/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch
new file mode 100644
index 00000000..795ef4cf
--- /dev/null
+++ b/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch
@@ -0,0 +1,48 @@
1From 6072c23dbd3bbdc9fead4d90fd2ea2212f2ae0cd Mon Sep 17 00:00:00 2001
2From: Zhang Ning <ning.a.zhang@intel.com>
3Date: Tue, 16 Apr 2019 15:45:05 +0800
4Subject: [PATCH] x86/crtools: do not error when YMM is missing
5
6for Intel Apollo Lake SOC, its cpuinfo and fpu features:
7cpu: x86_family 6 x86_vendor_id GenuineIntel x86_model_id Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
8cpu: fpu: xfeatures_mask 0x11 xsave_size 1088 xsave_size_max 1088 xsaves_size 704
9cpu: fpu: x87 floating point registers xstate_offsets 0 / 0 xstate_sizes 160 / 160
10
11this CPU doesn't have AVX registers, YMM feature.
12
13when CRIU runs on this CPU, it will report dump error:
14Dumping GP/FPU registers for 4888
15Error (criu/arch/x86/crtools.c:362): x86: Corruption in XFEATURE_YMM area (expected 64 but 0 obtained)
16Error (criu/cr-dump.c:1278): Can't infect (pid: 4888) with parasite
17
18that's because x86/crtools.c will still valid YMM xsave frame, thus fail to dump.
19
20bypass unsupported feature, to make CRIU runs this kinds of CPUs.
21
22Cc: Chen Hu <hu1.chen@intel.com>
23Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
24Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
25Signed-off-by: Andrei Vagin <avagin@gmail.com>
26
27Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/commit/5a52e34655636a8f00a664cf42716e1439ea2ef0]
28Signed-off-by: Dengke Du <dengke.du@windriver.com>
29---
30 criu/arch/x86/crtools.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
34index ee016da..efc23e5 100644
35--- a/criu/arch/x86/crtools.c
36+++ b/criu/arch/x86/crtools.c
37@@ -354,7 +354,7 @@ static bool valid_xsave_frame(CoreEntry *core)
38 };
39
40 for (i = 0; i < ARRAY_SIZE(features); i++) {
41- if (!features[i].ptr && i > 0)
42+ if (!features[i].ptr)
43 continue;
44
45 if (features[i].expected > features[i].obtained) {
46--
472.7.4
48