]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
x86/S3: put data segment registers into known state upon resume
authorJan Beulich <jbeulich@suse.com>
Fri, 24 Jul 2020 08:17:26 +0000 (10:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Jul 2020 08:17:26 +0000 (10:17 +0200)
wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
wakeup_start did set it to, and %gs at whatever BIOS did load into it.
All of this may end up confusing the first load_segments() to run on
the BSP after resume, in particular allowing a non-nul selector value
to be left in %fs.

Alongside %ss, also put all other data segment registers into the same
state that the boot and CPU bringup paths put them in.

Reported-by: M. Vefa Bicakci <m.v.b@runbox.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/acpi/wakeup_prot.S

index dcc7e2327d90328df64e69e90e3f3a7d0b4aec90..a2c41c4f3f263ebed6b9de656eccba05eb411ab0 100644 (file)
@@ -49,6 +49,10 @@ ENTRY(s3_resume)
         mov     %rax, %cr0
 
         mov     $__HYPERVISOR_DS64, %eax
+        mov     %eax, %ds
+        mov     %eax, %es
+        mov     %eax, %fs
+        mov     %eax, %gs
         mov     %eax, %ss
         mov     saved_rsp(%rip), %rsp