hv: memory: remove get_sworld_memory_base API

memory_ops structure will be changed to store page table related fields.
However, secure world memory base address is not one of them, it's VM
related. So save sworld_memory_base_hva in vm_arch structure directly.

Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Tracked-On: #5788
This commit is contained in:
Li Fei1
2021-02-19 09:25:59 +08:00
committed by wenlingz
parent 0a7bb7340f
commit 312702f2ec
4 changed files with 3 additions and 12 deletions

View File

@@ -215,11 +215,6 @@ static inline struct page *ept_get_pt_page(const union pgtable_pages_info *info,
return pt_page;
}
static inline void *ept_get_sworld_memory_base(const union pgtable_pages_info *info)
{
return info->ept.sworld_memory_base;
}
/* The function is used to disable execute right for (2MB / 1GB)large pages in EPT */
static inline void ept_tweak_exe_right(uint64_t *entry)
{
@@ -266,8 +261,7 @@ void init_ept_mem_ops(struct memory_ops *mem_ops, uint16_t vm_id)
ept_pages_info[vm_id].ept.nworld_pt_base = post_uos_nworld_pt_pages[page_idx];
#endif
ept_pages_info[vm_id].ept.sworld_pgtable_base = post_uos_sworld_pgtable_pages[page_idx];
ept_pages_info[vm_id].ept.sworld_memory_base = post_uos_sworld_memory[page_idx];
mem_ops->get_sworld_memory_base = ept_get_sworld_memory_base;
vm->arch_vm.sworld_memory_base_hva = post_uos_sworld_memory[page_idx];
}
mem_ops->info = &ept_pages_info[vm_id];
mem_ops->get_default_access_right = ept_get_default_access_right;