From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Li, ZhenHua" Subject: Re: [PATCH v8 01/10] iommu/vt-d: Update iommu_attach_domain() and its callers Date: Tue, 13 Jan 2015 09:28:53 +0800 Message-ID: <54B474D5.8090500@hp.com> References: <1421046388-27925-1-git-send-email-zhen-hual@hp.com> <1421046388-27925-2-git-send-email-zhen-hual@hp.com> <20150112151855.GB6343@8bytes.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150112151855.GB6343-zLv9SwRftAIdnm+yROfE0A@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: Joerg Roedel Cc: bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, tom.vaden-VXdhtT5mjnY@public.gmane.org, rwright-VXdhtT5mjnY@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, lisa.mitchell-VXdhtT5mjnY@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, "Li, ZhenHua" , doug.hatch-VXdhtT5mjnY@public.gmane.org, ishii.hironobu-+CUm20s59erQFUHtdCDX3A@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, billsumnerlinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, li.zhang6-VXdhtT5mjnY@public.gmane.org, dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On 01/12/2015 11:18 PM, Joerg Roedel wrote: > On Mon, Jan 12, 2015 at 03:06:19PM +0800, Li, Zhen-Hua wrote: >> Allow specification of the domain-id for the new domain. >> This patch only adds the 'did' parameter to iommu_attach_domain() >> and modifies all of its callers to specify the default value of -1 >> which says "no did specified, allocate a new one". > > I think its better to keep the old iommu_attach_domain() interface in > place and introduce a new function (like iommu_attach_domain_with_id() > or something) which has the additional parameter. Then you can rewrite > iommu_attach_domain(): > > iommu_attach_domai(...) > { > return iommu_attach_domain_with_id(..., -1); > } > > This way you don't have to update all the callers of > iommu_attach_domain() and the interface is more readable. > > > Joerg > That's a good way. I will do this in next version. Thanks Zhenhua