From 36ddd87a098962cb5c1ab1b2366664483aa49a1a Mon Sep 17 00:00:00 2001 From: Li Fei1 Date: Tue, 9 Mar 2021 11:05:06 +0800 Subject: [PATCH] hv: pgtable: remove alloc_ept_page alloc_page/free_page should been called in pagetable module. In order to do this, we add pgtable_create_root and pgtable_create_trusty_root to create PML4 page table page for normal world and secure world. After this done, no one uses alloc_ept_page. So remove it. Tracked-On: #5830 Signed-off-by: Li Fei1 Reviewed-by: Jason Chen CJ --- hypervisor/arch/x86/guest/ept.c | 5 ----- hypervisor/include/arch/x86/guest/ept.h | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/hypervisor/arch/x86/guest/ept.c b/hypervisor/arch/x86/guest/ept.c index 50e1e49a2..601872545 100644 --- a/hypervisor/arch/x86/guest/ept.c +++ b/hypervisor/arch/x86/guest/ept.c @@ -446,8 +446,3 @@ void walk_ept_table(struct acrn_vm *vm, pge_handler cb) } } } - -struct page *alloc_ept_page(struct acrn_vm *vm) -{ - return alloc_page(vm->arch_vm.ept_pgtable.pool); -} diff --git a/hypervisor/include/arch/x86/guest/ept.h b/hypervisor/include/arch/x86/guest/ept.h index 526fc062d..ab38e11e1 100644 --- a/hypervisor/include/arch/x86/guest/ept.h +++ b/hypervisor/include/arch/x86/guest/ept.h @@ -164,16 +164,6 @@ void walk_ept_table(struct acrn_vm *vm, pge_handler cb); */ int32_t ept_misconfig_vmexit_handler(__unused struct acrn_vcpu *vcpu); -/** - * @brief allocate a page from the VM's EPT pagetable page pool - * - * @param[in] vm the pointer that points to VM data structure - * - * @retval a page pointer if there's available used pages in the VM's EPT - * 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 */