X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_xed.c;h=5b0d10524c7cfc6a8ddc4588b3a0b5cf535fac00;hb=6fa12b728fed57e76c4a4df5c87d989915c7d6c2;hp=9535eabc2b779237335cc715c0c0ffe2fc1fe016;hpb=bb63612fb642f9f05863ad3895df073eb22552e7;p=palacios.releases.git diff --git a/palacios/src/palacios/vmm_xed.c b/palacios/src/palacios/vmm_xed.c index 9535eab..5b0d105 100644 --- a/palacios/src/palacios/vmm_xed.c +++ b/palacios/src/palacios/vmm_xed.c @@ -93,6 +93,7 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins PrintDebug("Number of operands: %d\n", instr->num_operands); + PrintDebug("INSTR length: %d\n", instr->instr_length); // set first operand if (instr->num_operands >= 1) { @@ -114,7 +115,7 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins } instr->first_operand.type = REG_OPERAND; - PrintDebug("xed_reg=0x%x, cr0=0x%x\n", instr->first_operand.operand, &(info->ctrl_regs.cr0)); + PrintDebug("First Operand: xed_reg=0x%x\n", instr->first_operand.operand); } else { PrintError("Unhandled first operand type %s\n", xed_operand_type_enum_t2str(op_type)); @@ -141,8 +142,8 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins } instr->second_operand.type = REG_OPERAND; - PrintDebug("xed_reg=0x%x, eax=0x%x\n", instr->second_operand.operand, &(info->vm_regs.rax)); - + + PrintDebug("Second Operand: xed_reg=0x%x\n", instr->second_operand.operand); } else { PrintError("Unhandled second operand type %s\n", xed_operand_type_enum_t2str(op_type)); return -1; @@ -167,6 +168,8 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins return -1; } instr->third_operand.type = REG_OPERAND; + + PrintDebug("Third Operand: xed_reg=0x%x\n", instr->third_operand.operand); } else { PrintError("Unhandled third operand type %s\n", xed_operand_type_enum_t2str(op_type)); return -1; @@ -640,6 +643,15 @@ static int get_opcode(xed_iform_enum_t iform, addr_t * opcode) { *opcode = (addr_t)&V3_OPCODE_MOV2CR; break; + + case XED_IFORM_LMSW_GPR16: + *opcode = (addr_t)&V3_OPCODE_LMSW; + break; + + case XED_IFORM_CLTS: + *opcode = (addr_t)&V3_OPCODE_CLTS; + break; + default: *opcode = 0; return -1;