From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh0GH-0000Ok-65 for qemu-devel@nongnu.org; Wed, 22 Oct 2014 14:03:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh0GB-00080S-0L for qemu-devel@nongnu.org; Wed, 22 Oct 2014 14:03:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh0GA-00080J-Oy for qemu-devel@nongnu.org; Wed, 22 Oct 2014 14:03:46 -0400 Message-ID: <1414001023.4202.237.camel@ul30vt.home> From: Alex Williamson Date: Wed, 22 Oct 2014 12:03:43 -0600 In-Reply-To: <1413608689-62203-1-git-send-email-blaschka@linux.vnet.ibm.com> References: <1413608689-62203-1-git-send-email-blaschka@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] vfio: fix adding memory listener to the right address space List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Frank Blaschka Cc: qemu-devel@nongnu.org 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 > --- > 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