All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Juergen Gross <jgross@suse.com>,
	Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Wei Liu <wei.liu2@citrix.com>, Wei Liu <wei.liu1@citrix.com>
Subject: [MINIOS PATCH 3/5] x86_64: merge RESTORE_REST into RESTORE_ALL
Date: Thu, 25 Aug 2016 17:38:26 +0100	[thread overview]
Message-ID: <1472143108-26331-4-git-send-email-wei.liu2@citrix.com> (raw)
In-Reply-To: <1472143108-26331-1-git-send-email-wei.liu2@citrix.com>

Signed-off-by: Wei Liu <wei.liu1@citrix.com>
---
 arch/x86/x86_64.S | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/arch/x86/x86_64.S b/arch/x86/x86_64.S
index c57ee10..8432d69 100644
--- a/arch/x86/x86_64.S
+++ b/arch/x86/x86_64.S
@@ -101,27 +101,23 @@ KERNEL_CS_MASK = 0xfc
 .endm
 
 .macro RESTORE_ALL
-	movq (%rsp),%r11
-	movq 1*8(%rsp),%r10
-	movq 2*8(%rsp),%r9
-	movq 3*8(%rsp),%r8
-	movq 4*8(%rsp),%rax
-	movq 5*8(%rsp),%rcx
-	movq 6*8(%rsp),%rdx
-	movq 7*8(%rsp),%rsi
-	movq 8*8(%rsp),%rdi
-	addq $9*8+8,%rsp
-.endm	
-
-.macro RESTORE_REST
 	movq (%rsp),%r15
 	movq 1*8(%rsp),%r14
 	movq 2*8(%rsp),%r13
 	movq 3*8(%rsp),%r12
 	movq 4*8(%rsp),%rbp
 	movq 5*8(%rsp),%rbx
-	addq $6*8,%rsp
-.endm
+	movq 6*8(%rsp),%r11
+	movq 7*8(%rsp),%r10
+	movq 8*8(%rsp),%r9
+	movq 9*8(%rsp),%r8
+	movq 10*8(%rsp),%rax
+	movq 11*8(%rsp),%rcx
+	movq 12*8(%rsp),%rdx
+	movq 13*8(%rsp),%rsi
+	movq 14*8(%rsp),%rdi
+	addq $15*8+8,%rsp
+.endm	
 
 .macro SAVE_REST
 	subq $6*8,%rsp
@@ -219,12 +215,10 @@ error_exit:
 	jnz restore_all_enable_events	#        != 0 => enable event delivery
 	XEN_PUT_VCPU_INFO(%rsi)
 
-	RESTORE_REST
 	RESTORE_ALL
 	HYPERVISOR_IRET 0
 
 restore_all_enable_events:
-	RESTORE_REST
 	RESTORE_ALL
 	pushq %rax                      # save rax for it will be clobbered later
 	RSP_OFFSET=8                    # record the stack frame layout changes
@@ -289,7 +283,6 @@ critical_region_fixup:
 
 #else
 error_exit:
-	RESTORE_REST
 	RESTORE_ALL
 	HYPERVISOR_IRET 0
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-08-25 16:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 16:38 [MINIOS PATCH 0/5] x86 assmebly code clean up Wei Liu
2016-08-25 16:38 ` [MINIOS PATCH 1/5] x86_32: remove inclusion of x86-32.h Wei Liu
2016-08-25 17:02   ` Juergen Gross
2016-08-25 16:38 ` [MINIOS PATCH 2/5] x86_64: remove unused labels Wei Liu
2016-08-25 17:04   ` Juergen Gross
2016-08-25 16:38 ` Wei Liu [this message]
2016-08-25 16:45   ` [MINIOS PATCH 3/5] x86_64: merge RESTORE_REST into RESTORE_ALL Wei Liu
2016-08-25 17:07   ` Juergen Gross
2016-08-25 16:38 ` [MINIOS PATCH 4/5] x86_64: introduce and use SAVE_ALL Wei Liu
2016-08-25 17:09   ` Juergen Gross
2016-08-25 16:38 ` [MINIOS PATCH 5/5] x86_64: don't unnecessarily export some entries Wei Liu
2016-08-25 17:11   ` Juergen Gross
2016-08-25 17:12 ` [MINIOS PATCH 0/5] x86 assmebly code clean up Juergen Gross
2016-08-25 17:42   ` Wei Liu
2016-08-25 17:25 ` Samuel Thibault
2016-08-25 17:48 ` Wei Liu
2016-08-26  8:13   ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472143108-26331-4-git-send-email-wei.liu2@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=jgross@suse.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=wei.liu1@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.