]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
KVM: x86 emulator: Completely decode in/out at decoding stage
authorGleb Natapov <gleb@redhat.com>
Sun, 12 Apr 2009 10:36:46 +0000 (13:36 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:41 +0000 (11:48 +0300)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86_emulate.c

index 0988a13063dc9a8f6e0630da8a702a3c998a0c2e..c2f55ca84fdf114e7b1cec25b4e52bdf4f48bd8b 100644 (file)
@@ -190,8 +190,8 @@ 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,
+       ByteOp | SrcImmUByte, SrcImmUByte,
+       ByteOp | SrcImmUByte, SrcImmUByte,
        /* 0xE8 - 0xEF */
        SrcImm | Stack, SrcImm | ImplicitOps,
        SrcImm | Src2Imm16, SrcImmByte | ImplicitOps,
@@ -1777,12 +1777,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) */ {