On 18.07.20 14:24, Julien Grall wrote:
Hello Julien
On 17/07/2020 20:17, Oleksandr wrote:
I would like to clarify regarding an IOMMU driver changes which
should be done to support PCI pass-through properly.
Design document mentions about SMMU, but Xen also supports IPMMU-VMSA
(under tech preview now). It would be really nice if the required
support is extended to that kind of IOMMU as well.
May I clarify what should be implemented in the Xen driver in order
to support PCI pass-through feature on Arm?
I would expect callbacks to:
- add a PCI device
- remove a PCI device
- assign a PCI device
- deassign a PCI device
AFAICT, they are already existing. So it is a matter of plumbing. This
would then be up to the driver to configure the IOMMU correctly.
Got it.
Should the IOMMU H/W be "PCI-aware" for that purpose?
The only requirement is that your PCI devices are behind an IOMMU :).
Other than that the IOMMU can mostly be configured the same way as you
would do for the non-PCI devices.
That's good.
The main difference would be how you find the master ID.
I am aware that on some platforms, the masterID may be shared between
multiple PCI devices. In that case, we would need to have a way to
assign all the devices to the same guest (maybe using group?).
Or just prevent these devices from being assigned to different guests?
During assigning a device to newly created guest check whether masterID
is already in use for any existing guests and deny operation in such a
case.
--
Regards,
Oleksandr Tyshchenko