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

Re: [Xen-devel] [PATCH v2] libxc: try to find last used pfn when migrating



On Wed, 2015-12-02 at 16:30 +0100, Juergen Gross wrote:
> On 02/12/15 16:28, Ian Campbell wrote:
> > On Wed, 2015-12-02 at 12:36 +0000, Andrew Cooper wrote:
> > > On 02/12/15 07:42, Juergen Gross wrote:
> > > > diff --git a/tools/libxc/xc_sr_save_x86_hvm.c
> > > > b/tools/libxc/xc_sr_save_x86_hvm.c
> > > > index cdee774..3c879ed 100644
> > > > --- a/tools/libxc/xc_sr_save_x86_hvm.c
> > > > +++ b/tools/libxc/xc_sr_save_x86_hvm.c
> > > > @@ -135,6 +135,20 @@ static int x86_hvm_normalise_page(struct
> > > > xc_sr_context *ctx,
> > > > Âstatic int x86_hvm_setup(struct xc_sr_context *ctx)
> > > > Â{
> > > > ÂÂÂÂÂxc_interface *xch = ctx->xch;
> > > > +ÂÂÂÂxen_pfn_t nr_pfns;
> > > > +
> > > > +ÂÂÂÂif ( xc_domain_nr_gpfns(xch, ctx->domid, &nr_pfns) < 0 )
> > > > +ÂÂÂÂ{
> > > > +ÂÂÂÂÂÂÂÂPERROR("Unable to obtain the guest p2m size");
> > > > +ÂÂÂÂÂÂÂÂreturn -1;
> > > > +ÂÂÂÂ}
> > > > +ÂÂÂÂif ( nr_pfns > ~XEN_DOMCTL_PFINFO_LTAB_MASK )
> > > > +ÂÂÂÂ{
> > > > +ÂÂÂÂÂÂÂÂPERROR("Cannot save this big a guest");
> > > 
> > > Strictly speaking to match the moved code, this should set errno =
> > > E2BIG.
> > > 
> > > However, the error handling in libxc is in a dire state, and the
> > > error
> > > message is retained, which is the important point.
> > > 
> > > Entire patch Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> > > with
> > > or without the errno tweaks.
> > 
> > I could make the errno tweak on commit, if there is agreement.
> 
> Sure, go ahead.

Now done, sorry for the delay... distractions...

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