[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH RFC] x86/resume: take care of fully eager FPU around system suspend



Just like in the HVM emulation and EFI runtime call cases we must not
set CR0.TS here in fully eager mode. Note that idle vCPU-s never have
->arch.fully_eager_fpu set (for their initialization not going through
vcpu_init_fpu()), so we won't hit the respective ASSERT() in
vcpu_restore_fpu_eager(). 

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
RFC: Not even compile tested, as I'm writing this from home. Also please
         excuse the formatting (hence the attachment) - our mail web frontend
      doesn't allow anything better.

--- a/xen/arch/x86/acpi/suspend.c
+++ b/xen/arch/x86/acpi/suspend.c
@@ -92,8 +92,11 @@ void restore_rest_processor_state(void)
         write_debugreg(7, curr->arch.debugreg[7]);
     }
 
-    /* Reload FPU state on next FPU use. */
-    stts();
+    /* Reload FPU state immediately or on next FPU use. */
+    if ( curr->arch.fully_eager_fpu )
+        vcpu_restore_fpu_eager(curr);
+    else
+        stts();
 
     if (cpu_has_pat)
         wrmsrl(MSR_IA32_CR_PAT, host_pat);

Attachment: x86-resume-eager-FPU.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.