On Thursday 01 April 2010 07:25:04 am Michael S. Tsirkin wrote:
I'm not sure what 'per-guest' means in an ordinary process context.
This is extremely useful in non IOMMU systems - again, we're talking ordinary
processes, nothing to do with VMs. As long as the program can be trusted,
e.g., in embedded apps.
Right now I just use iommu_found - assuming that if we have one, it is in use.
Something better would be nice.
Sure it does. The DMA API - get_user_pages and dma_map_sg lock pages into the
MMU and the IOMMU. The MMU notifier unlocks if the user forgets to do it
explicitly.
For my networking applications, I will need the ability to talk to multiple
devices on potentially separate IOMMUs. What would per-guest mean then?
There are still per-device issues with locking - in particular the size of the
device's DMA address space. The DMA API already handles this - why not use
it? It would be nice to have a way to test whether a device is truly covered
by an IOMMU, but today it appears that if an IOMMU exists, then it covers all
devices (at least as far as I can see for x86).
--