X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_decoder.h;h=c2686d9df3af2b16bab4f97989f3de33b99a2028;hb=b5380c0aecad02964d5aff23ab51979a063379ce;hp=03c5edbc2898ffbd77069984526b3ed2b7de0fba;hpb=284cd2cc7083fbb37293bf5e2638aeadd366807f;p=palacios.git diff --git a/palacios/include/palacios/vmm_decoder.h b/palacios/include/palacios/vmm_decoder.h index 03c5edb..c2686d9 100644 --- a/palacios/include/palacios/vmm_decoder.h +++ b/palacios/include/palacios/vmm_decoder.h @@ -195,7 +195,7 @@ static inline v3_reg_t get_gpr_mask(struct guest_info * info) { case LONG: return 0xffffffffffffffffLL; default: - PrintError("Unsupported Address Mode\n"); + PrintError(info->vm_info, info, "Unsupported Address Mode\n"); return -1; } } @@ -204,12 +204,10 @@ static inline v3_reg_t get_gpr_mask(struct guest_info * info) { static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, struct v3_segment * seg) { switch (info->cpu_mode) { - case REAL: - // It appears that the segment values are computed and cached in the vmcb structure - // We Need to check this for Intel - /* return addr + (seg->selector << 4); - break;*/ - + case REAL: { + return ((seg->selector & 0xffff) << 4) + (addr & 0xffff); + break; + } case PROTECTED: case PROTECTED_PAE: case LONG_32_COMPAT: @@ -230,7 +228,7 @@ static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, stru } case LONG_16_COMPAT: default: - PrintError("Unsupported CPU Mode: %d\n", info->cpu_mode); + PrintError(info->vm_info, info,"Unsupported CPU Mode: %d\n", info->cpu_mode); return -1; } }