X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fgeekos%2Fvmm_emulate.h;h=dcead406a43b41d4f4651bcb25b67fc69e6d17f4;hb=a31286a91d6a84a60b34ee088517ee5d0d2176b0;hp=4b843cc3d132ca2c437f4ab5b1365ecf7bb9f52c;hpb=6b22aca151afafdf17b8f0d8e52e3a4142b9ca03;p=palacios.git diff --git a/palacios/include/geekos/vmm_emulate.h b/palacios/include/geekos/vmm_emulate.h index 4b843cc..dcead40 100644 --- a/palacios/include/geekos/vmm_emulate.h +++ b/palacios/include/geekos/vmm_emulate.h @@ -150,14 +150,14 @@ static inline int is_prefix_byte(char byte) { -static inline addr_t get_rip_linear(struct guest_info * info, addr_t rip, addr_t cs_base) { +static inline addr_t get_addr_linear(struct guest_info * info, addr_t addr, addr_t seg_base) { switch (info->cpu_mode) { case REAL: - return rip + (cs_base << 4); + return addr + (seg_base << 4); break; case PROTECTED: case PROTECTED_PG: - return rip + cs_base; + return addr + seg_base; break; default: return 0;