From: Jack Lange Date: Thu, 30 Oct 2008 23:59:38 +0000 (-0500) Subject: added the translation functions to the header file X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=6200fec9adb1dc08be55a9e69457ec21d02ea59c added the translation functions to the header file --- diff --git a/palacios/include/palacios/vmm_paging.h b/palacios/include/palacios/vmm_paging.h index fee044a..61beb8d 100644 --- a/palacios/include/palacios/vmm_paging.h +++ b/palacios/include/palacios/vmm_paging.h @@ -465,6 +465,17 @@ void delete_page_tables_32(pde32_t * pde); void delete_page_tables_32PAE(pdpe32pae_t * pdpe); void delete_page_tables_64(pml4e64_t * pml4); + +int v3_translate_guest_pt_32(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr); +int v3_translate_guest_pt_32pae(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr); +int v3_translate_guest_pt_64(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr); + +int v3_translate_host_pt_32(addr_t host_cr3, addr_t vaddr, addr_t * paddr); +int v3_translate_host_pt_32pae(addr_t host_cr3, addr_t vaddr, addr_t * paddr); +int v3_translate_host_pt_64(addr_t host_cr3, addr_t vaddr, addr_t * paddr); + + +/* Should these be static? pt_entry_type_t pde32_lookup(pde32_t * pd, addr_t addr, addr_t * entry); pt_entry_type_t pte32_lookup(pte32_t * pt, addr_t addr, addr_t * entry); diff --git a/palacios/src/palacios/vmm_paging.c b/palacios/src/palacios/vmm_paging.c index 3d0cb19..d5216cf 100644 --- a/palacios/src/palacios/vmm_paging.c +++ b/palacios/src/palacios/vmm_paging.c @@ -62,7 +62,7 @@ void delete_page_tables_64(pml4e64_t * pml4) { } -int translate_guest_pt_32(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_guest_pt_32(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { addr_t guest_pde_pa = CR3_TO_PDE32_PA(guest_cr3); pde32_t * guest_pde = 0; addr_t guest_pte_pa = 0; @@ -102,7 +102,7 @@ int translate_guest_pt_32(struct guest_info * info, addr_t guest_cr3, addr_t vad } -int translate_guest_pt_32pae(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_guest_pt_32pae(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { addr_t guest_pdpe_pa = CR3_TO_PDPE32PAE_PA(guest_cr3); pdpe32pae_t * guest_pdpe = 0; addr_t guest_pde_pa = 0; @@ -162,7 +162,7 @@ int translate_guest_pt_32pae(struct guest_info * info, addr_t guest_cr3, addr_t return 0; } -int translate_guest_pt_64(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_guest_pt_64(struct guest_info * info, addr_t guest_cr3, addr_t vaddr, addr_t * paddr) { addr_t guest_pml4_pa = CR3_TO_PML4E64_PA(guest_cr3); pml4e64_t * guest_pml = 0; addr_t guest_pdpe_pa = 0; @@ -242,7 +242,7 @@ int translate_guest_pt_64(struct guest_info * info, addr_t guest_cr3, addr_t vad -int translate_host_pt_32(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_host_pt_32(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { pde32_t * host_pde = (pde32_t *)CR3_TO_PDE32_VA(host_cr3); pte32_t * host_pte = 0; @@ -263,14 +263,14 @@ int translate_host_pt_32(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { } -int translate_host_pt_32pae(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_host_pt_32pae(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { return -1; } -int translate_host_pt_64(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { +int v3_translate_host_pt_64(addr_t host_cr3, addr_t vaddr, addr_t * paddr) { return -1;