From 8282a2822b84cdce2f43449e2b9aa7f375d998c1 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sat, 30 Apr 2011 09:46:46 +0100 Subject: [PATCH] x86: Remove direct uses of 0x82 as HYPERCALL_VECTOR. We have a macro; we should use it. Signed-off-by: Keir Fraser --- xen/arch/x86/domain.c | 2 +- xen/arch/x86/x86_32/traps.c | 4 ++-- xen/arch/x86/x86_64/compat/traps.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) 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 */ } /* -- 2.39.5