Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jun 2014 17:15:42 +0000 (UTC)
From:      Tycho Nightingale <tychon@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267921 - head/sys/amd64/vmm
Message-ID:  <201406261715.s5QHFgxE003750@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406261715.s5QHFgxE003750>