X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_shadow_paging.c;h=c25a3cb5df26f31021f6872ba434d3d6eedf9446;hp=eeb4fdaf84e566f611d6652165d8d22d48fd9e2f;hb=08a79dd2e3c75109539bdce50c049303b1fb0912;hpb=a6b18965e0ab6c3a0f2950c684892052194c1c58 diff --git a/palacios/src/palacios/vmm_shadow_paging.c b/palacios/src/palacios/vmm_shadow_paging.c index eeb4fda..c25a3cb 100644 --- a/palacios/src/palacios/vmm_shadow_paging.c +++ b/palacios/src/palacios/vmm_shadow_paging.c @@ -274,8 +274,11 @@ int handle_shadow_pagefault32(struct guest_info * info, addr_t fault_addr, pf_er // Page Directory Entry marked non-user // - PrintDebug("Shadow Paging User access error\n"); - return -1; + PrintDebug("Shadow Paging User access error (shadow_pde_access=0x%x, guest_pde_access=0x%x - injecting into guest\n", shadow_pde_access, guest_pde_access); + info->ctrl_regs.cr2 = fault_addr; + raise_exception_with_error(info, PF_EXCEPTION, *(uint_t *)&error_code); + return 0; + } else if (shadow_pde_access == PT_ACCESS_OK) { pte32_t * shadow_pt = (pte32_t *)PDE32_T_ADDR((*shadow_pde)); pte32_t * guest_pt = NULL; @@ -306,7 +309,8 @@ int handle_shadow_pagefault32(struct guest_info * info, addr_t fault_addr, pf_er // this probably shouldn't ever happen PrintDebug("Unknown Error occurred\n"); PrintDebug("Manual Says to inject page fault into guest\n"); - return -1; + //return -1; Huh? It's a successful handling of the fault... + return 0; } //PrintDebugPageTables(shadow_pd);