[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v02 1/7] arm: introduce remoteprocessor iommu module



On Wed, 20 Aug 2014, Andrii Tseglytskyi wrote:
> Hi Stefano,
> 
> 
> On Fri, Jul 4, 2014 at 4:59 PM, Stefano Stabellini
> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> > On Thu, 26 Jun 2014, Andrii Tseglytskyi wrote:
> >> This is a fisrst patch from patch series which was
> >> developed to handle remote (external) processors
> >> memory management units. Remote processors are
> >> typically used for graphic rendering (GPUs) and
> >> high quality video decoding (IPUs). They are typically
> >> installed on such multimedia SoCs as OMAP4 / OMAP5.
> >>
> >> As soon as remoteprocessor MMU typically works with
> >> pagetables filled by physical addresses, which are
> >> allocated by domU kernel, it is almost impossible to
> >> use them under Xen, intermediate physical addresses
> >> allocated by kernel, need to be translated to machine
> >> addresses.
> >>
> >> This patch introduces a simple framework to perform
> >> pfn -> mfn translation for external MMUs.
> >> It introduces basic data structures and algorithms
> >> needed for translation.
> >>
> >> Typically, when MMU is configured, some it registers
> >> are updated by new values. Introduced frameworks
> >> uses traps as starting point of remoteproc MMUs
> >> pagetables translation.
> >>
> >> Change-Id: Ia4d311a40289df46a003f5ae8706c150bee1885d
> >> Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@xxxxxxxxxxxxxxx>
> >
> > There is one problem with this patch: you need to find a way to "pin"
> > the p2m entries for the pfns and mfns found in the pagetables translated
> > by remoteproc_iommu.c.  Otherwise Xen might decide to change the pfn to
> > mfn mappings for the domain, breaking the pagetables already translated
> > by remoteproc_iommu.c.  pfn to mfn mappings are not guaranteed to be
> > stable. At the moment Xen on ARM wouldn't change pfn to mfn mappings
> > under the guest feet, but features like memory sharing or swapping,
> > supported on x86, could cause it to happen.
> >
> > In the past I tried to introduce a way to "pin the mappings, but never
> > finished to upstream the patches, because it didn't need it anymore.
> >
> >
> > Give a look at:
> >
> > http://marc.info/?l=xen-devel&m=138029864707973
> >
> > In particular you would need to introduce something like
> > the pin function and call it from mmu_translate_pagetable.
> >
> 
> What if I try your series and re-send it if helpful for me? Can you
> link me to its latest code?

Yeah, it might be useful to update my old series and integrate it into
yours.  You probably don't need the two hypercalls, just the pin and
unpin functions.  The link above points to the latest version of it.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.