On 12.08.2025 18:30, Roger Pau Monné wrote:
> 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 <jbeul...@suse.com>
> 
> Acked-by: Roger Pau Monné <roger....@citrix.com>

Thanks.

>> @@ -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.

Oh, yes, fine with me.

Jan

Reply via email to