From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 12/13] xen/iommu: smmu: Add Xen specific code to be able to use the driver Date: Mon, 02 Feb 2015 23:01:02 +0000 Message-ID: <54D001AE.1020000@linaro.org> References: <1422643768-23614-1-git-send-email-julien.grall@linaro.org> <1422643768-23614-13-git-send-email-julien.grall@linaro.org> <54CFC82A.4090500@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YIPzO-0002Wt-4A for xen-devel@lists.xenproject.org; Mon, 02 Feb 2015 23:01:06 +0000 Received: by mail-wi0-f169.google.com with SMTP id h11so18949664wiw.0 for ; Mon, 02 Feb 2015 15:01:04 -0800 (PST) In-Reply-To: <54CFC82A.4090500@caviumnetworks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Manish , xen-devel@lists.xenproject.org Cc: tim@xen.org, stefano.stabellini@citrix.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Hello Manish, On 02/02/2015 18:55, Manish wrote: > A general comment, Please avoid top post. > master->of_node is used as a unique value in the rb_tree. In case of > pci_passthrough devices are enumerated and not present in device tree, > so I would have to remove the rb_tree and replace with a linked list. Clearly no. There is no big change necessary in the code. Think that Linux is able to handle PCI with master->of_node. So why Xen has to be different? In case of PCI, master is attached to a root bus. Every root buses are described in the device tree so they are associated to a device node. I have added few TODOs (just search TODO) in the code where you should plumb to support PCI. Any change outside is by default wrong. The TODOs are: * dev_get_dev_node: you have to find the root bus and return the device node. * arm_smmu_add_device: You have to get the stream IDs associate to it and store it in the PCI device IOMMU data. Regards, -- Julien Grall