mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
hv: free ept memory enhancement
--add free_paging_struct api, used for free page tables it will clear memory before free. --add HPA2HVA translation when free ept memory Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Reviewed-by: Anthony Xu <anthony.xu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -512,6 +512,14 @@ void *alloc_paging_struct(void)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void free_paging_struct(void *ptr)
|
||||
{
|
||||
if (ptr) {
|
||||
memset(ptr, 0, CPU_PAGE_SIZE);
|
||||
free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t config_page_table_attr(struct map_params *map_params, uint32_t flags)
|
||||
{
|
||||
int table_type = map_params->page_table_type;
|
||||
|
||||
Reference in New Issue
Block a user