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

Re: [Xen-devel] [PATCH v9 13/15] tools/libxc: noarch restore code



On 15/04/15 12:42, Ian Campbell wrote:
> On Fri, 2015-04-10 at 18:16 +0100, Andrew Cooper wrote:
>> +/**
>> + * Reads a record from the stream, and fills in the record structure.
> Doesn't look to be a structured comment of any sort, so only one *
> needed on the opening.
>
>> + * Given a list of pfns, their types, and a block of page data from the
>> + * stream, populate and record their types, map the relevent subset and copy
> relevant.
>
> With those two nits addressed:
>
> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>
>> +    for ( i = 0; i < count; ++i )
>> +    {
>> +        ctx->restore.ops.set_page_type(ctx, pfns[i], types[i]);
>> +
>> +        switch ( types[i] )
>> +        {
>> +        case XEN_DOMCTL_PFINFO_NOTAB:
> For my own enlightenment:
>
> What is in a NOTAB page and is it correct to uncanonicalise it?

Notab is a regular plain ram page.  I think the name refers to "not a
pagetable".

This loop is working out which guest frames to map, so data can be
memcpy()'d in.  It is a larger set than the pages which subsequently get
uncanonicalised.

~Andrew

>
>> +
>> +        case XEN_DOMCTL_PFINFO_L1TAB:
>> +        case XEN_DOMCTL_PFINFO_L1TAB | XEN_DOMCTL_PFINFO_LPINTAB:
>> +
>> +        case XEN_DOMCTL_PFINFO_L2TAB:
>> +        case XEN_DOMCTL_PFINFO_L2TAB | XEN_DOMCTL_PFINFO_LPINTAB:
>> +
>> +        case XEN_DOMCTL_PFINFO_L3TAB:
>> +        case XEN_DOMCTL_PFINFO_L3TAB | XEN_DOMCTL_PFINFO_LPINTAB:
>> +
>> +        case XEN_DOMCTL_PFINFO_L4TAB:
>> +        case XEN_DOMCTL_PFINFO_L4TAB | XEN_DOMCTL_PFINFO_LPINTAB:
>> +
>> +            mfns[nr_pages++] = ctx->restore.ops.pfn_to_gfn(ctx, pfns[i]);
>> +            break;
>> +        }
>> +    }


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


 


Rackspace

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