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-unstable] x86/64: Do not clobber %r11 (user rflags)

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86/64: Do not clobber %r11 (user rflags) on syscall from guest
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Oct 2007 11:40:09 -0700
Delivery-date: Mon, 15 Oct 2007 11:40:29 -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 1192446821 -3600
# Node ID c918a68617c9d562fb697165ea6ddbe665b92aae
# Parent  415beae13d068ab9a3643eb0e0b95cedee3b3380
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/arch/x86/x86_64/entry.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 415beae13d06 -r c918a68617c9 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       Mon Oct 15 09:28:14 2007 +0100
+++ b/xen/arch/x86/x86_64/entry.S       Mon Oct 15 12:13:41 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-unstable] x86/64: Do not clobber %r11 (user rflags) on syscall from guest, Xen patchbot-unstable <=