From owner-svn-src-all@FreeBSD.ORG Thu Jun 26 17:15:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77C89930; Thu, 26 Jun 2014 17:15:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64AD22360; Thu, 26 Jun 2014 17:15:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QHFgrx003751; Thu, 26 Jun 2014 17:15:42 GMT (envelope-from tychon@svn.freebsd.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QHFgxE003750; Thu, 26 Jun 2014 17:15:42 GMT (envelope-from tychon@svn.freebsd.org) Message-Id: <201406261715.s5QHFgxE003750@svn.freebsd.org> From: Tycho Nightingale Date: Thu, 26 Jun 2014 17:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267921 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 17:15:42 -0000 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)