qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 02/14] vfio: fix adding memory listener to the right


From: Alex Williamson
Subject: [Qemu-devel] [PULL 02/14] vfio: fix adding memory listener to the right address space
Date: Mon, 22 Dec 2014 13:43:21 -0700
User-agent: StGit/0.17-dirty

From: Frank Blaschka <address@hidden>

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 <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>
---
 hw/misc/vfio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 6c36c8b..51844cf 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]