]> xenbits.xensource.com Git - xen.git/commitdiff
x86/S3: Restore Xen's MSR_PAT value on S3 resume
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Jan 2023 20:42:58 +0000 (20:42 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 10 Jan 2023 21:21:30 +0000 (21:21 +0000)
There are two paths in the trampoline, and Xen's PAT needs setting up in both,
not just the boot path.

Fixes: 4304ff420e51 ("x86/S3: Drop {save,restore}_rest_processor_state() completely")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/wakeup.S

index c17d613b61ff450519026b8a8f9722cf3b93617a..08447e193496617d2233510513caf519b6bc4d4d 100644 (file)
@@ -130,6 +130,11 @@ wakeup_32:
         and     %edi, %edx
         wrmsr
 1:
+        /* Set up PAT before enabling paging. */
+        mov     $XEN_MSR_PAT & 0xffffffff, %eax
+        mov     $XEN_MSR_PAT >> 32, %edx
+        mov     $MSR_IA32_CR_PAT, %ecx
+        wrmsr
 
         /* Set up EFER (Extended Feature Enable Register). */
         movl    $MSR_EFER,%ecx