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

@@ -482,7 +482,8 @@ static int32_t _set_vm_memory_region(struct vm *vm,
return ept_mr_add(target_vm, hpa,
region->gpa, region->size, prot);
} else {
return ept_mr_del(target_vm, hpa,
return ept_mr_del(target_vm,
(uint64_t *)target_vm->arch_vm.nworld_eptp,
region->gpa, region->size);
}