From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 00/33] xen/arm: Add support for non-PCI passthrough Date: Fri, 20 Mar 2015 17:34:34 +0000 Message-ID: <550C5A2A.2070504@linaro.org> References: <1426793399-6283-1-git-send-email-julien.grall@linaro.org> <20150320012230.GG23658@toto> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" 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 1YZ0og-0003Zo-8o for xen-devel@lists.xenproject.org; Fri, 20 Mar 2015 17:34:38 +0000 Received: by wetk59 with SMTP id k59so87538675wet.3 for ; Fri, 20 Mar 2015 10:34:36 -0700 (PDT) In-Reply-To: <20150320012230.GG23658@toto> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Edgar E. Iglesias" Cc: ian.campbell@citrix.com, manish.jaggi@caviumnetworks.com, tim@xen.org, robert.vanvossen@dornerworks.com, stefano.stabellini@citrix.com, suravee.suthikulpanit@amd.com, Josh.Whitehead@dornerworks.com, xen-devel@lists.xenproject.org, andrii.tseglytskyi@globallogic.com List-Id: xen-devel@lists.xenproject.org On 20/03/2015 01:22, Edgar E. Iglesias wrote: > Hi Julien, Hello Edgar, > The partial device-tree support is nice and very flexible. I couldn't help > thinking that it would be nice to be able to describe more of the > guest with device-trees. It may be controversial but it would be cool > to be able to go: > > xl create my-guest.dtb While it would be feasible to move some part of the IRQ/MMIO pass-thru in the device tree, there is some configuration options (such as the vif, the kernel...) that can't be easily be described in the configuration file. > A more down-to earth thing I ran into is that on the ZynqMP, the Cortex-A53 > is setup to have 40 bits physical addresses. Our SMMU announces support > for up to 48bit input addresses (but can be configured for 40bits > aswell). > > When XEN sets up passthrough for a dev, it probes the SMMU for the > max input address size and uses that as the input size for the > context. But because XEN reuses the page tables from p2m for the > SMMU, we end up in a miss-match. > > I haven't looked at the details of how to fix but my gut feeling > is that we should be re-using the input size of the stage 2 > page-tables as the input-size for the SMMU. > And only use the max input size of the SMMU to assert that it > is big enough. I may be missing something though. > The code in question is at the end of arm_smmu_device_cfg_probe(), > already merged. You are right, we should take into account the size of the CPU physical address. Re-using the input size of the stage 2 page-tables seems the best solution. Although, if I'm not mistaken, I have the inverse problem on one of our board. I.e the input-size of the SMMU is too small. I need to double check. Regards, -- Julien Grall