mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: ept: store virtual address of EPT PML4 table
Most of the time, we use the virtual address of EPT PMl4 table, not physical address. Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -616,14 +616,14 @@ int64_t hcall_assign_ptdev(struct vm *vm, uint64_t vmid, uint64_t param)
|
||||
|
||||
/* create a iommu domain for target VM if not created */
|
||||
if (target_vm->iommu_domain == NULL) {
|
||||
if (target_vm->arch_vm.nworld_eptp == 0UL) {
|
||||
if (target_vm->arch_vm.nworld_eptp == NULL) {
|
||||
pr_err("%s, EPT of VM not set!\n",
|
||||
__func__, target_vm->attr.id);
|
||||
return -EPERM;
|
||||
}
|
||||
/* TODO: how to get vm's address width? */
|
||||
target_vm->iommu_domain = create_iommu_domain(vmid,
|
||||
target_vm->arch_vm.nworld_eptp, 48U);
|
||||
HVA2HPA(target_vm->arch_vm.nworld_eptp), 48U);
|
||||
if (target_vm->iommu_domain == NULL) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user