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 COPROC framework should request IOMMU framework to switch page table for particular device right after the context_switch_from has been completed. Such ability should be added to both framework and driver.
aanisov had another view of this, but together with andr2000 we haven't come to conclusion with him yet. Need to discuss.