[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [RFC PATCH 0/2] Xen Calgary IOMMU support



The following two patches, against the xen-unstable and linux-2.6-xen
repositories, introduce proof-of-concept IOMMU support in Xen. The
IOMMU is the Calgary IOMMU found in high-end IBM xSeries servers. This
an isolation-capable IOMMU that provides isolation per PCI bus. With
such an IOMMU you can safely grant two domains *direct access* to two
PCI devices (provided they're on separate busses, which is the default
topology on these machines) and they can't DMA into each other's
memory.

The patches are based on the bare metal Linux Calgary IOMMU support
that is in -mm. They're proof of concept, not to be applied yet, may
eat your file system, belch and not say thank you, etc, etc - but they
work for us. With these patches dom0 runs with translation enabled.

There's plenty more to be done, but we we're aiming to release early
and often. Comments highly appreciated!

Short overview:

- dom0 creates "IO spaces" via iommu_create_io_space, one IO space per
BDF. Xen allocates memory for the translation tables, dom0 initializes
the IOMMU, Xen programs it.
- when a driver wishes to DMA, it goes through the Linux DMA API as
usual. The DMA API makes hypercalls to map and unmap pages into the IO
space, and returns the IO addresses to the driver.

TODO list (not necessarily in order of priority):

- finish OLS paper :-)
- cleaner separation of responsibilities between dom0 and Xen -
requires improved ioremap support in Xen
- add TCE invalidate entry/range/all hypercalls
- map Calgary register space in Xen so that we can do cache flushing
in Xen
- utilize the IOMMU in a direct HW access partition other than dom0
- validate all map/unamp requests (make sure OS is only
mapping/unmapping entries it owns)
- integration with grant tables and swiotlb
- integration with pci frontend / backend
- integration with management tools / domain configuration, etc
- support for Intel's and AMD's upcoming IOMMUs

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.