vfio: Introduce VFIO address spaces
commit3df3e0a5872cbc8fcc55a0413416352eec68132e
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 May 2014 19:05:19 +0000 (30 13:05 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 30 May 2014 19:05:19 +0000 (30 13:05 -0600)
tree0980696736c7276def69412398d5d99afeb8fcb4
parent279a35ab4a8515d1eac06a76547d4b65a6cde519
vfio: Introduce VFIO address spaces

The only model so far supported for VFIO passthrough devices is the model
usually used on x86, where all of the guest's RAM is mapped into the
(host) IOMMU and there is no IOMMU visible in the guest.

This patch begins to relax this model, introducing the notion of a
VFIOAddressSpace.  This represents a logical DMA address space which will
be visible to one or more VFIO devices by appropriate mapping in the (host)
IOMMU.  Thus the currently global list of containers becomes local to
a VFIOAddressSpace, and we verify that we don't attempt to add a VFIO
group to multiple address spaces.

For now, only one VFIOAddressSpace is created and used, corresponding to
main system memory, that will change in future patches.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/misc/vfio.c