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

Re: [Xen-devel] [PATCH v6 08/10] xen/arm: Add relinquish_p2m_mapping to remove reference on every mapped page



On Tue, 2013-12-17 at 16:58 +0000, Julien Grall wrote:

> > If this function finds any non-present first or second level PTE then it
> > will stop and exit (goto out), meaning it will miss any mappings which
> > are higher up after the hole.
> >
> > e.g. if you have a guest p2m with RAM at 0-2M and 4-6M then
> > relinquishing 0-6M will only actually free 0-2M, then abort on 4-6M.
> >
> > Perhaps this could be fixed by making relinquish_p2m_mapping loop over
> > the address space relinquishing 2M chunks as it goes? This would
> remove
> > the need for the if ( op == RELINQUISH && .. && prempt() ) stuff,
> > because you could add the preempt in that loop.
> 
> I think you are wrong:
>       - every first pte exists. We return NULL in case of the address is very
> high.
>         - if the second pte doesn't exist, we will create it (if it
> fails we go out).

Oops, I misread the code, sorry. I think you are correct.

> For the last item, I think it's a bit stupid to create table if we are
> removing/relinquish mapping. But I think it's an improvement for later.
> There are lots of improvement to do in this function (eg: flushing).

Agreed.

Ian.


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