From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v9 13/15] tools/libxc: noarch restore code Date: Wed, 15 Apr 2015 12:42:12 +0100 Message-ID: <1429098132.15516.223.camel@citrix.com> References: <1428686167-8279-1-git-send-email-andrew.cooper3@citrix.com> <1428686167-8279-14-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1428686167-8279-14-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , Ian Jackson , Xen-devel List-Id: xen-devel@lists.xenproject.org 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 > + 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? > + > + 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; > + } > + }