From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBueK-00041t-9q for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:52:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBueG-0006vk-59 for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:52:44 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:33836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBueF-0006vJ-VX for qemu-devel@nongnu.org; Sun, 05 Jul 2015 20:52:40 -0400 Received: by pabvl15 with SMTP id vl15so86060696pab.1 for ; Sun, 05 Jul 2015 17:52:39 -0700 (PDT) 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: Alexey Kardashevskiy Message-ID: <5599D14B.6070102@ozlabs.ru> Date: Mon, 6 Jul 2015 10:52:27 +1000 MIME-Version: 1.0 In-Reply-To: <559732F4.403@ozlabs.ru> Content-Type: text/plain; charset=koi8-r; format=flowed 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: Paolo Bonzini Cc: Michael Roth , qemu-devel@nongnu.org, Alexander Graf , Alex Williamson , qemu-ppc@nongnu.org, David Gibson On 07/04/2015 11:12 AM, Alexey Kardashevskiy wrote: > On 05/27/2015 05:05 PM, Paolo Bonzini wrote: >> >> >> On 27/05/2015 01:55, 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. > Never mind, "[PATCH qemu] vfio: Unregister IOMMU notifiers when container is destroyed" seems to solve the problem. Thanks for listening :) -- Alexey