--- 8aa85f17667e5034cfd2fae3eecd217c878d0529 +++ eeeb52276271e1e3d8759e0d59100ae9eff91405 @@ -104,6 +104,8 @@ static void __save_processor_state(struc ctxt->cr4 = read_cr4(); ctxt->cr8 = read_cr8(); #endif + ctxt->misc_enable_saved = !rdmsrl_safe(MSR_IA32_MISC_ENABLE, + &ctxt->misc_enable); } /* Needed by apm.c */ @@ -176,6 +178,8 @@ static void fix_processor_context(void) */ static void __restore_processor_state(struct saved_context *ctxt) { + if (ctxt->misc_enable_saved) + wrmsrl(MSR_IA32_MISC_ENABLE, ctxt->misc_enable); /* * control registers */