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

[Xen-changelog] [xen-unstable] x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1304153206 -3600
# Node ID 6876c66a1ce19184266c39142dcf11bc1a1e650b
# Parent  2f08c89b767db217725f91e3caf86b5c4f9e4229
x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR.

We have a macro; we should use it.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 2f08c89b767d -r 6876c66a1ce1 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Wed Apr 20 17:13:08 2011 +0100
+++ b/xen/arch/x86/domain.c     Sat Apr 30 09:46:46 2011 +0100
@@ -1784,7 +1784,7 @@
 
         /* Ensure the hypercall trap instruction is re-executed. */
         if ( !is_hvm_vcpu(current) )
-            regs->eip -= 2;  /* re-execute 'syscall' / 'int 0x82' */
+            regs->eip -= 2;  /* re-execute 'syscall' / 'int $xx' */
         else
             current->arch.hvm_vcpu.hcall_preempted = 1;
 
diff -r 2f08c89b767d -r 6876c66a1ce1 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Wed Apr 20 17:13:08 2011 +0100
+++ b/xen/arch/x86/x86_32/traps.c       Sat Apr 30 09:46:46 2011 +0100
@@ -597,7 +597,7 @@
         p = (char *)(hypercall_page + (i * 32));
         *(u8  *)(p+ 0) = 0xb8;    /* mov  $<i>,%eax */
         *(u32 *)(p+ 1) = i;
-        *(u16 *)(p+ 5) = 0x82cd;  /* int  $0x82 */
+        *(u16 *)(p+ 5) = (HYPERCALL_VECTOR << 8) | 0xcd; /* int  $xx */
         *(u8  *)(p+ 7) = 0xc3;    /* ret */
     }
 
@@ -610,7 +610,7 @@
     *(u8  *)(p+ 0) = 0x50;    /* push %eax */
     *(u8  *)(p+ 1) = 0xb8;    /* mov  $__HYPERVISOR_iret,%eax */
     *(u32 *)(p+ 2) = __HYPERVISOR_iret;
-    *(u16 *)(p+ 6) = 0x82cd;  /* int  $0x82 */
+    *(u16 *)(p+ 6) = (HYPERCALL_VECTOR << 8) | 0xcd; /* int  $xx */
 }
 
 void hypercall_page_initialise(struct domain *d, void *hypercall_page)
diff -r 2f08c89b767d -r 6876c66a1ce1 xen/arch/x86/x86_64/compat/traps.c
--- a/xen/arch/x86/x86_64/compat/traps.c        Wed Apr 20 17:13:08 2011 +0100
+++ b/xen/arch/x86/x86_64/compat/traps.c        Sat Apr 30 09:46:46 2011 +0100
@@ -364,7 +364,7 @@
         p = (char *)(hypercall_page + (i * 32));
         *(u8  *)(p+ 0) = 0xb8;    /* mov  $<i>,%eax */
         *(u32 *)(p+ 1) = i;
-        *(u16 *)(p+ 5) = 0x82cd;  /* int  $0x82 */
+        *(u16 *)(p+ 5) = (HYPERCALL_VECTOR << 8) | 0xcd; /* int  $xx */
         *(u8  *)(p+ 7) = 0xc3;    /* ret */
     }
 
@@ -377,7 +377,7 @@
     *(u8  *)(p+ 0) = 0x50;    /* push %eax */
     *(u8  *)(p+ 1) = 0xb8;    /* mov  $__HYPERVISOR_iret,%eax */
     *(u32 *)(p+ 2) = __HYPERVISOR_iret;
-    *(u16 *)(p+ 6) = 0x82cd;  /* int  $0x82 */
+    *(u16 *)(p+ 6) = (HYPERCALL_VECTOR << 8) | 0xcd; /* int  $xx */
 }
 
 /*

_______________________________________________
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®.