[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 2/2] x86/mm: drop unmapping from marking-as-I/O in arch_init_memory()
On Mon, Aug 11, 2025 at 12:50:23PM +0200, Jan Beulich wrote: > The unmapping part would have wanted to cover UNUSABLE regions as well, > and it would now have been necessary for space outside the low 16Mb > (wherever Xen is placed). However, with everything up to the next 2Mb > boundary now properly backed by RAM, we don't need to unmap anything > anymore: Space up to __2M_rwdata_end[] is properly reserved, whereas > space past that mark (up to the next 2Mb boundary) is ordinary RAM. Oh, I see, so this was done to unmap trailing space when the Xen image region is mapped using 2M pages. > While there, limit the scopes of involved variables. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > --- > v2: Drop unmapping code altogether. > > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -275,8 +275,6 @@ static void __init assign_io_page(struct > > void __init arch_init_memory(void) > { > - unsigned long i, pfn, rstart_pfn, rend_pfn, iostart_pfn, ioend_pfn; > - > /* > * Basic guest-accessible flags: > * PRESENT, R/W, USER, A/D, AVAIL[0,1,2], AVAIL_HIGH, NX (if > available). > @@ -292,12 +290,17 @@ void __init arch_init_memory(void) > * case the low 1MB. > */ > BUG_ON(pvh_boot && trampoline_phys != 0x1000); > - for ( i = 0; i < 0x100; i++ ) > + for ( unsigned int i = 0; i < MB(1) >> PAGE_SHIFT; i++ ) I would use PFN_DOWN() rather than the shift, but that's just my preference. Thanks, Roger.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |