Commit 9fee76bd authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

restore: Reserve space in restorer for FPU frame

For code simplicity we reserve the maximum size which
might be needed to form an FPU frame (ie for both
xsave and fxsave operations).
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 10f22fe9
...@@ -80,6 +80,16 @@ struct thread_restore_args { ...@@ -80,6 +80,16 @@ struct thread_restore_args {
struct rst_sched_param sp; struct rst_sched_param sp;
struct task_restore_core_args *ta; struct task_restore_core_args *ta;
/*
* The FPU xsave area must be continious and FP_MIN_ALIGN_BYTES
* aligned, thus make sure the compiler won't insert any hole here.
*/
bool has_fpu;
union {
struct xsave_struct xsave;
unsigned char __pad[sizeof(struct xsave_struct) + FP_XSTATE_MAGIC2_SIZE];
};
} __aligned(sizeof(long)); } __aligned(sizeof(long));
struct task_restore_core_args { struct task_restore_core_args {
......
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