mirror of
https://github.com/qemu/qemu.git
synced 2024-12-02 00:03:35 +08:00
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>
This commit is contained in:
parent
385f57cf9a
commit
c67676711c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user