From: Ian Campbell Subject: Re: [PATCH v3 12/13] xen/arm: Add the property "protected-devices" in the hypervisor node Date: Fri, 4 Apr 2014 14:18:57 +0100 Message-ID: <1396617537.4211.233.camel@kazak.uk.xensource.com> 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> <533E8BF3.1060305@linaro.org> <1396608481.4211.196.camel@kazak.uk.xensource.com> <533E9109.5030509@linaro.org> <1396610010.4211.204.camel@kazak.uk.xensource.com> <533E9619.7030809@linaro.org> <1396615521.4211.218.camel@kazak.uk.xensource.com> <533EAF35.4060804@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1WW41i-0003r8-Uz for xen-devel@lists.xenproject.org; Fri, 04 Apr 2014 13:19:23 +0000 In-Reply-To: <533EAF35.4060804@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, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, 2014-04-04 at 14:10 +0100, Julien Grall wrote: > On 04/04/2014 01:45 PM, Ian Campbell wrote: > > On Fri, 2014-04-04 at 12:23 +0100, Julien Grall wrote: > >> On 04/04/2014 12:13 PM, Ian Campbell wrote: > >>> We could enable both of those things only at the point where vm_assist > >>> was called. > >> > >> [..] > >> > >>> I think we can reasonably require that vm_assist be called super early, > >>> i.e. before any DMA operations occur, in Linux terms I think > >>> early_initcall(xen_guest_init) is likely early enough, or we could move > >>> xen_guestr_init even sooner. > >> > >> IHMO, this solution is far too complicate and we will have to fork from > >> the current IOMMU framework. > > > > Eh? On the Linux side? You just call this hypercall super early so that > > you are sure no drivers have initialised yet and you are done, there is > > no need to fork anything AFAICT. And in any case if any generic > > framework needs extending to better work with Xen then we should do > > that, not fork it or make a worse design to sidestep the need. > > > > Obviously there will be complexity on the Xen side, but I think far too > > complicated will be an overstatement. > > I was talking about Xen side. The current IOMMU platform would need some > rework to support it. > > For me this solution is far too complicate compare to the other > solutions (e.g ELF note). > > > > >>> We also have the option of a build time feature flag in the image itself > >>> like on x86. It is likely that going forward we will have other cases > >>> where we wished we had such a thing so getting it in place now would be > >>> useful. > >> > >> I definitely prefer this solution which seems more cleaner than the others. > >> > >> Is it possible to embedded notes in a zImage? How x86 handle other > >> format than ELF? > > > > The x86 bzImage format embeds an ELF file, which something which was > > done long ago to improve things for Xen PV x86 use which wants to boot > > an ELF. > > > > ARM zImage doesn't currently have anything like that so you would be > > looking at an image format extension. > > Ok. So it will be easy to add support for ELF image. However for zImage, > do you think Linux ARM maintainers will accept a change in the format? I've no idea. I'm 100% positive that they will require it to be done in a backwards compatible way. I don't know how amenable the zImage format is to such extensions. On x86 IIRC the kexec people were interested in being able to get an ELF out of a bzImage, you might find that the same is true on ARM, which might help with motivating the change. Ian.