diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index fc667cea2b..2e4fa6c323 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1229,17 +1229,14 @@ static void svm_inject_trap(struct hvm_trap *trap) { case X86_EVENTTYPE_SW_INTERRUPT: /* int $n */ /* - * Injection type 4 (software interrupt) is only supported with - * NextRIP support. Without NextRIP, the emulator will have performed - * DPL and presence checks for us. + * Software interrupts (type 4) cannot be properly injected if the + * processor doesn't support NextRIP. Without NextRIP, the emulator + * will have performed DPL and presence checks for us, and will have + * moved eip forward if appropriate. */ if ( cpu_has_svm_nrips ) - { vmcb->nextrip = regs->eip + _trap.insn_len; - event.fields.type = X86_EVENTTYPE_SW_INTERRUPT; - } - else - event.fields.type = X86_EVENTTYPE_HW_EXCEPTION; + event.fields.type = X86_EVENTTYPE_SW_INTERRUPT; break; case X86_EVENTTYPE_PRI_SW_EXCEPTION: /* icebp */ diff --git a/xen/arch/x86/hvm/svm/svmdebug.c b/xen/arch/x86/hvm/svm/svmdebug.c index ded5d190b1..f93dfedc39 100644 --- a/xen/arch/x86/hvm/svm/svmdebug.c +++ b/xen/arch/x86/hvm/svm/svmdebug.c @@ -48,6 +48,10 @@ void svm_vmcb_dump(const char *from, struct vmcb_struct *vmcb) vmcb->tlb_control, (unsigned long long)vmcb->_vintr.bytes, (unsigned long long)vmcb->interrupt_shadow); + printk("eventinj %016"PRIx64", valid? %d, ec? %d, type %u, vector %#x\n", + vmcb->eventinj.bytes, vmcb->eventinj.fields.v, + vmcb->eventinj.fields.ev, vmcb->eventinj.fields.type, + vmcb->eventinj.fields.vector); printk("exitcode = %#Lx exitintinfo = %#Lx\n", (unsigned long long)vmcb->exitcode, (unsigned long long)vmcb->exitintinfo.bytes);