Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755686AbbBCMZP (ORCPT ); Tue, 3 Feb 2015 07:25:15 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:37885 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751068AbbBCMZM (ORCPT ); Tue, 3 Feb 2015 07:25:12 -0500 Date: Tue, 3 Feb 2015 13:25:07 +0100 From: Thierry Reding To: Joerg Roedel Cc: iommu@lists.linux-foundation.org, Will Deacon , Kukjin Kim , David Woodhouse , Heiko Stuebner , Hiroshi Doyu , Alex Williamson , Arnd Bergmann , linux-kernel@vger.kernel.org, Robin Murphy , Laurent Pinchart , jroedel@suse.de Subject: Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group Message-ID: <20150203122506.GC15068@ulmo.nvidia.com> References: <1422317339-22620-1-git-send-email-joro@8bytes.org> <1422317339-22620-4-git-send-email-joro@8bytes.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1ccMZA6j1vT5UqiK" Content-Disposition: inline In-Reply-To: <1422317339-22620-4-git-send-email-joro@8bytes.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2224 Lines: 58 --1ccMZA6j1vT5UqiK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 27, 2015 at 01:08:57AM +0100, Joerg Roedel wrote: > From: Joerg Roedel >=20 > This patch changes the behavior of the iommu_attach_device > and iommu_detach_device functions. With this change these > functions only work on devices that have their own group. > For all other devices the iommu_group_attach/detach > functions must be used. >=20 > Signed-off-by: Joerg Roedel > --- > drivers/iommu/iommu.c | 63 +++++++++++++++++++++++++++++++++++++++++++++= ++---- > 1 file changed, 59 insertions(+), 4 deletions(-) Sorry for my ignorance, but I don't understand what IOMMU groups are supposed to be or how to make use of them. It seems like a common idiom is to simply allocate a new group and add a device to it in the IOMMU's ->add_device() callback, but I fail to see the reason for that. Can anybody point me to documentation about this? I've looked and I did not find anything. Thierry --1ccMZA6j1vT5UqiK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU0L4iAAoJEN0jrNd/PrOhQYsP/3CtbCuU9IxGPw1gQfZRmOS/ VJTqnS9f0MKqiPcT6/uPF+tzljw9VsvTE75Kw4SxihTYbBlAE8atb7/CE5DVKCoa XUsKxbAmxSTUEch7c9mnOAd5rjWO/tc/xoyjG3C/G69tFTgqev/UiB0lnxOdX9Dl rdlHznmJQbEW/9fRDaLDR7mzc0nHhfeubXHeh/FUFvVB5sHd2CO9oHL544oVIxlP M4S1OTO+EoZYN+UxbSBEZTkUuPTDteLnlfvq999uUFJ5HVBpR1A0MW+DMhHJw6Zs 5XTOB+n2N5qLC7lmatKi0XKJblvLLqiGaVgq9cFzaz1B4VJDcqtvSLjbFcIXuhrl oI54+gxa10OJ+k7ef2H6+DU+opGnmROwbZoYVd/kehb2oACxuMJEQX+dKcRyu2B/ s/noXkuTvceXQG8XgK5NtoWTVo94hlafk8WOO6sAXzA0sjZZIGuvQCLTuJGyOSe5 fs1dd9wWVeLty7nzeJ/y7lFfFg5nrj+v6/L6XoDxNyF3B5xDaHE7LY1EgSggNfK7 M8+HYqOm69G/m6oVB8RXIxoAM8B99K50vLEGNBTpIA2H6nyutpbkZACqvJqhbBZK nqVmSlrZENt1z2NsE5J8dU+moLipFxfuAPVPsTPdduX+r1TFvFJO3IidzpqkiA2k KOECS8XJUd+sVz6eyDQk =kLO9 -----END PGP SIGNATURE----- --1ccMZA6j1vT5UqiK-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/