From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/9] iommu: Introduce bind_pasid_table API function Date: Wed, 28 Jun 2017 11:57:00 +0200 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-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1498592883-56224-2-git-send-email-jacob.jun.pan-VuQAYsv1563Yd54FQh9/CA@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: Jacob Pan Cc: Lan Tianyu , Liu-zLv9SwRftAIdnm+yROfE0A@public.gmane.org, "Tian, Kevin" , Yi L , LKML , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Jean Delvare , David Woodhouse List-Id: iommu@lists.linux-foundation.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