vfio: Create VFIOAddressSpace objects as needed
commit0688448b71d22912601380b7e7eb66a38dc996b8
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 30 May 2014 19:09:14 +0000 (30 13:09 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 30 May 2014 19:09:14 +0000 (30 13:09 -0600)
tree33113becbd3af69ee2c5b7e776f28ea98e1571cb
parent3df3e0a5872cbc8fcc55a0413416352eec68132e
vfio: Create VFIOAddressSpace objects as needed

So far, VFIO has a notion of different logical DMA address spaces, but
only ever uses one (system memory).  This patch extends this, creating
new VFIOAddressSpace objects as necessary, according to the AddressSpace
reported by the PCI subsystem for this device's DMAs.

This isn't enough yet to support guest side IOMMUs with VFIO, but it does
mean we could now support VFIO devices on, for example, a guest side PCI
host bridge which maps system memory at somewhere other than 0 in PCI
space.

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