hv: mmu: remove alloc_page() API

No one would call this API for now. So remove it.

Tracked-On: #861
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-10-31 07:41:59 +08:00
committed by lijinxia
parent 0391f84c83
commit f1ed6c503c
8 changed files with 15 additions and 115 deletions

View File

@@ -67,16 +67,9 @@ enum _page_table_level {
#define PAGE_SIZE_2M MEM_2M
#define PAGE_SIZE_1G MEM_1G
struct cpu_page {
uint8_t contents[CPU_PAGE_SIZE];
};
void sanitize_pte_entry(uint64_t *ptep);
void sanitize_pte(uint64_t *pt_page);
uint64_t get_paging_pml4(void);
void *alloc_paging_struct(void);
void free_paging_struct(void *ptr);
void enable_paging(uint64_t pml4_base_addr);
void enable_paging(void);
void enable_smep(void);
void init_paging(void);
void mmu_add(uint64_t *pml4_page, uint64_t paddr_base, uint64_t vaddr_base,

View File

@@ -25,9 +25,6 @@
#define PAGE_CACHE_UC_MINUS PAGE_PCD
#define PAGE_CACHE_UC (PAGE_PCD | PAGE_PWT)
#define PAGE_TABLE (PAGE_PRESENT | PAGE_RW | PAGE_USER)
#define EPT_RD (1UL << 0U)
#define EPT_WR (1UL << 1U)
#define EPT_EXE (1UL << 2U)

View File

@@ -24,8 +24,6 @@ struct mem_pool {
/* APIs exposing memory allocation/deallocation abstractions */
void *malloc(unsigned int num_bytes);
void *calloc(unsigned int num_elements, unsigned int element_size);
void *alloc_page(void);
void *alloc_pages(unsigned int page_num);
void free(const void *ptr);
#endif /* MEM_MGT_H */