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

Re: [Xen-devel] [PATCH] xen/setup: Don't relocate p2m/initrd over existing one



On 12/12/16 09:28, Ross Lagerwall wrote:
> On 12/12/2016 08:19 AM, Juergen Gross wrote:
>> On 09/12/16 16:50, Ross Lagerwall wrote:
>>> When relocating the p2m/initrd, take special care not to relocate it so
>>> that is overlaps with the current location of the p2m/initrd. This is
>>> needed since the full extent of the current location is not marked as a
>>> reserved region in the e820 (and it shouldn't be since it is about to be
>>> moved).
>>>
>>> This was seen to happen to a dom0 with a large initial p2m and a small
>>> reserved region in the middle of the initial p2m.
>>>
>>> Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
>>
>> Wouldn't it be more natural to memblock_reserve() the hypervisor
>> supplied p2m list even in case of an E820 conflict and do a
>> memblock_free() of that region after moving the p2m list in
>> xen_relocate_p2m() ?
>>
>> This would avoid the need to supply a range to avoid for memory
>> allocation when calling xen_find_free_area(), which is pointless in the
>> initrd case (the original initrd area is already reserved via
>> memblock_reserve() ).
>>
> 
> I'm not familiar with the code, but I was concerned that if part of the
> hypervisor-supplied p2m was already reserved by memblock_reserve(), then
> the above approach would remove it when memblock_free is called. If this
> is not a valid concern, then I can send a patch to do it.

If this would be the case we'd be in trouble: after moving the p2m list
to another location nobody should reference the old p2m list as it might
be located at a position to be remapped due to E820 memory map
constraints.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.