hv: pgatble: move the EPT page table related APIs to ept.c

Move the EPT page table related APIs to ept.c. page module only provides APIs to
allocate/free page for page table page. pagetabl module only provides APIs to
add/modify/delete/lookup page table entry. The page pool and the page table
related APIs for EPT should defined in EPT module.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Li Fei1
2021-03-10 13:54:16 +08:00
committed by wenlingz
parent 5c71ca456a
commit 0278a3f46e
5 changed files with 155 additions and 155 deletions

View File

@@ -170,4 +170,7 @@ int32_t ept_misconfig_vmexit_handler(__unused struct acrn_vcpu *vcpu);
* pagetable page pool, null otherwise.
*/
struct page *alloc_ept_page(struct acrn_vm *vm);
void init_ept_pgtable(struct pgtable *table, uint16_t vm_id);
void reserve_buffer_for_ept_pages(void);
#endif /* EPT_H */

View File

@@ -77,8 +77,6 @@ struct pgtable {
void (*recover_exe_right)(uint64_t *entry);
};
void init_ept_pgtable(struct pgtable *table, uint16_t vm_id);
struct page *alloc_page(struct page_pool *pool);
void free_page(struct page_pool *pool, struct page *page);
void reserve_buffer_for_ept_pages(void);
#endif /* PAGE_H */