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

Re: [Xen-devel] [PATCH V2] xen: Check if the range is valid in init_domheap_pages





On 11/13/2013 02:12 PM, Jan Beulich wrote:
On 13.11.13 at 14:34, Julien Grall <julien.grall@xxxxxxxxxx> wrote:

I'm not following: If ps == pe and they're page aligned, then

     smfn = round_pgup(ps) >> PAGE_SHIFT;
     emfn = round_pgdown(pe) >> PAGE_SHIFT;

produces smfn == emfn. So as said earlier - emfn = smfn - 1 requires
the input to either be not page aligned, or pe < ps, both of which look
invalid to me.

Right, my fault I didn't pay attention that ps and pe is non-aligned, with the same value. That will result to my previous assertion.

In any case, init_domheap_pages seems to be able to handle non-aligned address. Otherwise round_pg{up,down} is not necessary.

--
Julien Grall

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