[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] x86/S3: Restore Xen's MSR_PAT value on S3 resume
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Thu, 5 Jan 2023 20:48:39 +0000
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 05 Jan 2023 20:49:02 +0000
- Ironport-data: A9a23:V20rZ6kmwjj9cq3e9eJzEV/o5gxLJkRdPkR7XQ2eYbSJt1+Wr1Gzt xJNDT3XPfrbZzSjKtAlOdywp0xQvJPWmNVrSwA6pX1mESMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icf3grHmeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7aqaVA8w5ARkPqgS5AKGzBH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 d4DEgEIcgCAu8eryfWaa+1Ktsd+N/C+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsfYT/7C7pn9AusrlD5fydVtxS+oq0v7nKI5AdwzKLsIJzefdniqcB9zx3I+ z+cpz+R7hcyGf3A52SH6lyQpLWfk2TiXaM1DriJz6s/6LGU7jNKU0BHPbehmtGmjmauVtQZL FYbkgIrpLI3/VamTfH8WQO5u3+OuhMAW9tWHPY+4QvLwa3Riy6VC20FZj9Hdt09tcUySCAq1 1mGhNfgD3pkt7j9YWKQ8PKYoC2/PQARLHQefmkUQA0d+d7hrYovyBXVQb5LMoS4k9n0EjHY2 C2RoW41gLB7sCIQ//zlpxad2Wvq/8WXCF5ujunKYo67xiFiXr+ge5yr1X3G5LFhDYK/flrcp 0FRzqBy89syJZ2KkSWMRsAEE7eo++uJPVXgvLJ/I3Uy32/zoiD+JOi89Bk7fR40aZhcJVcFd WeJ4WtsCIlv0GxGhEOdS6a4EIwUwKfpDrwJvdiEP4MVMvCdmOJqlRyChHJ8PUi3yyDAcollY /93lPpA6l5EYZmLNBLsG48gPUYDn0jSP1/7S5Hh1AiA2rGDfnOTQrptGALQMbposPjZ8FSJo oc32y62J/N3Cr2Wjs7/qNd7ELz3BSJjWcCeRzJ/LIZv3TaK6El+UqSMkNvNiqRunrhPl/egw 0xRrnRwkQKl7VWecFXiV5yWQO+3NXqJhS5hbHNE0JfB8yRLXLtDG49FJsdvLeJ3qrY8pRO2J tFcE/i97j10Ymyv01wggVPV9eSOqDzDadqyAheY
- Ironport-hdrordr: A9a23:5lCdTqEnYyuT4xgkpLqE7MeALOsnbusQ8zAXPiFKJSC9F/byqy nAppsmPHPP5gr5OktBpTnwAsi9qBrnnPYejLX5Vo3SPzUO1lHYSL1K3M/PxCDhBj271sM179 YGT0GmMqyTMbGtt7ee3DWF
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
CC: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
Entirely untested, but this a fairly embarassing mistake in hindsight.
---
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 c17d613b61ff..08447e193496 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.11.0
|