aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorFrank Blaschka <blaschka@linux.vnet.ibm.com>2014-12-19 14:40:06 -0700
committerAlex Williamson <alex.williamson@redhat.com>2014-12-19 14:40:06 -0700
commitc67676711c7202f48bc43d2f80125eaea355755e (patch)
tree3a9e669ffe11e14e8947be58528469a33a14a1f9 /hw
parent385f57cf9ad7566aa4fc125370f14902ea62aae5 (diff)
vfio: fix adding memory listener to the right address space
Depending on the device, container->space->as contains the valid AddressSpace. Using address_space_memory breaks devices sitting behind an iommu (and using a separate address space). Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/misc/vfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 6c36c8b687..51844cf70d 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3713,7 +3713,7 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as)
container->iommu_data.release = vfio_listener_release;
memory_listener_register(&container->iommu_data.type1.listener,
- &address_space_memory);
+ container->space->as);
if (container->iommu_data.type1.error) {
ret = container->iommu_data.type1.error;