Commit 740ae4a3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Andrei Vagin

x86: cpu -- Don't fail if member is not present in image

When migrating from old images the particular xsave member
might not be present in core-* image, which is fine we
simply left data as initial zero state.

https://jira.sw.ru/browse/PSBM-89215Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@gmail.com>
parent deef94ce
...@@ -438,9 +438,14 @@ int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core) ...@@ -438,9 +438,14 @@ int restore_fpu(struct rt_sigframe *sigframe, CoreEntry *core)
size_t size = pb_repeated_size(xsave, member); \ size_t size = pb_repeated_size(xsave, member); \
size_t xsize = (size_t)compel_fpu_feature_size(feature); \ size_t xsize = (size_t)compel_fpu_feature_size(feature); \
if (xsize != size) { \ if (xsize != size) { \
pr_err("%s reported %zu bytes (expecting %zu)\n", \ if (size) { \
# feature, xsize, size); \ pr_err("%s reported %zu bytes (expecting %zu)\n",\
return -1; \ # feature, xsize, size); \
return -1; \
} else { \
pr_debug("%s is not present in image, ignore\n",\
# feature); \
} \
} \ } \
xstate_bv |= (1UL << feature); \ xstate_bv |= (1UL << feature); \
xstate_size += xsize; \ xstate_size += xsize; \
......
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