diff options
author | Sheng Yang <sheng.yang@intel.com> | 2007-12-02 13:18:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-14 09:50:55 -0800 |
commit | 117b22fffff1989cd9e2d90720f05dd438cea2f1 (patch) | |
tree | 8a0581dfa3d5e780e0873ef1082087caca546b07 /drivers/kvm | |
parent | ee6abc255172063680e6663d308810cef0fc7ff3 (diff) |
KVM: x86 emulator: implement 'movnti mem, reg'
patch a012e65aee48379a7a87eadafa74f878b61522b9 in mainline.
Implement emulation of instruction:
movnti m32/m64, r32/r64
opcode: 0x0f 0xc3
Needed to support Linux 2.6.16 as guest (used for mmio).
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 4b8a0cc9665..804e86c57c6 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -198,7 +198,8 @@ static u16 twobyte_table[256] = { 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem16 | ModRM | Mov, /* 0xC0 - 0xCF */ - 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, DstMem | SrcReg | ModRM | Mov, 0, 0, 0, ImplicitOps | ModRM, + 0, 0, 0, 0, 0, 0, 0, 0, /* 0xD0 - 0xDF */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xE0 - 0xEF */ @@ -1324,6 +1325,10 @@ twobyte_insn: dst.bytes = op_bytes; dst.val = (d & ByteOp) ? (s8) src.val : (s16) src.val; break; + case 0xc3: /* movnti */ + dst.bytes = op_bytes; + dst.val = (op_bytes == 4) ? (u32) src.val : (u64) src.val; + break; } goto writeback; |