[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9c6c58a0a4a66568b8e887944d2426d59370ae05.1462816638.git.yu-cheng.yu@intel.com>
Date: Mon, 9 May 2016 13:46:09 -0700
From: Yu-cheng Yu <yu-cheng.yu@...el.com>
To: linux-kernel@...r.kernel.org, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Borislav Petkov <bp@...e.de>,
Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
Yu-cheng Yu <yu-cheng.yu@...el.com>
Subject: [PATCH v5 12/13] x86/xsaves: Fix fpstate_init() for XSAVES
When XSAVES is used, xsave.header.xcomp_bv[63] must be set.
Signed-off-by: Yu-cheng Yu <yu-cheng.yu@...el.com>
---
arch/x86/kernel/fpu/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 41ab106..25e2605 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -224,6 +224,9 @@ void fpstate_init(union fpregs_state *state)
memset(state, 0, kernel_xstate_size);
+ if (cpu_has_xsaves)
+ state->xsave.header.xcomp_bv = (u64)1 << 63;
+
if (cpu_has_fxsr)
fpstate_init_fxstate(&state->fxsave);
else
--
1.9.1
Powered by blists - more mailing lists