From: Jack Lange Date: Mon, 11 Apr 2011 23:25:11 +0000 (-0500) Subject: bug fixes X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=25e188e5eb5f6e0368b206b79b9f275d050367d9;p=palacios.git bug fixes --- diff --git a/palacios/include/palacios/vmm_decoder.h b/palacios/include/palacios/vmm_decoder.h index 3631e14..145de82 100644 --- a/palacios/include/palacios/vmm_decoder.h +++ b/palacios/include/palacios/vmm_decoder.h @@ -45,7 +45,7 @@ struct x86_operand { v3_operand_type_t type; uint8_t read : 1; uint8_t write : 1; -}; +} __attribute__((packed)); struct x86_prefixes { uint_t lock : 1; // 0xF0 diff --git a/palacios/src/palacios/vmm_v3dec.c b/palacios/src/palacios/vmm_v3dec.c index ac9eb69..2547087 100644 --- a/palacios/src/palacios/vmm_v3dec.c +++ b/palacios/src/palacios/vmm_v3dec.c @@ -195,17 +195,13 @@ static int parse_operands(struct guest_info * core, uint8_t * instr_ptr, case SUB_2MEM_8: case XOR_2MEM_8: case MOV_2MEM_8: - case MOVSX_8: - case MOVZX_8: case ADC_2MEM: case ADD_2MEM: case AND_2MEM: case OR_2MEM: case SUB_2MEM: case XOR_2MEM: - case MOV_2MEM: - case MOVSX: - case MOVZX: { + case MOV_2MEM: { uint8_t reg_code = 0; ret = decode_rm_operand(core, instr_ptr, form, instr, &(instr->dst_operand), ®_code); @@ -236,13 +232,17 @@ static int parse_operands(struct guest_info * core, uint8_t * instr_ptr, case SUB_MEM2_8: case XOR_MEM2_8: case MOV_MEM2_8: + case MOVSX_8: + case MOVZX_8: case ADC_MEM2: case ADD_MEM2: case AND_MEM2: case OR_MEM2: case SUB_MEM2: case XOR_MEM2: - case MOV_MEM2: { + case MOV_MEM2: + case MOVSX: + case MOVZX: { uint8_t reg_code = 0; ret = decode_rm_operand(core, instr_ptr, form, instr, &(instr->src_operand), ®_code);