From: Ian Campbell Subject: Re: [PATCH v3 08/13] xen/passthrough: iommu: Basic support of device tree assignment Date: Wed, 19 Mar 2014 10:12:51 +0000 Message-ID: <1395223971.10203.39.camel@kazak.uk.xensource.com> References: <1394552999-14171-1-git-send-email-julien.grall@linaro.org> <1394552999-14171-9-git-send-email-julien.grall@linaro.org> <1395160425.11824.11.camel@kazak.uk.xensource.com> <5328A296.8030301@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQDUX-00012t-Pi for xen-devel@lists.xenproject.org; Wed, 19 Mar 2014 10:12:58 +0000 In-Reply-To: <5328A296.8030301@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, Jan Beulich , tim@xen.org, Xiantao Zhang , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-03-18 at 19:46 +0000, Julien Grall wrote: > Hi Ian, > > On 03/18/2014 04:33 PM, Ian Campbell wrote: > > On Tue, 2014-03-11 at 15:49 +0000, Julien Grall wrote: > >> Add IOMMU helpers to support device tree assignment/deassignment. This patch > >> introduces 2 new fields in the dt_device_node: > >> - is_protected: Does the device is protected by an IOMMU > >> - next_assigned: Pointer to the next device assigned to the same > >> domain > > > > Am I correct that this list is not maintained for dom0? The behaviour of > > dt_assign_device and dt_deassign_device seems to rely on it? > > DOM0 will call dt_assign_device for every device protected by the IOMMU > (see patch #9). So it will itself have a list maintained. Does this not mean that iommu_assign_dt_device will refuse to assign the device to another domain (next_assigned list is not empty). BTW, next_assigned is not a very good name for this list, since the "nextness" is abstracted away. Consider just device_list. Ian.