From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] iommu: add a function to find an iommu group by id Date: Wed, 24 Apr 2013 20:01:49 +0200 Message-ID: <20130424180114.GB3167@8bytes.org> References: <1364167429-6432-1-git-send-email-aik@ozlabs.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1364167429-6432-1-git-send-email-aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Alexey Kardashevskiy Cc: Benjamin Herrenschmidt , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David Gibson List-Id: iommu@lists.linux-foundation.org On Mon, Mar 25, 2013 at 10:23:49AM +1100, Alexey Kardashevskiy wrote: > As IOMMU groups are exposed to the user space by their numbers, > the user space can use them in various kernel APIs so the kernel > might need an API to find a group by its ID. > > As an example, QEMU VFIO on PPC64 platform needs it to associate > a logical bus number (LIOBN) with a specific IOMMU group in order > to support in-kernel handling of DMA map/unmap requests. > > The patch adds the iommu_group_get_by_id(id) function which performs > such search. > > v2: fixed reference counting. > > Signed-off-by: Alexey Kardashevskiy Applied to core branch, thanks Alexey.