x86/S3: Restore Xen's MSR_PAT value on S3 resume
PATCH 1/1 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 <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Wei Liu <[email protected]>
CC: Marek Marczykowski-Górecki <[email protected]>
CC: Demi Marie Obenour <[email protected]>
Entirely untested, but this a fairly embarassing mistake in hindsight.
--- xen/arch/x86/boot/wakeup.S | 5 +++++ 1 file changed, 5 insertions(+)
xen/arch/x86/boot/wakeup.S +5 -0
@@ -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
Signature · 1 line
2.11.0
Quoted 5 lines · Andrew Cooper
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 <[email protected]>
Reviewed-by Jan Beulich <[email protected]>