From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 12/13] xen/arm: Add the property "protected-devices" in the hypervisor node Date: Fri, 04 Apr 2014 11:39:47 +0100 Message-ID: <533E8BF3.1060305@linaro.org> References: <1394552999-14171-1-git-send-email-julien.grall@linaro.org> <1394552999-14171-13-git-send-email-julien.grall@linaro.org> <1395161280.11824.21.camel@kazak.uk.xensource.com> <5328A7E3.3070402@linaro.org> <1395225206.10203.43.camel@kazak.uk.xensource.com> <533DD7C7.8090803@linaro.org> <1396604406.4211.179.camel@kazak.uk.xensource.com> <533E887F.9050106@linaro.org> <1396607282.4211.188.camel@kazak.uk.xensource.com> 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 1WW1XK-0004qX-4R for xen-devel@lists.xenproject.org; Fri, 04 Apr 2014 10:39:50 +0000 Received: by mail-wi0-f175.google.com with SMTP id cc10so965091wib.8 for ; Fri, 04 Apr 2014 03:39:48 -0700 (PDT) In-Reply-To: <1396607282.4211.188.camel@kazak.uk.xensource.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: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 04/04/2014 11:28 AM, Ian Campbell wrote: > On Fri, 2014-04-04 at 11:25 +0100, Julien Grall wrote: >> On 04/04/2014 10:40 AM, Ian Campbell wrote: >> >>> We really need to be able to manage this transition in a compatible way, >>> that means new kernels working on old hypervisors as well as old kernels >>> working on new hypervisors (it's obviously fine for this case to bounce >>> when it doesn't need to). >> >> It's not possible because a same platform can have both protected and >> non-protected devices. The Linux has to know in some way if the DMA has >> to be program with IPA or PA. > > Then there must be a negotiation between Xen and the Linux kernel so Xen > can know which case to apply. > > e.g. if the kernel does not advertise support for protected devices then > Xen must act as if no IOMMU was present. How the kernel can say "I'm supporting IOMMU"? New hypercall? Xen has to program the IOMMU quite early (e.g before Linux is booting and use the protected device). Backporting my patch series to support protected devices is not a big deal. What about disabling IOMMU by default on ARM until a good support is made in Linux? -- Julien Grall