|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/S3: Don't bother saving %cr3, %ss or flags
commit b3a32e206305bbfc057f27967d8fc72a325a9e2a
Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Dec 13 17:45:57 2019 +0000
Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Dec 18 11:42:54 2019 +0000
x86/S3: 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>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
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
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |