From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751655AbdF1J5b (ORCPT ); Wed, 28 Jun 2017 05:57:31 -0400 Received: from 8bytes.org ([81.169.241.247]:47156 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751511AbdF1J5F (ORCPT ); Wed, 28 Jun 2017 05:57:05 -0400 Date: Wed, 28 Jun 2017 11:57:00 +0200 From: Joerg Roedel To: Jacob Pan Cc: iommu@lists.linux-foundation.org, LKML , David Woodhouse , "Liu, Yi L" , Lan Tianyu , "Tian, Kevin" , Raj Ashok , Alex Williamson , Jean Delvare , Liu@8bytes.org, Yi L Subject: Re: [PATCH 1/9] iommu: Introduce bind_pasid_table API function Message-ID: <20170628095700.GE14532@8bytes.org> References: <1498592883-56224-1-git-send-email-jacob.jun.pan@linux.intel.com> <1498592883-56224-2-git-send-email-jacob.jun.pan@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1498592883-56224-2-git-send-email-jacob.jun.pan@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 27, 2017 at 12:47:55PM -0700, Jacob Pan wrote: > +int iommu_bind_pasid_table(struct iommu_domain *domain, struct device *dev, > + struct pasid_table_info *pasidt_binfo) > +{ > + if (unlikely(!domain->ops->bind_pasid_table)) > + return -EINVAL; I think its better to return -ENODEV here, like other iommu-api functions do when a callback is NULL. > +enum iommu_model { > + IOMMU_MODEL_INTEL_VTD, > + IOMMU_MODEL_ARM_SMMU, > +}; AMD IOMMU also supports shared virtual memory. Regards, Joerg