hv: mmu: refine delete page table mapping

Merge mmu_modify with mmu_del to mmu_modify_or_del(..., type).
While type is MR_MODIFY, the actual action is doing mmu_modify; while
type is MR_DEL, the actual action is doing mmu_del.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li, Fei1
2018-07-22 16:09:21 +08:00
committed by lijinxia
parent 34c6862a28
commit 236bb10e4d
6 changed files with 77 additions and 50 deletions

View File

@@ -639,7 +639,8 @@ int prepare_vm0_memmap_and_e820(struct vm *vm)
* will cause EPT violation if sos accesses hv memory
*/
hv_hpa = get_hv_image_base();
ept_mr_del(vm, hv_hpa, hv_hpa, CONFIG_RAM_SIZE);
ept_mr_del(vm, (uint64_t *)vm->arch_vm.nworld_eptp,
hv_hpa, CONFIG_RAM_SIZE);
return 0;
}