[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] 32-on-64: Small fixes.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1169730315 0
# Node ID 2a9b6b1f848f6aa4f01fbaa5daccf982f75c56d4
# Parent  348c2983ff02d6713536e7e102050a2295a9a837
32-on-64: Small fixes.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/traps.c               |    7 +++++--
 xen/arch/x86/x86_64/compat/entry.S |    4 +++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff -r 348c2983ff02 -r 2a9b6b1f848f xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Jan 25 13:02:03 2007 +0000
+++ b/xen/arch/x86/traps.c      Thu Jan 25 13:05:15 2007 +0000
@@ -1146,7 +1146,9 @@ static int emulate_privileged_op(struct 
         goto fail;
     op_default = op_bytes = (ar & (_SEGMENT_L|_SEGMENT_DB)) ? 4 : 2;
     ad_default = ad_bytes = (ar & _SEGMENT_L) ? 8 : op_default;
-    if ( !(ar & (_SEGMENT_CODE|_SEGMENT_S|_SEGMENT_P)) )
+    if ( !(ar & _SEGMENT_S) ||
+         !(ar & _SEGMENT_P) ||
+         !(ar & _SEGMENT_CODE) )
         goto fail;
 
     /* emulating only opcodes not allowing SS to be default */
@@ -1234,7 +1236,8 @@ static int emulate_privileged_op(struct 
                                   &data_base, &data_limit, &ar,
                                   
_SEGMENT_WR|_SEGMENT_S|_SEGMENT_DPL|_SEGMENT_P) )
                 goto fail;
-            if ( !(ar & (_SEGMENT_S|_SEGMENT_P)) ||
+            if ( !(ar & _SEGMENT_S) ||
+                 !(ar & _SEGMENT_P) ||
                  (opcode & 2 ?
                   (ar & _SEGMENT_CODE) && !(ar & _SEGMENT_WR) :
                   (ar & _SEGMENT_CODE) || !(ar & _SEGMENT_WR)) )
diff -r 348c2983ff02 -r 2a9b6b1f848f xen/arch/x86/x86_64/compat/entry.S
--- a/xen/arch/x86/x86_64/compat/entry.S        Thu Jan 25 13:02:03 2007 +0000
+++ b/xen/arch/x86/x86_64/compat/entry.S        Thu Jan 25 13:05:15 2007 +0000
@@ -24,7 +24,9 @@ ENTRY(compat_hypercall)
         movq  %rsp,%rdi
         movl  $0xDEADBEEF,%eax
         rep   stosq
-        popq  %r9 ; popq  %r8 ; popq  %rcx; popq  %rdx; popq  %rsi; popq  %rdi
+        popq  %r8 ; popq  %r9 ; xchgl %r8d,%r9d /* Args 5&6: zero extend */
+        popq  %rdx; popq  %rcx; xchgl %edx,%ecx /* Args 3&4: zero extend */
+        popq  %rdi; popq  %rsi; xchgl %edi,%esi /* Args 1&2: zero extend */
         movl  UREGS_rax(%rsp),%eax
         pushq %rax
         pushq UREGS_rip+8(%rsp)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.