From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC4O7-0006JN-RA for qemu-devel@nongnu.org; Mon, 06 Jul 2015 07:16:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC4O2-0006R1-SV for qemu-devel@nongnu.org; Mon, 06 Jul 2015 07:16:39 -0400 References: <1429964684-23872-1-git-send-email-aik@ozlabs.ru> <55646C18.4000303@redhat.com> <5564750C.8000100@ozlabs.ru> <556475BD.50401@redhat.com> <55647843.4040609@ozlabs.ru> <556479B6.1010501@redhat.com> <55647C75.5000704@ozlabs.ru> <55647D4C.6060008@redhat.com> <55648086.3010804@ozlabs.ru> <55648239.7070905@redhat.com> <20150526145557.4646.3678@loki> <55648A21.50401@redhat.com> <55649612.8070004@ozlabs.ru> <55649677.2090502@redhat.com> <556507FD.6060905@ozlabs.ru> <55656CBD.2000804@redhat.com> <559732F4.403@ozlabs.ru> From: Paolo Bonzini Message-ID: <559A638C.3010804@redhat.com> Date: Mon, 6 Jul 2015 13:16:28 +0200 MIME-Version: 1.0 In-Reply-To: <559732F4.403@ozlabs.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH qemu v7 06/14] spapr_iommu: Introduce "enabled" state for TCE table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Michael Roth , qemu-devel@nongnu.org, Alexander Graf , Alex Williamson , qemu-ppc@nongnu.org, David Gibson On 04/07/2015 03:12, Alexey Kardashevskiy wrote: >> >>> One step back :) Whole dance is what here? There are: >>> 1) del+set_size(0) >>> 2) set_size(not zero)+add >> >> Then no need for begin/commit. :) > > I got a new problem here - set_size(0) + set_size(not 0) do not invoke > region_del/region_add which does not seem right. As the result, > vfio_listener_region_del() never gets called and the IOMMU MR notifier > stays in the container->giommu_list. What is the correct solution to this? > > Incorrect (most likely :) ) solution is in > [PATCH qemu v9 13/13] spapr_pci/spapr_pci_vfio: Support Dynamic DMA > Windows (DDW) > where I explicitely do memory_region_del_subregion() + > memory_region_add_subregion() which seems to do the right job. I would like a comment there explaining the problem (i.e. what you would have done, what you expected and what were the actual results: it's not even that clear from this email), but it doesn't seem like an awful thing to do. Paolo