X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_paging.c;h=0d6e9eab659913759280e4a606b88cefe99f8836;hb=101529b6eae500272347287df43ec51aa003d0aa;hp=95240ad1cf814bd6637763b74eba40adb6914a5a;hpb=858a36782662b04562c0d83db75e11cb55e8b91b;p=palacios.git diff --git a/palacios/src/palacios/vmm_paging.c b/palacios/src/palacios/vmm_paging.c index 95240ad..0d6e9ea 100644 --- a/palacios/src/palacios/vmm_paging.c +++ b/palacios/src/palacios/vmm_paging.c @@ -1,3 +1,7 @@ +/* (c) 2008, Jack Lange */ +/* (c) 2008, The V3VEE Project */ + + #include #include @@ -5,7 +9,7 @@ #include -extern struct vmm_os_hooks * os_hooks; + void delete_page_tables_pde32(pde32_t * pde) { int i;//, j; @@ -26,12 +30,12 @@ void delete_page_tables_pde32(pde32_t * pde) { } */ //PrintDebug("Deleting PTE %d (%x)\n", i, pte); - os_hooks->free_page(pte); + V3_FreePage(pte); } } // PrintDebug("Deleting PDE (%x)\n", pde); - os_hooks->free_page(pde); + V3_FreePage(pde); } @@ -115,7 +119,7 @@ pt_access_status_t can_access_pde32(pde32_t * pde, addr_t addr, pf_error_t acces } else if ((entry->writable == 0) && (access_type.write == 1)) { return PT_WRITE_ERROR; } else if ((entry->user_page == 0) && (access_type.user == 1)) { - // Check CR0.WP + // Check CR0.WP? return PT_USER_ERROR; } @@ -131,7 +135,7 @@ pt_access_status_t can_access_pte32(pte32_t * pte, addr_t addr, pf_error_t acces } else if ((entry->writable == 0) && (access_type.write == 1)) { return PT_WRITE_ERROR; } else if ((entry->user_page == 0) && (access_type.user == 1)) { - // Check CR0.WP + // Check CR0.WP? return PT_USER_ERROR; } @@ -150,11 +154,11 @@ pde32_t * create_passthrough_pde32_pts(struct guest_info * guest_info) { int i, j; struct shadow_map * map = &(guest_info->mem_map); - pde32_t * pde = os_hooks->allocate_pages(1); + pde32_t * pde = V3_AllocPages(1); for (i = 0; i < MAX_PDE32_ENTRIES; i++) { int pte_present = 0; - pte32_t * pte = os_hooks->allocate_pages(1); + pte32_t * pte = V3_AllocPages(1); for (j = 0; j < MAX_PTE32_ENTRIES; j++) { @@ -205,7 +209,7 @@ pde32_t * create_passthrough_pde32_pts(struct guest_info * guest_info) { } if (pte_present == 0) { - os_hooks->free_page(pte); + V3_FreePage(pte); pde[i].present = 0; pde[i].writable = 0;