X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvm_guest_mem.c;h=2cc4385aaf273400b936fc7114e9337bf3c15c5d;hb=a0c519f730b179ea90b3f3ac861133906b4f8645;hp=32d4ab65d2f5d745c008ad394742901f47bba655;hpb=8c767ddb04d3ac42d080d9f9f5f40196d6f8f217;p=palacios.git diff --git a/palacios/src/palacios/vm_guest_mem.c b/palacios/src/palacios/vm_guest_mem.c index 32d4ab6..2cc4385 100644 --- a/palacios/src/palacios/vm_guest_mem.c +++ b/palacios/src/palacios/vm_guest_mem.c @@ -160,9 +160,9 @@ int guest_va_to_guest_pa(struct guest_info * guest_info, addr_t guest_va, addr_t addr_t guest_pde = 0; if (guest_info->shdw_pg_mode == SHADOW_PAGING) { - guest_pde = (addr_t)CR3_TO_PDE32((void *)(guest_info->shdw_pg_state.guest_cr3)); + guest_pde = CR3_TO_PDE32_PA((void *)(addr_t)(guest_info->shdw_pg_state.guest_cr3)); } else if (guest_info->shdw_pg_mode == NESTED_PAGING) { - guest_pde = (addr_t)CR3_TO_PDE32((void *)(guest_info->ctrl_regs.cr3)); + guest_pde = CR3_TO_PDE32_PA((void *)(addr_t)(guest_info->ctrl_regs.cr3)); } if (guest_pa_to_host_va(guest_info, guest_pde, (addr_t *)&pde) == -1) {