Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a012e65a authored by Sheng Yang's avatar Sheng Yang Committed by Avi Kivity
Browse files

KVM: x86 emulator: implement 'movnti mem, reg'



Implement emulation of instruction:
    movnti m32/m64, r32/r64
    opcode: 0x0f 0xc3

Signed-off-by: default avatarSheng Yang <sheng.yang@intel.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent 8668a3c4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -212,7 +212,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 */
@@ -1501,6 +1502,10 @@ x86_emulate_memop(struct x86_emulate_ctxt *ctxt, struct x86_emulate_ops *ops)
		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;