hv: pgtable: add pgtable_create_trusty_root

Add pgtable_create_trusty_root to allocate a page for trusty PML4 page table page.
This function also copy PDPT entries from Normal world to Secure world.

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-09 11:02:30 +08:00
committed by wenlingz
parent 596c349600
commit ea701c63c7
3 changed files with 51 additions and 41 deletions

View File

@@ -305,6 +305,8 @@ static inline uint64_t pdpte_large(uint64_t pdpte)
}
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);
/**
*@pre (pml4_page != NULL) && (pg_size != NULL)
*/