summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Mózes <hydrapolic@gmail.com>2023-04-14 19:03:31 +0200
committerTomáš Mózes <hydrapolic@gmail.com>2023-04-14 19:03:31 +0200
commit7e0f315531fdc3c24b6b9a0bb9d391b4cb52780e (patch)
tree81407655112d5e3b8a29a76395a842052fb036ae /0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch
parentXen 4.16.4-pre-patchset-0 (diff)
downloadxen-upstream-patches-7e0f315531fdc3c24b6b9a0bb9d391b4cb52780e.tar.gz
xen-upstream-patches-7e0f315531fdc3c24b6b9a0bb9d391b4cb52780e.tar.bz2
xen-upstream-patches-7e0f315531fdc3c24b6b9a0bb9d391b4cb52780e.zip
Xen 4.17.1-pre-patchset-04.17.1-pre-patchset-0
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Diffstat (limited to '0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch')
-rw-r--r--0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch b/0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch
new file mode 100644
index 0000000..142280f
--- /dev/null
+++ b/0025-x86-S3-Restore-Xen-s-MSR_PAT-value-on-S3-resume.patch
@@ -0,0 +1,36 @@
+From a470a83c36c07b56d90957ae1e6e9ebc458d3686 Mon Sep 17 00:00:00 2001
+From: Andrew Cooper <andrew.cooper3@citrix.com>
+Date: Tue, 7 Feb 2023 16:56:14 +0100
+Subject: [PATCH 25/89] 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@citrix.com>
+Reviewed-by: Jan Beulich <jbeulich@suse.com>
+master commit: 4d975798e11579fdf405b348543061129e01b0fb
+master date: 2023-01-10 21:21:30 +0000
+---
+ 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
+--
+2.40.0
+