On 16.12.2022 12:48, Julien Grall wrote: > From: Hongyan Xia <[email protected]> > > This avoids the assumption that there is a direct map and boot pages > fall inside the direct map. > > Clean up the variables so that mfn actually stores a type-safe mfn. > > Signed-off-by: Hongyan Xia <[email protected]> > Signed-off-by: Julien Grall <[email protected]>
Reviewed-by: Jan Beulich <[email protected]> (obviously remains valid across ... > --- a/xen/common/numa.c > +++ b/xen/common/numa.c > @@ -424,13 +424,13 @@ static int __init populate_memnodemap(const struct node > *nodes, > static int __init allocate_cachealigned_memnodemap(void) > { > unsigned long size = PFN_UP(memnodemapsize * sizeof(*memnodemap)); > - unsigned long mfn = mfn_x(alloc_boot_pages(size, 1)); > + mfn_t mfn = alloc_boot_pages(size, 1); > > - memnodemap = mfn_to_virt(mfn); > - mfn <<= PAGE_SHIFT; > + memnodemap = vmap_contig_pages(mfn, size); ... a possible rename of this function) Jan
