hv: pgtable: move sanitize_pte into pagetable.c

sanitize_pte is used to set page table entry to map to an sanitized page to
mitigate l1tf. It should belongs to pgtable module. So move it to pagetable.c

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1
2021-03-22 13:59:29 +08:00
committed by wenlingz
parent ef90bb6db3
commit d1ae797742
6 changed files with 33 additions and 29 deletions

View File

@@ -81,8 +81,6 @@ static inline uint64_t round_pde_down(uint64_t val)
#define PAGE_SIZE_2M MEM_2M
#define PAGE_SIZE_1G MEM_1G
void sanitize_pte_entry(uint64_t *ptep, const struct pgtable *table);
void sanitize_pte(uint64_t *pt_page, const struct pgtable *table);
/**
* @brief MMU paging enable
*

View File

@@ -304,6 +304,8 @@ static inline uint64_t pdpte_large(uint64_t pdpte)
return pdpte & PAGE_PSE;
}
void init_sanitized_page(uint64_t *sanitized_page, uint64_t hpa);
void *pgtable_create_root(const struct pgtable *table);
void *pgtable_create_trusty_root(const struct pgtable *table,
void *nworld_pml4_page, uint64_t prot_table_present, uint64_t prot_clr);