]> xenbits.xensource.com Git - xen.git/commitdiff
x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR.
authorKeir Fraser <keir@xen.org>
Sat, 30 Apr 2011 08:46:46 +0000 (09:46 +0100)
committerKeir Fraser <keir@xen.org>
Sat, 30 Apr 2011 08:46:46 +0000 (09:46 +0100)
We have a macro; we should use it.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/domain.c
xen/arch/x86/x86_32/traps.c
xen/arch/x86/x86_64/compat/traps.c

index 37c9cd7a5495b6d265d33609f9673198e731f7af..f1d9247cc96a96fb205161b05d7b5da9b53d7800 100644 (file)
@@ -1784,7 +1784,7 @@ unsigned long hypercall_create_continuation(
 
         /* 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;
 
index 90d7b741e00b7badc8533ffd8b3df901a941a9ad..8ab432efbbf2913bd4ea8d271ee9429f376b6ae2 100644 (file)
@@ -597,7 +597,7 @@ static void hypercall_page_initialise_ring1_kernel(void *hypercall_page)
         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 @@ static void hypercall_page_initialise_ring1_kernel(void *hypercall_page)
     *(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)
index de4db5bb4e22544a610fef17664d75c7af3d52a3..8276a5b985e60f08f5fd7b15c2d963af9b9ff0db 100644 (file)
@@ -364,7 +364,7 @@ static void hypercall_page_initialise_ring1_kernel(void *hypercall_page)
         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 @@ static void hypercall_page_initialise_ring1_kernel(void *hypercall_page)
     *(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 */
 }
 
 /*