[lkml]   [2018]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.9 22/75] x86/mm/64: Fix reboot interaction with CR4.PCIDE
4.9-stable review patch.  If anyone has any objections, please let me know.


From: Andy Lutomirski <>

commit 924c6b900cfdf376b07bccfd80e62b21914f8a5a upstream.

Trying to reboot via real mode fails with PCID on: long mode cannot
be exited while CR4.PCIDE is set. (No, I have no idea why, but the
SDM and actual CPUs are in agreement here.) The result is a GPF and
a hang instead of a reboot.

I didn't catch this in testing because neither my computer nor my VM
reboots this way. I can trigger it with reboot=bios, though.

Fixes: 660da7c9228f ("x86/mm: Enable CR4.PCIDE on supported systems")
Reported-and-tested-by: Steven Rostedt (VMware) <>
Signed-off-by: Andy Lutomirski <>
Signed-off-by: Thomas Gleixner <>
Cc: Borislav Petkov <>
Cc: Hugh Dickins <>
Signed-off-by: Greg Kroah-Hartman <>

arch/x86/kernel/reboot.c | 4 ++++
1 file changed, 4 insertions(+)

--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -106,6 +106,10 @@ void __noreturn machine_real_restart(uns
+ /* Exiting long mode will fail if CR4.PCIDE is set. */
+ if (static_cpu_has(X86_FEATURE_PCID))
+ cr4_clear_bits(X86_CR4_PCIDE);

/* Jump to the identity-mapped low memory code */

 \ /
  Last update: 2018-01-01 16:23    [W:0.150 / U:3.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site