From: Keir Fraser Date: Sat, 30 Apr 2011 08:46:46 +0000 (+0100) Subject: x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10414 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8282a2822b84cdce2f43449e2b9aa7f375d998c1;p=xen.git x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR. We have a macro; we should use it. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 37c9cd7a54..f1d9247cc9 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -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; diff --git a/xen/arch/x86/x86_32/traps.c b/xen/arch/x86/x86_32/traps.c index 90d7b741e0..8ab432efbb 100644 --- a/xen/arch/x86/x86_32/traps.c +++ b/xen/arch/x86/x86_32/traps.c @@ -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 $,%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) diff --git a/xen/arch/x86/x86_64/compat/traps.c b/xen/arch/x86/x86_64/compat/traps.c index de4db5bb4e..8276a5b985 100644 --- a/xen/arch/x86/x86_64/compat/traps.c +++ b/xen/arch/x86/x86_64/compat/traps.c @@ -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 $,%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 */ } /*