X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_xed.c;h=350840b153753cb8ed5fe4f00f1ac517aa084b52;hb=b8fb74a295ebc2697876ac81f2b00628503a3822;hp=80fbfdee1dbe4a74b4db889d962d4b935c397553;hpb=f08319bfe39e47f1d2e003b48087affa7190c997;p=palacios.releases.git diff --git a/palacios/src/palacios/vmm_xed.c b/palacios/src/palacios/vmm_xed.c index 80fbfde..350840b 100644 --- a/palacios/src/palacios/vmm_xed.c +++ b/palacios/src/palacios/vmm_xed.c @@ -35,7 +35,7 @@ -#ifndef CONFIG_DEBUG_DECODER +#ifndef V3_CONFIG_DEBUG_DECODER #undef PrintDebug #define PrintDebug(fmt, args...) #endif @@ -167,6 +167,12 @@ int v3_init_decoder(struct guest_info * info) { } xed_state_t * decoder_state = (xed_state_t *)V3_Malloc(sizeof(xed_state_t)); + + if (!decoder_state) { + PrintError("Cannot allocate in initializing decoder\n"); + return -1; + } + xed_state_zero(decoder_state); xed_state_init(decoder_state, XED_MACHINE_MODE_LEGACY_32, @@ -342,7 +348,7 @@ int v3_decode(struct guest_info * info, addr_t instr_ptr, struct x86_instr * ins xed_iform_enum_t iform = xed_decoded_inst_get_iform_enum(&xed_instr); -#ifdef CONFIG_DEBUG_DECODER +#ifdef V3_CONFIG_DEBUG_DECODER xed_iclass_enum_t iclass = xed_decoded_inst_get_iclass(&xed_instr); PrintDebug("iform=%s, iclass=%s\n", xed_iform_enum_t2str(iform), xed_iclass_enum_t2str(iclass)); @@ -1283,7 +1289,6 @@ static v3_op_type_t get_opcode(xed_iform_enum_t iform) { case XED_IFORM_INVLPG_MEMb: return V3_OP_INVLPG; - // KCH case XED_IFORM_INT_IMM: return V3_OP_INT;