ia64/xen-unstable
changeset 9672:4d4b41264b84
The maximum instruction length for both x86-32 and
x86-64 is 15 bytes (including all prefixes, opcode,
ModRM, SIB, displacement, and immediate bytes).
This patch adjusts the MAX_INST_LEN to the correct
value. This should reduce the size of some variables
in the hypervisor code. This patch also does some
minor code clean-up in the vm exit handler for VMX.
Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
x86-64 is 15 bytes (including all prefixes, opcode,
ModRM, SIB, displacement, and immediate bytes).
This patch adjusts the MAX_INST_LEN to the correct
value. This should reduce the size of some variables
in the hypervisor code. This patch also does some
minor code clean-up in the vm exit handler for VMX.
Signed-off-by: Khoa Huynh <khoa@us.ibm.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Tue Apr 11 10:44:07 2006 +0100 (2006-04-11) |
parents | 768b0f6696fd |
children | edefe24d78bd |
files | xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/io.h |
line diff
1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c Tue Apr 11 10:41:08 2006 +0100 1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c Tue Apr 11 10:44:07 2006 +0100 1.3 @@ -1947,7 +1947,7 @@ static inline void vmx_vmexit_do_extint( 1.4 && !(vector & INTR_INFO_VALID_MASK)) 1.5 __hvm_bug(regs); 1.6 1.7 - vector &= 0xff; 1.8 + vector &= INTR_INFO_VECTOR_MASK; 1.9 local_irq_disable(); 1.10 TRACE_VMEXIT(1,vector); 1.11 1.12 @@ -2077,10 +2077,8 @@ asmlinkage void vmx_vmexit_handler(struc 1.13 return; 1.14 } 1.15 1.16 - { 1.17 - __vmread(GUEST_RIP, &eip); 1.18 - TRACE_VMEXIT(0,exit_reason); 1.19 - } 1.20 + __vmread(GUEST_RIP, &eip); 1.21 + TRACE_VMEXIT(0,exit_reason); 1.22 1.23 switch (exit_reason) { 1.24 case EXIT_REASON_EXCEPTION_NMI: 1.25 @@ -2097,7 +2095,7 @@ asmlinkage void vmx_vmexit_handler(struc 1.26 if ((error = __vmread(VM_EXIT_INTR_INFO, &vector)) 1.27 || !(vector & INTR_INFO_VALID_MASK)) 1.28 __hvm_bug(®s); 1.29 - vector &= 0xff; 1.30 + vector &= INTR_INFO_VECTOR_MASK; 1.31 1.32 TRACE_VMEXIT(1,vector); 1.33 perfc_incra(cause_vector, vector);
2.1 --- a/xen/include/asm-x86/hvm/io.h Tue Apr 11 10:41:08 2006 +0100 2.2 +++ b/xen/include/asm-x86/hvm/io.h Tue Apr 11 10:44:07 2006 +0100 2.3 @@ -77,7 +77,7 @@ struct instruction { 2.4 __u32 flags; 2.5 }; 2.6 2.7 -#define MAX_INST_LEN 32 2.8 +#define MAX_INST_LEN 15 /* Maximum instruction length = 15 bytes */ 2.9 2.10 struct mmio_op { 2.11 int flags;