* [Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space
@ 2014-10-18 5:04 Frank Blaschka
2014-10-22 18:03 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Frank Blaschka @ 2014-10-18 5:04 UTC (permalink / raw)
To: alex.williamson; +Cc: Frank Blaschka, qemu-devel
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>
---
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 d66f3d2..fcc1958 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -3703,7 +3703,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;
--
1.8.5.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space
2014-10-18 5:04 [Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space Frank Blaschka
@ 2014-10-22 18:03 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2014-10-22 18:03 UTC (permalink / raw)
To: Frank Blaschka; +Cc: qemu-devel
On Sat, 2014-10-18 at 07:04 +0200, Frank Blaschka wrote:
> 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>
> ---
> 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 d66f3d2..fcc1958 100644
> --- a/hw/misc/vfio.c
> +++ b/hw/misc/vfio.c
> @@ -3703,7 +3703,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;
This looks right to me, I'll do some testing and put it in after QEMU
2.2. Thanks!
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-22 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-18 5:04 [Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space Frank Blaschka
2014-10-22 18:03 ` Alex Williamson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).