# 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
|