WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.1-testing] x86/64: Do not clobber %r11 (user rfla

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86/64: Do not clobber %r11 (user rflags) on syscall from guest
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Oct 2007 11:00:21 -0700
Delivery-date: Fri, 19 Oct 2007 11:00:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192611422 -3600
# Node ID c28a2e489db8214d96a2ea8645b8a4dfd39a75f4
# Parent  632552e133534c0294a7ea23b1b83fbe3a8f0b03
x86/64: Do not clobber %r11 (user rflags) on syscall from guest
userspace to guest kernel. The flags are saved on the guest kernel
stack anyway, but some guests rely on %r11 instead.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16110:c918a68617c9d562fb697165ea6ddbe665b92aae
xen-unstable date:        Mon Oct 15 12:13:41 2007 +0100
---
 xen/arch/x86/x86_64/entry.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 632552e13353 -r c28a2e489db8 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       Wed Oct 17 09:56:34 2007 +0100
+++ b/xen/arch/x86/x86_64/entry.S       Wed Oct 17 09:57:02 2007 +0100
@@ -106,7 +106,7 @@ restore_all_xen:
  * When entering SYSCALL from kernel mode:
  *  %rax                            = hypercall vector
  *  %rdi, %rsi, %rdx, %r10, %r8, %9 = hypercall arguments
- *  %r11, %rcx                      = SYSCALL-saved %rflags and %rip
+ *  %rcx                            = SYSCALL-saved %rip
  *  NB. We must move %r10 to %rcx for C function-calling ABI.
  *
  * When entering SYSCALL from user mode:
@@ -125,6 +125,7 @@ ENTRY(syscall_enter)
         pushq %rcx
         pushq $0
         movl  $TRAP_syscall,4(%rsp)
+        movq  24(%rsp),%r11 /* Re-load user RFLAGS into %r11 before SAVE_ALL */
         SAVE_ALL
         GET_CURRENT(%rbx)
         testb $TF_kernel_mode,VCPU_thread_flags(%rbx)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86/64: Do not clobber %r11 (user rflags) on syscall from guest, Xen patchbot-3.1-testing <=