From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2] KVM: x86 emulator: emulate RETF imm Date: Thu, 12 Sep 2013 18:33:31 +0200 Message-ID: <5231ECDB.3070808@redhat.com> References: <1378741220-20860-1-git-send-email-brogers@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: gleb@redhat.com, kvm@vger.kernel.org To: Bruce Rogers Return-path: Received: from mail-qc0-f182.google.com ([209.85.216.182]:39110 "EHLO mail-qc0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754614Ab3ILQdY (ORCPT ); Thu, 12 Sep 2013 12:33:24 -0400 Received: by mail-qc0-f182.google.com with SMTP id n4so28137qcx.27 for ; Thu, 12 Sep 2013 09:33:23 -0700 (PDT) In-Reply-To: <1378741220-20860-1-git-send-email-brogers@suse.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 09/09/2013 17:40, Bruce Rogers ha scritto: > Opcode CA > > This gets used by a DOS based NetWare guest. > > Signed-off-by: Bruce Rogers > --- > arch/x86/kvm/emulate.c | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index 2bc1e81..ddc3f3d 100644 > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -2025,6 +2025,17 @@ 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; > + > + rc = em_ret_far(ctxt); > + if (rc != X86EMUL_CONTINUE) > + return rc; > + rsp_increment(ctxt, ctxt->src.val); > + return X86EMUL_CONTINUE; > +} > + > static int em_cmpxchg(struct x86_emulate_ctxt *ctxt) > { > /* Save real source value, then compare EAX against destination. */ > @@ -3763,7 +3774,8 @@ static const struct opcode opcode_table[256] = { > G(ByteOp, group11), G(0, group11), > /* 0xC8 - 0xCF */ > I(Stack | SrcImmU16 | Src2ImmByte, em_enter), I(Stack, em_leave), > - N, I(ImplicitOps | Stack, em_ret_far), > + I(ImplicitOps | Stack | SrcImmU16, em_ret_far_imm), > + I(ImplicitOps | Stack, em_ret_far), > D(ImplicitOps), DI(SrcImmByte, intn), > D(ImplicitOps | No64), II(ImplicitOps, em_iret, iret), > /* 0xD0 - 0xD7 */ > Applied to kvm/queue for 3.12, thanks.