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

Re: [Xen-devel] [PATCH v9 08/15] tools/libxc: x86 PV save code



On Fri, 2015-04-10 at 18:16 +0100, Andrew Cooper wrote:
> Save the x86 PV specific parts of a domain.  This is the X86_PV_INFO record,
> the P2M_FRAMES, the X86_PV_SHARED_INFO, the three different VCPU context
> records, and the MSR records.
> 
> The normalise_page callback used by the common code when writing the PAGE_DATA
> records, converts MFNs in page tables to PFNs.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>

With one question:

> +#ifdef __x86_64__
> +            /* 64bit toolstack, 32bit guest.  Expand any INVALID_MFN. */
> +            uint32_t s = ((uint32_t *)src)[x];
> +
> +            dst[x] = s == ~0U ? INVALID_MFN : s;
> +#else
> +            /* 32bit toolstack, 64bit guest.  Truncate their pointers */
> +            dst[x] = ((uint64_t *)src)[x];
> +#endif

Would it not be better to propagate an error instead of truncating? Or
at least log the first instance of such?

Ian.


_______________________________________________
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®.