hv: trusty: refine trusty memory region mapping

Now it's using the memory reserve by hypervisor. So there's not
necessaty to map or ummap this region from SOS.

Tracked-On: #1942
Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
Li, Fei1
2018-11-28 22:32:52 +08:00
committed by wenlingz
parent bd1c0838d1
commit a0582c99cf
5 changed files with 0 additions and 66 deletions

View File

@@ -295,27 +295,3 @@ void init_paging(void)
/* set ptep in sanitized_page point to itself */
sanitize_pte((uint64_t *)sanitized_page);
}
bool check_continuous_hpa(struct acrn_vm *vm, uint64_t gpa_arg, uint64_t size_arg)
{
uint64_t curr_hpa;
uint64_t next_hpa;
uint64_t gpa = gpa_arg;
uint64_t size = size_arg;
/* if size <= PAGE_SIZE_4K, it is continuous,no need check
* if size > PAGE_SIZE_4K, need to fetch next page
*/
while (size > PAGE_SIZE_4K) {
curr_hpa = gpa2hpa(vm, gpa);
gpa += PAGE_SIZE_4K;
next_hpa = gpa2hpa(vm, gpa);
if ((curr_hpa == INVALID_HPA) || (next_hpa == INVALID_HPA)
|| (next_hpa != (curr_hpa + PAGE_SIZE_4K))) {
return false;
}
size -= PAGE_SIZE_4K;
}
return true;
}