diff mbox

[v2,07/10] Completely decode in/out at decoding stage.

Message ID 20090412072627.5828.47958.stgit@trex.usersys.redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Gleb Natapov April 12, 2009, 7:26 a.m. UTC
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---

 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 mbox

Patch

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) */ {