From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/3] Device isolation group infrastructure (v3) Date: Thu, 9 Feb 2012 12:28:05 +0100 Message-ID: <20120209112805.GN22598@amd.com> References: <1328071614-8320-1-git-send-email-david@gibson.dropbear.id.au> <1328071614-8320-2-git-send-email-david@gibson.dropbear.id.au> <20120208152748.GD22598@amd.com> <1328737168.2903.35.camel@pasglop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1328737168.2903.35.camel@pasglop> 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: Benjamin Herrenschmidt Cc: kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, David Gibson List-Id: iommu@lists.linux-foundation.org On Thu, Feb 09, 2012 at 08:39:28AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-02-08 at 16:27 +0100, Joerg Roedel wrote: > > Again, device grouping is done by the IOMMU drivers, so this all > > belongs > > into the generic iommu-code rather than the driver core. > > Except that there isn't really a "generic iommu code"... discovery, > initialization & matching of iommu vs. devices etc... that's all > implemented in the arch specific iommu code. The whole point of moving the iommu drivers to drivers/iommu was to factor out common code. We are not where we want to be yet but the goal is to move more code to the generic part. For the group-code this means that the generic code should iterate over all devices on a bus and build up group structures based on isolation information provided by the arch specific code. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756597Ab2BIL2P (ORCPT ); Thu, 9 Feb 2012 06:28:15 -0500 Received: from ch1ehsobe003.messaging.microsoft.com ([216.32.181.183]:56533 "EHLO ch1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144Ab2BIL2N (ORCPT ); Thu, 9 Feb 2012 06:28:13 -0500 X-SpamScore: -22 X-BigFish: VPS-22(zz936eK1432N98dKzz1202hzz15d4Rz2dh668h839h944h) X-Forefront-Antispam-Report: CIP:163.181.249.108;KIP:(null);UIP:(null);IPV:NLI;H:ausb3twp01.amd.com;RD:none;EFVD:NLI X-WSS-ID: 0LZ4IIW-01-2N5-02 X-M-MSG: Date: Thu, 9 Feb 2012 12:28:05 +0100 From: Joerg Roedel To: Benjamin Herrenschmidt CC: David Gibson , , , , , , , Subject: Re: [PATCH 1/3] Device isolation group infrastructure (v3) Message-ID: <20120209112805.GN22598@amd.com> References: <1328071614-8320-1-git-send-email-david@gibson.dropbear.id.au> <1328071614-8320-2-git-send-email-david@gibson.dropbear.id.au> <20120208152748.GD22598@amd.com> <1328737168.2903.35.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1328737168.2903.35.camel@pasglop> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: amd.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2012 at 08:39:28AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-02-08 at 16:27 +0100, Joerg Roedel wrote: > > Again, device grouping is done by the IOMMU drivers, so this all > > belongs > > into the generic iommu-code rather than the driver core. > > Except that there isn't really a "generic iommu code"... discovery, > initialization & matching of iommu vs. devices etc... that's all > implemented in the arch specific iommu code. The whole point of moving the iommu drivers to drivers/iommu was to factor out common code. We are not where we want to be yet but the goal is to move more code to the generic part. For the group-code this means that the generic code should iterate over all devices on a bus and build up group structures based on isolation information provided by the arch specific code. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvSAm-0002DS-Vb for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:28:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvSAg-0002bi-Pz for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:28:20 -0500 Received: from ch1ehsobe001.messaging.microsoft.com ([216.32.181.181]:56538 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvSAg-0002bU-IO for qemu-devel@nongnu.org; Thu, 09 Feb 2012 06:28:14 -0500 Date: Thu, 9 Feb 2012 12:28:05 +0100 From: Joerg Roedel Message-ID: <20120209112805.GN22598@amd.com> References: <1328071614-8320-1-git-send-email-david@gibson.dropbear.id.au> <1328071614-8320-2-git-send-email-david@gibson.dropbear.id.au> <20120208152748.GD22598@amd.com> <1328737168.2903.35.camel@pasglop> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1328737168.2903.35.camel@pasglop> Subject: Re: [Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: kvm@vger.kernel.org, aik@ozlabs.ru, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, dwmw2@infradead.org, David Gibson On Thu, Feb 09, 2012 at 08:39:28AM +1100, Benjamin Herrenschmidt wrote: > On Wed, 2012-02-08 at 16:27 +0100, Joerg Roedel wrote: > > Again, device grouping is done by the IOMMU drivers, so this all > > belongs > > into the generic iommu-code rather than the driver core. > > Except that there isn't really a "generic iommu code"... discovery, > initialization & matching of iommu vs. devices etc... that's all > implemented in the arch specific iommu code. The whole point of moving the iommu drivers to drivers/iommu was to factor out common code. We are not where we want to be yet but the goal is to move more code to the generic part. For the group-code this means that the generic code should iterate over all devices on a bus and build up group structures based on isolation information provided by the arch specific code. Joerg -- AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632