From patchwork Wed Feb 25 21:39:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mohammed Gamal X-Patchwork-Id: 8847 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1PLlOb7024327 for ; Wed, 25 Feb 2009 21:47:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753889AbZBYVrW (ORCPT ); Wed, 25 Feb 2009 16:47:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758075AbZBYVrW (ORCPT ); Wed, 25 Feb 2009 16:47:22 -0500 Received: from ey-out-2122.google.com ([74.125.78.24]:53263 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753889AbZBYVrV (ORCPT ); Wed, 25 Feb 2009 16:47:21 -0500 Received: by ey-out-2122.google.com with SMTP id 25so92955eya.37 for ; Wed, 25 Feb 2009 13:47:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:mime-version:content-type:content-disposition :user-agent; bh=Wz5pMhWMArc9EUHXJ/nQR93WesoyKGxkbGtWSJ5kr/Q=; b=eXBnOWJi4CqJTHjRECBwTf1qLxAaH/zu0BHZquVtTGGsRGZC77uWXDL1TXf4L4wyeO 8VmBeWxvqknqbfiC3V1s2KdmIGAqVlYYuQtBovhOeJKxodLkcBMTnLW3upFD7jNp3GIt xyCyv/THefyl9qhQVBLlQgJe+6kRE2gL97jek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=FUbM3T0qmDJCLw26LYBCFc3ReYh5B/f77QCS3oDOmMaJYP0xW3xkePdxNmTQCAt9y0 wB1BemzcBole+fzJijZWZsjfUWLJ2uXnRSdfNpyQiDi79eslORGWJmfqKd73EcvWlfCu ivQdv3KYlSAGx5+4kWSW4mK0Z3hK+LrPjf1fA= Received: by 10.210.59.3 with SMTP id h3mr409744eba.44.1235597975824; Wed, 25 Feb 2009 13:39:35 -0800 (PST) Received: from mohd-laptop ([41.232.112.232]) by mx.google.com with ESMTPS id 28sm473229eye.39.2009.02.25.13.39.32 (version=SSLv3 cipher=RC4-MD5); Wed, 25 Feb 2009 13:39:34 -0800 (PST) Received: by mohd-laptop (sSMTP sendmail emulation); Wed, 25 Feb 2009 23:39:29 +0200 From: Mohammed Gamal Date: Wed, 25 Feb 2009 23:39:29 +0200 To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH] x86 emulator: Add pop es instruction (opcode 0x07) Message-ID: <20090225213929.GA22725@mohd-laptop> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Add pop es instruction Signed-off-by: Mohammed Gamal --- arch/x86/kvm/x86_emulate.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ca91749..8c292b6 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -87,7 +87,7 @@ static u32 opcode_table[256] = { /* 0x00 - 0x07 */ ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM, - ByteOp | DstAcc | SrcImm, DstAcc | SrcImm, 0, 0, + ByteOp | DstAcc | SrcImm, DstAcc | SrcImm, 0, DstReg | ModRM, /* 0x08 - 0x0F */ ByteOp | DstMem | SrcReg | ModRM, DstMem | SrcReg | ModRM, ByteOp | DstReg | SrcMem | ModRM, DstReg | SrcMem | ModRM, @@ -1446,6 +1446,9 @@ special_insn: add: /* add */ emulate_2op_SrcV("add", c->src, c->dst, ctxt->eflags); break; + case 0x07: /* pop es */ + emulate_pop(ctxt, ops, &c->regs[VCPU_SREG_ES], c->op_bytes); + break; case 0x08 ... 0x0d: or: /* or */ emulate_2op_SrcV("or", c->src, c->dst, ctxt->eflags);