From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [RFC PATCH 22/30] iommu: Bind/unbind tasks to/from devices Date: Wed, 22 Mar 2017 16:38:50 +0100 Message-ID: <20170322153850.GD7266@8bytes.org> References: <20170227195441.5170-1-jean-philippe.brucker@arm.com> <20170227195441.5170-23-jean-philippe.brucker@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20170227195441.5170-23-jean-philippe.brucker-5wv7dgnIgG8@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: Jean-Philippe Brucker Cc: Shanker Donthineni , kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Catalin Marinas , Sinan Kaya , Will Deacon , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Harv Abdulhamid , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bjorn Helgaas , David Woodhouse , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Nate Watterson List-Id: iommu@lists.linux-foundation.org Hi Jean-Philippe, On Mon, Feb 27, 2017 at 07:54:33PM +0000, Jean-Philippe Brucker wrote: > +extern int iommu_set_svm_ops(struct device *dev, > + const struct iommu_svm_ops *svm_ops); > +extern int iommu_bind_task(struct device *dev, struct task_struct *task, > + int *pasid, int flags, void *priv); > + > +extern int iommu_unbind_task(struct device *dev, int pasid, int flags); I really like that API, it is simpler than what the AMD driver currently implements but should work for it too (once we adapt the AMD-KFD driver to it). One issue I like to have discussed is whether we can make a global PASID allocation (with a one-PASID per-task model) workable with SMMU too. Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from 8bytes.org ([81.169.241.247]:39881 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935106AbdCVPiw (ORCPT ); Wed, 22 Mar 2017 11:38:52 -0400 Date: Wed, 22 Mar 2017 16:38:50 +0100 From: Joerg Roedel To: Jean-Philippe Brucker Cc: Harv Abdulhamid , Will Deacon , Shanker Donthineni , Bjorn Helgaas , Sinan Kaya , Lorenzo Pieralisi , Catalin Marinas , Robin Murphy , Nate Watterson , Alex Williamson , David Woodhouse , linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org, kvm@vger.kernel.org Subject: Re: [RFC PATCH 22/30] iommu: Bind/unbind tasks to/from devices Message-ID: <20170322153850.GD7266@8bytes.org> References: <20170227195441.5170-1-jean-philippe.brucker@arm.com> <20170227195441.5170-23-jean-philippe.brucker@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20170227195441.5170-23-jean-philippe.brucker@arm.com> Sender: linux-pci-owner@vger.kernel.org List-ID: Hi Jean-Philippe, On Mon, Feb 27, 2017 at 07:54:33PM +0000, Jean-Philippe Brucker wrote: > +extern int iommu_set_svm_ops(struct device *dev, > + const struct iommu_svm_ops *svm_ops); > +extern int iommu_bind_task(struct device *dev, struct task_struct *task, > + int *pasid, int flags, void *priv); > + > +extern int iommu_unbind_task(struct device *dev, int pasid, int flags); I really like that API, it is simpler than what the AMD driver currently implements but should work for it too (once we adapt the AMD-KFD driver to it). One issue I like to have discussed is whether we can make a global PASID allocation (with a one-PASID per-task model) workable with SMMU too. Joerg From mboxrd@z Thu Jan 1 00:00:00 1970 From: joro@8bytes.org (Joerg Roedel) Date: Wed, 22 Mar 2017 16:38:50 +0100 Subject: [RFC PATCH 22/30] iommu: Bind/unbind tasks to/from devices In-Reply-To: <20170227195441.5170-23-jean-philippe.brucker@arm.com> References: <20170227195441.5170-1-jean-philippe.brucker@arm.com> <20170227195441.5170-23-jean-philippe.brucker@arm.com> Message-ID: <20170322153850.GD7266@8bytes.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Jean-Philippe, On Mon, Feb 27, 2017 at 07:54:33PM +0000, Jean-Philippe Brucker wrote: > +extern int iommu_set_svm_ops(struct device *dev, > + const struct iommu_svm_ops *svm_ops); > +extern int iommu_bind_task(struct device *dev, struct task_struct *task, > + int *pasid, int flags, void *priv); > + > +extern int iommu_unbind_task(struct device *dev, int pasid, int flags); I really like that API, it is simpler than what the AMD driver currently implements but should work for it too (once we adapt the AMD-KFD driver to it). One issue I like to have discussed is whether we can make a global PASID allocation (with a one-PASID per-task model) workable with SMMU too. Joerg