From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D0CC42C042D for ; Sun, 23 Jun 2013 09:28:36 +1000 (EST) Message-ID: <1371943693.3944.104.camel@pasglop> Subject: Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling From: Benjamin Herrenschmidt To: David Gibson Date: Sun, 23 Jun 2013 09:28:13 +1000 In-Reply-To: <20130622120304.GB25265@voom.fritz.box> References: <87txkun568.fsf@rustcorp.com.au> <1371617970.21896.232.camel@pasglop> <1371653443.21896.291.camel@pasglop> <1371656989.22659.98.camel@ul30vt.home> <51C28BEA.8050501@ozlabs.ru> <20130620052822.GB3140@voom.redhat.com> <1371714449.3944.14.camel@pasglop> <51C2C1CC.9000003@ozlabs.ru> <1371740113.32709.22.camel@ul30vt.home> <20130622120304.GB25265@voom.fritz.box> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Cc: "kvm@vger.kernel.org mailing list" , Alexey Kardashevskiy , Joerg Roedel , Rusty Russell , Alexander Graf , kvm-ppc@vger.kernel.org, open list , Alex Williamson , Paul Mackerras , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sat, 2013-06-22 at 22:03 +1000, David Gibson wrote: > I think the interface should not take the group fd, but the container > fd. Holding a reference to *that* would keep the necessary things > around. But more to the point, it's the right thing semantically: > > The container is essentially the handle on a host iommu address space, > and so that's what should be bound by the KVM call to a particular > guest iommu address space. e.g. it would make no sense to bind two > different groups to different guest iommu address spaces, if they were > in the same container - the guest thinks they are different spaces, > but if they're in the same container they must be the same space. Interestingly, how are we going to extend that when/if we implement DDW ? DDW means an API by which the guest can request the creation of additional iommus for a given device (typically, in addition to the default smallish 32-bit one using 4k pages, the guest can request a larger window in 64-bit space using a larger page size). Cheers, Ben.