From: Jan Beulich Date: Fri, 7 Aug 2020 15:09:19 +0000 (+0200) Subject: x86/S3: put data segment registers into known state upon resume X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~33^2~78 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b8c3e33a4fe4374f633b4369200731662ff1f750;p=xen.git x86/S3: put data segment registers into known state upon resume 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 Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Reviewed-by: Andrew Cooper master commit: 55f8c389d4348cc517946fdcb10794112458e81e master date: 2020-07-24 10:17:26 +0200 --- diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S index dcc7e2327d..a2c41c4f3f 100644 --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -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