Sadly, a lone: (XEN) emulate.c:156:d2v0 svm_get_insn_len: Mismatch between expected and actual instruction: eip = fffff804564139c0
on the console is of no use trying to identify what went wrong. Dump as much state as we can to help identify what went wrong. Reported-by: Paul Durrant <[email protected]> Signed-off-by: Andrew Cooper <[email protected]> Acked-by: Brian Woods <[email protected]> --- CC: Jan Beulich <[email protected]> CC: Wei Liu <[email protected]> CC: Roger Pau Monné <[email protected]> CC: Paul Durrant <[email protected]> CC: Boris Ostrovsky <[email protected]> CC: Suravee Suthikulpanit <[email protected]> CC: Brian Woods <[email protected]> v2: * Drop anonymous union * Rebase --- xen/arch/x86/hvm/svm/emulate.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/emulate.c b/xen/arch/x86/hvm/svm/emulate.c index 3f695b9..73cef5b 100644 --- a/xen/arch/x86/hvm/svm/emulate.c +++ b/xen/arch/x86/hvm/svm/emulate.c @@ -143,8 +143,17 @@ int svm_get_insn_len(struct vcpu *v, enum instruction_index insn) } gdprintk(XENLOG_WARNING, - "%s: Mismatch between expected and actual instruction: " - "eip = %lx\n", __func__, (unsigned long)vmcb->rip); + "%s: Mismatch between expected and actual instruction:\n", + __func__); + gdprintk(XENLOG_WARNING, + " insn_index %d, opcode %#x modrm %#x\n", + insn, opc_tab[insn].opcode, ((opc_tab[insn].modrm.rm << 6) | + (opc_tab[insn].modrm.reg << 3) | + (opc_tab[insn].modrm.mod))); + gdprintk(XENLOG_WARNING, " rip %#lx, nextrip %#lx, len %lu\n", + vmcb->rip, vmcb->nextrip, vmcb->nextrip - vmcb->rip); + hvm_dump_emulation_state(XENLOG_G_WARNING, "SVM Insn len", + &ctxt, X86EMUL_UNHANDLEABLE); out: hvm_inject_hw_exception(TRAP_gp_fault, 0); -- 2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
