[CRIU] [PATCH 2/6] compel: arch, x86 -- Dont require xsave_struct to be aligned
Cyrill Gorcunov
gorcunov at openvz.org
Mon Feb 13 07:03:19 PST 2017
We don't iteract with fpu hardware directly so no need
for alignment. Moreover it will help to handle ia32 mode
where this structure won't be aligned and this is required
by a kernel to process the sigreturn frame.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
compel/arch/x86/src/lib/include/uapi/asm/fpu.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
index 7525f153a7e1..d3245f256924 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/fpu.h
@@ -74,13 +74,15 @@ struct ymmh_struct {
} __packed;
/*
- * cpu requires it to be 64 byte aligned
+ * cpu requires it to be 64 byte aligned but
+ * since we don't work with hw directly, drop
+ * it and we embed it into ia32 mode.
*/
struct xsave_struct {
struct i387_fxsave_struct i387;
struct xsave_hdr_struct xsave_hdr;
struct ymmh_struct ymmh;
-} __aligned(FP_MIN_ALIGN_BYTES) __packed;
+} __packed;
/*
* This one is used in restorer.
--
2.7.4
More information about the CRIU
mailing list