mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/S3: Restore cr4 later during resume
Just like the BSP/AP paths, %cr4 is loaded with only PAE. Defer restoring all of %cr4 (MCE in particular) until all the system structures (IDT/TSS in particular) have been loaded. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
a8e9ac0a23
commit
581deaa829
2 files changed
+3
-4
No files matched your search
@@ -43,6 +43,9 @@ void restore_rest_processor_state(void)
|
||||
{
|
||||
load_system_tables();
|
||||
|
||||
/* Restore full CR4 (inc MCE) now that the IDT is in place. */
|
||||
write_cr4(mmu_cr4_features);
|
||||
|
||||
/* Recover syscall MSRs */
|
||||
wrmsrl(MSR_LSTAR, saved_lstar);
|
||||
wrmsrl(MSR_CSTAR, saved_cstar);
|
||||
|
||||
@@ -45,10 +45,6 @@ ENTRY(do_suspend_lowlevel)
|
||||
ENTRY(s3_resume)
|
||||
lgdt boot_gdtr(%rip)
|
||||
|
||||
/* mmu_cr4_features contains latest cr4 setting */
|
||||
mov REF(mmu_cr4_features), GREG(ax)
|
||||
mov GREG(ax), %cr4
|
||||
|
||||
mov REF(saved_cr0), GREG(ax)
|
||||
mov GREG(ax), %cr0
|
||||
|
||||
|
||||