From patchwork Sun Apr 12 07:26:27 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 17782 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 n3C7R2NI023604 for ; Sun, 12 Apr 2009 07:27:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760006AbZDLH0a (ORCPT ); Sun, 12 Apr 2009 03:26:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759998AbZDLH0a (ORCPT ); Sun, 12 Apr 2009 03:26:30 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34858 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759981AbZDLH03 (ORCPT ); Sun, 12 Apr 2009 03:26:29 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3C7QTpc024471 for ; Sun, 12 Apr 2009 03:26:29 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3C7QU00010872; Sun, 12 Apr 2009 03:26:30 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3C7QSYk022561; Sun, 12 Apr 2009 03:26:28 -0400 Received: from trex.usersys.redhat.com (localhost [127.0.0.1]) by dhcp-1-237.tlv.redhat.com (Postfix) with ESMTP id D56A218D41C; Sun, 12 Apr 2009 10:26:27 +0300 (IDT) From: Gleb Natapov Subject: [PATCH v2 07/10] Completely decode in/out at decoding stage. To: avi@redhat.com Cc: kvm@vger.kernel.org Date: Sun, 12 Apr 2009 10:26:27 +0300 Message-ID: <20090412072627.5828.47958.stgit@trex.usersys.redhat.com> In-Reply-To: <20090412072555.5828.46351.stgit@trex.usersys.redhat.com> References: <20090412072555.5828.46351.stgit@trex.usersys.redhat.com> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Gleb Natapov --- arch/x86/kvm/x86_emulate.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 5a58344..4ebc628 100644 --- a/arch/x86/kvm/x86_emulate.c +++ b/arch/x86/kvm/x86_emulate.c @@ -194,8 +194,10 @@ static u32 opcode_table[256] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 - 0xE7 */ 0, 0, 0, 0, - SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, - SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps, + SrcNone | ByteOp | SrcImmUByte | ImplicitOps, + SrcNone | SrcImmUByte | ImplicitOps, + SrcNone | ByteOp | SrcImmUByte | ImplicitOps, + SrcNone | SrcImmUByte | ImplicitOps, /* 0xE8 - 0xEF */ SrcImm | ImplicitOps | Stack, SrcImm | ImplicitOps, SrcImm | Src2Imm16 | ImplicitOps, SrcImmByte | ImplicitOps, @@ -1785,12 +1787,12 @@ special_insn: break; case 0xe4: /* inb */ case 0xe5: /* in */ - port = insn_fetch(u8, 1, c->eip); + port = c->src.val; io_dir_in = 1; goto do_io; case 0xe6: /* outb */ case 0xe7: /* out */ - port = insn_fetch(u8, 1, c->eip); + port = c->src.val; io_dir_in = 0; goto do_io; case 0xe8: /* call (near) */ {