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

Re: [Xen-devel] [PATCH v5] x86/setup: properly update PTEs if src/dst overlaps when relocating Xen image



>>> On 19.04.18 at 11:28, <daniel.kiper@xxxxxxxxxx> wrote:
> On Wed, Apr 18, 2018 at 10:00:53AM -0600, Jan Beulich wrote:
>> >>> On 18.04.18 at 12:26, <daniel.kiper@xxxxxxxxxx> wrote:
>> > @@ -1019,6 +1020,12 @@ void __init noreturn __start_xen(unsigned long 
>> > mbi_p)
>> >              bootsym(trampoline_xen_phys_start) = e;
>> >
>> >              /*
>> > +             * All PTEs with PFNs above pte_update_limit
>> > +             * were updated earlier. Skip them.
>> > +             */
>> > +            pte_update_limit = PFN_DOWN(e + XEN_IMG_OFFSET);
>>
>> I don't understand the comment: No PTE updates happen before this point
>> afaict. It is just that PTEs pointing above that address are not candidates
>> for relocation. I think the comment should at least mention the overlap
>> scenario your trying to deal with, with the important point being that there
>> may actually be PTEs pointing into [e, e + XEN_IMG_OFFSET).
> 
> What do you think about that:
> 
>   All PTEs pointing above that address are not candidates for relocation.
>   Due to possibility of partial overlap of the end of source image and the
>   beginning of region for destination image some PTEs may point to
>   addresses in range [e, e + XEN_IMG_OFFSET).

SGTM.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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