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.coop...@citrix.com>

Acked-by: Ian Campbell <ian.campb...@citrix.com>

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@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to