X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_v3dec.c;h=343be383701c7bfcce26a6d303141d63da65d043;hb=3c6a3b61c1fbd76c55c63440276d21fa8e79ab16;hp=5f98b9fd6104f57a5e88f692d792c6b5a778c231;hpb=4701d2e8422bc6313ae237578d63d7f1bebd8946;p=palacios-OLD.git diff --git a/palacios/src/palacios/vmm_v3dec.c b/palacios/src/palacios/vmm_v3dec.c index 5f98b9f..343be38 100644 --- a/palacios/src/palacios/vmm_v3dec.c +++ b/palacios/src/palacios/vmm_v3dec.c @@ -122,6 +122,7 @@ int v3_decode(struct guest_info * core, addr_t instr_ptr, struct x86_instr * ins instr->instr_length += length; #ifdef V3_CONFIG_DEBUG_DECODER + V3_Print("Decoding Instr at %p\n", (void *)core->rip); v3_print_instr(instr); V3_Print("CS DB FLag=%x\n", core->segments.cs.db); #endif @@ -351,7 +352,7 @@ static int parse_operands(struct guest_info * core, uint8_t * instr_ptr, instr->is_str_op = 1; if (instr->prefixes.rep == 1) { - instr->str_op_length = MASK(core->vm_regs.rcx, operand_width); + instr->str_op_length = MASK(core->vm_regs.rcx, addr_width); } else { instr->str_op_length = 1; } @@ -427,7 +428,7 @@ static int parse_operands(struct guest_info * core, uint8_t * instr_ptr, instr->is_str_op = 1; if (instr->prefixes.rep == 1) { - instr->str_op_length = MASK(core->vm_regs.rcx, operand_width); + instr->str_op_length = MASK(core->vm_regs.rcx, addr_width); } else { instr->str_op_length = 1; } @@ -447,6 +448,15 @@ static int parse_operands(struct guest_info * core, uint8_t * instr_ptr, break; } + case INT: { + instr->dst_operand.type = IMM_OPERAND; + instr->dst_operand.size = operand_width; + instr->dst_operand.operand = *(uint8_t *)instr_ptr; + instr_ptr += operand_width; + instr->num_operands = 1; + + break; + } case INVLPG: { uint8_t reg_code = 0; @@ -504,7 +514,7 @@ static v3_op_type_t op_form_to_type(op_form_t form) { case INVLPG: return V3_OP_INVLPG; - case INT: + case INT: return V3_OP_INT; case MOV_CR2: