[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: skip first page when RAM starts at 0x0
>>> On 27.04.19 at 01:47, <sstabellini@xxxxxxxxxx> wrote: > The other change to nr_pdxs is less obvious. It is clear that nr_pdxs is > calculated wrongly in this case (memory 0-0x80000000, > 0x800000000-0x880000000, ps=0, pe=0x880000000): nr_pdxs=524288 which is > half the number we need (the correct number is 1048575). > > Taking a line from the x86 code xen/arch/x86/setup.c:setup_max_pdx > (Julien's suggestion): > > max_pdx = pfn_to_pdx(top_page - 1) + 1; > > I changed nr_pdxs to > > nr_pdxs = pfn_to_pdx((pe >> PAGE_SHIFT) - 1) + 1; > > and it works. I think the change is correct because looking at the > implementation of pfn_to_pdx it is certainly meant to operate on a pfn > masking bits on it to compensate for the holes. It is not meant to work > on a size. > > Jan, does it look correct to you too? Yes. pfn_to_pdx() and friends may only ever be passed actual PFNs / PDXes, not something that's one above or one below a valid range. I share Julien's question though: Was it really mere luck that things have been working to date? Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |