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

[xen master] x86/S3: Restore Xen's MSR_PAT value on S3 resume



commit 4d975798e11579fdf405b348543061129e01b0fb
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Thu Jan 5 20:42:58 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Jan 10 21:21:30 2023 +0000

    x86/S3: Restore Xen's MSR_PAT value on S3 resume
    
    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@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/boot/wakeup.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S
index c17d613b61..08447e1934 100644
--- a/xen/arch/x86/boot/wakeup.S
+++ b/xen/arch/x86/boot/wakeup.S
@@ -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
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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