|
@@ -14,6 +14,7 @@
|
|
|
#include <asm/page.h>
|
|
|
#include <asm/pgtable.h>
|
|
|
#include <asm/mtrr.h>
|
|
|
+#include <asm/xcr.h>
|
|
|
|
|
|
static void fix_processor_context(void);
|
|
|
|
|
@@ -122,6 +123,12 @@ static void __restore_processor_state(struct saved_context *ctxt)
|
|
|
wrmsrl(MSR_GS_BASE, ctxt->gs_base);
|
|
|
wrmsrl(MSR_KERNEL_GS_BASE, ctxt->gs_kernel_base);
|
|
|
|
|
|
+ /*
|
|
|
+ * restore XCR0 for xsave capable cpu's.
|
|
|
+ */
|
|
|
+ if (cpu_has_xsave)
|
|
|
+ xsetbv(XCR_XFEATURE_ENABLED_MASK, pcntxt_mask);
|
|
|
+
|
|
|
fix_processor_context();
|
|
|
|
|
|
do_fpu_end();
|