mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv: Remove need for init_fallback_iommu_domain and fallback_iommu_domain
In the presence of SOS, ACRN uses fallback_iommu_domain which is the same used by SOS, to assign domain to devices during ACRN init. Also it uses fallback_iommu_domain when DM requests ACRN to remove device from UOS domain. This patch changes the design of assign/remove_iommu_device to avoid the concept of fallback_iommu_domain and its setup. This way ACRN can commonly treat pre-launched VMs bringup w.r.t. IOMMU domain creation. Tracked-On: #2965 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
948d58fb9c
commit
824caf8ce0
@@ -890,7 +890,7 @@ int32_t hcall_assign_ptdev(struct acrn_vm *vm, uint16_t vmid, uint64_t param)
|
||||
}
|
||||
}
|
||||
if (bdf_valid && iommu_valid) {
|
||||
ret = assign_pt_device(target_vm->iommu,
|
||||
ret = move_pt_device(vm->iommu, target_vm->iommu,
|
||||
(uint8_t)(bdf >> 8U), (uint8_t)(bdf & 0xffU));
|
||||
}
|
||||
} else {
|
||||
@@ -934,7 +934,7 @@ int32_t hcall_deassign_ptdev(struct acrn_vm *vm, uint16_t vmid, uint64_t param)
|
||||
}
|
||||
|
||||
if (bdf_valid) {
|
||||
ret = unassign_pt_device(target_vm->iommu,
|
||||
ret = move_pt_device(target_vm->iommu, vm->iommu,
|
||||
(uint8_t)(bdf >> 8U), (uint8_t)(bdf & 0xffU));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user