[2/6] compel: arch, x86 -- Dont require xsave_struct to be aligned

Submitted by Cyrill Gorcunov on Feb. 13, 2017, 3:03 p.m.

Details

Message ID 1486998203-2834-3-git-send-email-gorcunov@openvz.org
State New
Series "ia32: Add support for FPU c/r in compat environment"
Headers show

Commit Message

Cyrill Gorcunov Feb. 13, 2017, 3:03 p.m.
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@openvz.org>
---
 compel/arch/x86/src/lib/include/uapi/asm/fpu.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

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.