2
0
Эх сурвалжийг харах

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>
Frank Blaschka 10 жил өмнө
parent
commit
c67676711c
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      hw/misc/vfio.c

+ 1 - 1
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;