X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_decoder.h;h=03c5edbc2898ffbd77069984526b3ed2b7de0fba;hb=284cd2cc7083fbb37293bf5e2638aeadd366807f;hp=767fe2520e3a24b18a8bf7a355b04f099efa80cd;hpb=4888f0248093a9b0435aef40043677c18f6b7add;p=palacios.releases.git diff --git a/palacios/include/palacios/vmm_decoder.h b/palacios/include/palacios/vmm_decoder.h index 767fe25..03c5edb 100644 --- a/palacios/include/palacios/vmm_decoder.h +++ b/palacios/include/palacios/vmm_decoder.h @@ -216,11 +216,18 @@ static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, stru return addr + seg->base; break; - case LONG: + case LONG: { + uint64_t seg_base = 0; + // In long mode the segment bases are disregarded (forced to 0), unless using // FS or GS, then the base addresses are added - return addr + seg->base; + if (seg) { + seg_base = seg->base; + } + + return addr + seg_base; + } case LONG_16_COMPAT: default: PrintError("Unsupported CPU Mode: %d\n", info->cpu_mode);