From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxBta-0000D8-FI for qemu-devel@nongnu.org; Tue, 26 May 2015 06:15:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxBtU-000585-V7 for qemu-devel@nongnu.org; Tue, 26 May 2015 06:15:38 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxBtU-00057m-Pj for qemu-devel@nongnu.org; Tue, 26 May 2015 06:15:32 -0400 Received: by pabru16 with SMTP id ru16so89530973pab.1 for ; Tue, 26 May 2015 03:15:32 -0700 (PDT) Message-ID: <556447BB.9000802@ozlabs.ru> Date: Tue, 26 May 2015 20:15:23 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1429964684-23872-1-git-send-email-aik@ozlabs.ru> <1429964684-23872-7-git-send-email-aik@ozlabs.ru> <55633A54.8080807@ozlabs.ru> <20150526024628.GA30620@voom.redhat.com> <5564359A.2070009@redhat.com> In-Reply-To: <5564359A.2070009@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 , David Gibson Cc: Michael Roth , Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Alexander Graf On 05/26/2015 06:58 PM, Paolo Bonzini wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > > > On 26/05/2015 04:46, David Gibson wrote: >> On Tue, May 26, 2015 at 01:05:56AM +1000, Alexey Kardashevskiy >> wrote: >>> Hi Paolo, >>> >>> I have had a conversation with Mike and it turns out I am not >>> allowed to create/remove memory regions dynamically >>> (docs/memory.txt:101); otherwise "destroying regions during >>> reset causes assertion in RCU thread during PHB/IOMMU >>> unplug/unparent". Is it because patch just missing some >>> unref()/unparent() call or it is totally wrong and I have to >>> implement subregions (on a PCI bus address space) myself if I >>> want dynamic DMA windows? Thanks! > > I'm blind, can you explain the path where that happens? There was a "[RFC PATCH 00/15] spapr: add support for PHB hotplug" patchset from Mike, this patch added "unrealize" for spapr_phb: [RFC PATCH 05/15] spapr_pci: add PHB unrealize I believe I am dealing with the fixed version of this patch so I'll ask Mike to respin it. > >> So, the sentences after that one note an exception for alias and >> container regions. I think iommu regions should behave similarly >> - in a sense they're just a procedurally generated collection of >> alias regions. > > The difference is that containers and aliases are resolved at the time > the memory region tree is flattened, while IOMMU regions are resolved > at run time. So they are not parts of flattened view and I should be able to add/remove these IOMMU subregions any time I like? >> If it's not true now that they can be unparented at any time like >> alias regions, we should probably try to make it true. > > Unfortunately it's not so easy... -- Alexey