hv: Add EPT mapping for UOS in partitioning mode

Adding code to map memory for UOS in partitioning mode ACRN.
HPA starting above 4GB is used for UOS memory. Supports only contiguous memory
from host for UOS. Current implementation supports only 2 GB for UOS memory.

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
This commit is contained in:
Sainath Grandhi
2018-08-09 09:16:48 -07:00
committed by lijinxia
parent c492a14e53
commit e40b998d21
3 changed files with 10 additions and 0 deletions

View File

@@ -161,6 +161,10 @@ int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm)
(void)memcpy_s(&vm->GUID[0], sizeof(vm->GUID),
&vm_desc->GUID[0],
sizeof(vm_desc->GUID));
#ifdef CONFIG_PARTITION_MODE
ept_mr_add(vm, vm_desc->start_hpa,
0UL, vm_desc->mem_size, EPT_RWX|EPT_WB);
#endif
}
INIT_LIST_HEAD(&vm->list);