X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_decoder.h;fp=palacios%2Finclude%2Fpalacios%2Fvmm_decoder.h;h=c9636d399f3448a1d8dabf66a8f460e2e46141c9;hb=7ee817d2495b48dc882df66ded9e8ebf2c4803d9;hp=6b8715e85f590db3060c4f44f1f71077977ce5ba;hpb=66a1a4c7a9edcd7d8bc207aca093d694a6e6b5b2;p=palacios-OLD.git diff --git a/palacios/include/palacios/vmm_decoder.h b/palacios/include/palacios/vmm_decoder.h index 6b8715e..c9636d3 100644 --- a/palacios/include/palacios/vmm_decoder.h +++ b/palacios/include/palacios/vmm_decoder.h @@ -242,9 +242,12 @@ static inline v3_reg_t get_gpr_mask(struct guest_info * info) { break; case PROTECTED: return 0xffffffff; + case LONG: + case LONG_32_COMPAT: + case LONG_16_COMPAT: default: - V3_ASSERT(0); - return 0; + PrintError("Unsupported Address Mode\n"); + return -1; } } @@ -260,9 +263,16 @@ static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, stru case PROTECTED: return addr + seg->base; break; + + case LONG: + // 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; + case LONG_32_COMPAT: + case LONG_16_COMPAT: default: - V3_ASSERT(0); - return 0; + PrintError("Unsupported Address Mode\n"); + return -1; } }