[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] vmx: Allow software (user defined) interrupts to be injected in to the guest
# HG changeset patch # User Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx> # Date 1334911426 -3600 # Node ID cf2de273869f06e907fb28127682284e8670b1cc # Parent aae8c2372a56262267c37e9ba538091c1f8f753f vmx: Allow software (user defined) interrupts to be injected in to the guest If xc_hvm_inject_trap() is called on a software (user defined) interrupt, it causes the guest to crash with a vmentry failure. The following patch fixes this issue. Signed-off-by: Aravindh Puthiyaparambil <aravindh@xxxxxxxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r aae8c2372a56 -r cf2de273869f xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Fri Apr 20 09:33:35 2012 +0100 +++ b/xen/arch/x86/hvm/vmx/vmx.c Fri Apr 20 09:43:46 2012 +0100 @@ -1364,6 +1364,8 @@ void vmx_inject_hw_exception(int trap, i } if ( cpu_has_monitor_trap_flag ) break; + /* fall through */ + case TRAP_int3: if ( curr->domain->debugger_attached ) { @@ -1374,6 +1376,15 @@ void vmx_inject_hw_exception(int trap, i type = X86_EVENTTYPE_SW_EXCEPTION; __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 1); /* int3 */ + break; + + default: + if ( trap > TRAP_last_reserved ) + { + type = X86_EVENTTYPE_SW_EXCEPTION; + __vmwrite(VM_ENTRY_INSTRUCTION_LEN, 2); /* int imm8 */ + } + break; } if ( unlikely(intr_info & INTR_INFO_VALID_MASK) && diff -r aae8c2372a56 -r cf2de273869f xen/include/asm-x86/processor.h --- a/xen/include/asm-x86/processor.h Fri Apr 20 09:33:35 2012 +0100 +++ b/xen/include/asm-x86/processor.h Fri Apr 20 09:43:46 2012 +0100 @@ -111,6 +111,7 @@ #define TRAP_alignment_check 17 #define TRAP_machine_check 18 #define TRAP_simd_error 19 +#define TRAP_last_reserved 31 /* Set for entry via SYSCALL. Informs return code to use SYSRETQ not IRETQ. */ /* NB. Same as VGCF_in_syscall. No bits in common with any other TRAP_ defn. */ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |