Open otyshchenko1 opened 7 years ago
Although a work is still in progress a basic implementation was done and located here: https://github.com/otyshchenko1/xen/commits/4.9.0-rc6-iommu-coproc https://github.com/otyshchenko1/linux/commits/v4.9/rcar-3.5.3-iommu-coproc https://github.com/otyshchenko1/xen-scripts/commit/288f902951fd67bb2832cdca0c04f77e08113d84 Need to think about implementing our own minimal API to init and switch IOMMU instead of using iommu_assign_dt_device/iommu_deassign_dt_device APIs, because the usage of already existing APIs is an overhead. And the most important thing is that these API must be suitable for calling from irq context (reentrant, locks, etc).
More generic and optimized version is on review now #79
The IOMMU code should handle devices marked as xen,coproc in other specific way. These devices are shared between domains, so they might be assigned to several domains at the same time.
aanisov said: Are you sure IOMMU framework should handle xen,coproc devices by itself? Wouldn't it be better to provide a "generic" implementation of device migration during domains runtime, together with an interface to create/init such a migrating devices?
I answered: Sounds good. At first I have to try to deassign/assign device in runtime.