From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBC0O-0004RS-Rb for qemu-devel@nongnu.org; Fri, 03 Jul 2015 21:12:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBC0L-0003An-MP for qemu-devel@nongnu.org; Fri, 03 Jul 2015 21:12:32 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBC0L-0003Af-H1 for qemu-devel@nongnu.org; Fri, 03 Jul 2015 21:12:29 -0400 Received: by paceq1 with SMTP id eq1so63764741pac.3 for ; Fri, 03 Jul 2015 18:12:28 -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> From: Alexey Kardashevskiy Message-ID: <559732F4.403@ozlabs.ru> Date: Sat, 4 Jul 2015 11:12:20 +1000 MIME-Version: 1.0 In-Reply-To: <55656CBD.2000804@redhat.com> 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 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. -- Alexey