svn commit: r267921 - head/sys/amd64/vmm

Tycho Nightingale tychon at FreeBSD.org
Thu Jun 26 17:15:42 UTC 2014


Author: tychon
Date: Thu Jun 26 17:15:41 2014
New Revision: 267921
URL: http://svnweb.freebsd.org/changeset/base/267921

Log:
  Add support for emulating the move instruction: "mov r/m8, imm8".
  
  Reviewed by:	neel

Modified:
  head/sys/amd64/vmm/vmm_instruction_emul.c

Modified: head/sys/amd64/vmm/vmm_instruction_emul.c
==============================================================================
--- head/sys/amd64/vmm/vmm_instruction_emul.c	Thu Jun 26 17:10:07 2014	(r267920)
+++ head/sys/amd64/vmm/vmm_instruction_emul.c	Thu Jun 26 17:15:41 2014	(r267921)
@@ -104,6 +104,12 @@ static const struct vie_op one_byte_opco
 		.op_byte = 0x8B,
 		.op_type = VIE_OP_TYPE_MOV,
 	},
+	[0xC6] = {
+		/* XXX Group 11 extended opcode - not just MOV */
+		.op_byte = 0xC6,
+		.op_type = VIE_OP_TYPE_MOV,
+		.op_flags = VIE_OP_F_IMM8,
+	},
 	[0xC7] = {
 		.op_byte = 0xC7,
 		.op_type = VIE_OP_TYPE_MOV,
@@ -310,6 +316,15 @@ emulate_mov(void *vm, int vcpuid, uint64
 			error = vie_update_register(vm, vcpuid, reg, val, size);
 		}
 		break;
+	case 0xC6:
+		/*
+		 * MOV from imm8 to mem (ModRM:r/m)
+		 * C6/0		mov r/m8, imm8
+		 * REX + C6/0	mov r/m8, imm8
+		 */
+		size = 1;
+		error = memwrite(vm, vcpuid, gpa, vie->immediate, size, arg);
+		break;
 	case 0xC7:
 		/*
 		 * MOV from imm32 to mem (ModRM:r/m)


More information about the svn-src-all mailing list