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

Re: [Xen-devel] [PATCH v4 13/17] libxc: arm: allow passing a device tree blob to the guest



On Wed, 13 Nov 2013, Ian Campbell wrote:
> On Tue, 2013-11-12 at 19:37 +0000, Stefano Stabellini wrote:
> > On Tue, 12 Nov 2013, Ian Campbell wrote:
> > > @@ -916,6 +950,25 @@ int xc_dom_build_image(struct xc_dom_image *dom)
> > >              memcpy(ramdiskmap, dom->ramdisk_blob, dom->ramdisk_size);
> > >      }
> > >  
> > > +    /* load devicetree */
> > > +    if ( dom->devicetree_blob )
> > > +    {
> > > +        void *devicetreemap;
> > > +
> > > +        if ( xc_dom_alloc_segment(dom, &dom->devicetree_seg, 
> > > "devicetree",
> > > +                                  dom->devicetree_seg.vstart,
> > > +                                  dom->devicetree_size) != 0 )
> > > +            goto err;
> > > +        devicetreemap = xc_dom_seg_to_ptr(dom, &dom->devicetree_seg);
> > > +        if ( devicetreemap == NULL )
> > > +        {
> > > +            DOMPRINTF("%s: xc_dom_seg_to_ptr(dom, &dom->devicetree_seg) 
> > > => NULL",
> > > +                      __FUNCTION__);
> > > +            goto err;
> > > +        }
> > > +        memcpy(devicetreemap, dom->devicetree_blob, 
> > > dom->devicetree_size);
> > 
> > flush dcache?
> 
> We don't do so for the initrd or the kernel image

Considering that the guest doesn't have paging enabled at this point
(the guest doesn't even exist yet), I wonder if it is actually safe.
But you are right, we have the same problem in Xen.


> and in any case this
> is user space (and common code) so I don't know how we can do so.

Linux offers an __ARM_NR_cacheflush syscall, it is implemented as a
dcache flush on v7.


> IIRC Julien was working on a generic solution for this issue.
 
What is the generic solution?

_______________________________________________
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®.