[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2/6] x86/suspend: Don't bother saving %cr3, %ss or flags
The trampoline has already set up the idle pagetables (which are the correct ones to use), and sanitised the flags state. For %ss, __HYPERVISOR_DS64 is the correct descriptor to restore. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- CC: Jan Beulich <JBeulich@xxxxxxxx> CC: Wei Liu <wl@xxxxxxx> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/acpi/wakeup_prot.S | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/xen/arch/x86/acpi/wakeup_prot.S b/xen/arch/x86/acpi/wakeup_prot.S index 8c525a802b..35fd7a5e9f 100644 --- a/xen/arch/x86/acpi/wakeup_prot.S +++ b/xen/arch/x86/acpi/wakeup_prot.S @@ -29,17 +29,10 @@ ENTRY(do_suspend_lowlevel) SAVE_GREG(13) SAVE_GREG(14) SAVE_GREG(15) - pushfq; - popq SAVED_GREG(flags) - - mov %ss, REF(saved_ss) mov %cr0, GREG(ax) mov GREG(ax), REF(saved_cr0) - mov %cr3, GREG(ax) - mov GREG(ax), REF(saved_cr3) - call save_rest_processor_state /* enter sleep state physically */ @@ -55,6 +48,7 @@ ENTRY(do_suspend_lowlevel) * * The trampoline re-intercepts here. State is: * - 64bit mode + * - %cr3 => idle_pg_table[] * * Everything else, including the stack, needs restoring. */ @@ -65,13 +59,11 @@ ENTRY(s3_resume) mov REF(mmu_cr4_features), GREG(ax) mov GREG(ax), %cr4 - mov REF(saved_cr3), GREG(ax) - mov GREG(ax), %cr3 - mov REF(saved_cr0), GREG(ax) mov GREG(ax), %cr0 - mov REF(saved_ss), %ss + mov $__HYPERVISOR_DS64, %eax + mov %eax, %ss LOAD_GREG(sp) /* Reload code selector */ @@ -80,8 +72,6 @@ ENTRY(s3_resume) pushq %rax lretq 1: - pushq SAVED_GREG(flags) - popfq call restore_rest_processor_state @@ -109,8 +99,6 @@ ENTRY(s3_resume) GLOBAL(saved_magic) .long 0x9abcdef0 -saved_ss: .word 0 - .align 8 DECLARE_GREG(sp) DECLARE_GREG(bp) @@ -120,7 +108,6 @@ DECLARE_GREG(cx) DECLARE_GREG(dx) DECLARE_GREG(si) DECLARE_GREG(di) -DECLARE_GREG(flags) DECLARE_GREG(8) DECLARE_GREG(9) @@ -132,4 +119,3 @@ DECLARE_GREG(14) DECLARE_GREG(15) saved_cr0: .quad 0 -saved_cr3: .quad 0 -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |