From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWhHC-0006Gd-LB for qemu-devel@nongnu.org; Tue, 22 May 2012 01:04:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWhHA-00077G-P8 for qemu-devel@nongnu.org; Tue, 22 May 2012 01:04:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWhHA-00077B-HF for qemu-devel@nongnu.org; Tue, 22 May 2012 01:04:52 -0400 From: Alex Williamson Date: Mon, 21 May 2012 23:04:39 -0600 Message-ID: <20120522050438.5871.56283.stgit@bling.home> In-Reply-To: <20120522043607.5871.11340.stgit@bling.home> References: <20120522043607.5871.11340.stgit@bling.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH v2 01/13] driver core: Add iommu_group tracking to struct device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: benh@kernel.crashing.org, aik@ozlabs.ru, david@gibson.dropbear.id.au, joerg.roedel@amd.com, dwmw2@infradead.org Cc: aafabbri@cisco.com, alex.williamson@redhat.com, kvm@vger.kernel.org, B07421@freescale.com, linux-pci@vger.kernel.org, konrad.wilk@oracle.com, agraf@suse.de, qemu-devel@nongnu.org, chrisw@sous-sol.org, B08248@freescale.com, iommu@lists.linux-foundation.org, ddutile@redhat.com, avi@redhat.com, gregkh@linuxfoundation.org, bhelgaas@google.com, linux-kernel@vger.kernel.org, benve@cisco.com IOMMU groups allow IOMMU drivers to represent DMA visibility and isolation of devices. Multiple devices may be grouped together for the purposes of DMA. Placing a pointer on struct device enable easy access for things like streaming DMA programming and drivers like VFIO. Signed-off-by: Alex Williamson Acked-by: Greg Kroah-Hartman --- include/linux/device.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index 5ad17cc..13dd26b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -35,6 +35,7 @@ struct subsys_private; struct bus_type; struct device_node; struct iommu_ops; +struct iommu_group; struct bus_attribute { struct attribute attr; @@ -677,6 +678,7 @@ struct device { const struct attribute_group **groups; /* optional groups */ void (*release)(struct device *dev); + struct iommu_group *iommu_group; }; /* Get the wakeup routines, which depend on struct device */