On Tue, Sep 03, 2013 at 01:42:09PM -0600, Bruce Rogers wrote: > Opcode CA > > This gets used by a DOS based NetWare guest. > > Signed-off-by: Bruce Rogers <brogers@xxxxxxxx> > --- > arch/x86/kvm/emulate.c | 23 ++++++++++++++++++++++- > 1 files changed, 22 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index 2bc1e81..aee238a 100644 > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -2025,6 +2025,26 @@ static int em_ret_far(struct x86_emulate_ctxt *ctxt) > return rc; > } > > +static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) > +{ > + int rc; > + unsigned long cs; > + > + rc = emulate_pop(ctxt, &ctxt->_eip, ctxt->op_bytes); > + if (rc != X86EMUL_CONTINUE) > + return rc; > + if (ctxt->op_bytes == 4) > + ctxt->_eip = (u32)ctxt->_eip; > + rc = emulate_pop(ctxt, &cs, ctxt->op_bytes); > + if (rc != X86EMUL_CONTINUE) > + return rc; > + rc = load_segment_descriptor(ctxt, (u16)cs, VCPU_SREG_CS); > + if (rc != X86EMUL_CONTINUE) > + return rc; > + rsp_increment(ctxt, ctxt->src.val); > + return X86EMUL_CONTINUE; > +} > + Why not: static int em_ret_far_imm(struct x86_emulate_ctxt *ctxt) { int rc; rc = em_ret_far(struct x86_emulate_ctxt *ctxt); if (rc != X86EMUL_CONTINUE) return rc; rsp_increment(ctxt, ctxt->src.val); return X86EMUL_CONTINUE; } -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html