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

Re: [Xen-devel] [PATCH] Rlibxl: refuse to try and migrate an HVM guest using qemu-xen



On Mon, 2012-07-23 at 11:52 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH] Rlibxl: refuse to try and migrate an HVM 
> guest using qemu-xen"):
> > diff -r d29a88850da2 -r c6a2abdee84d tools/libxl/libxl.c
> > --- a/tools/libxl/libxl.c   Mon Jul 02 12:06:22 2012 +0100
> > +++ b/tools/libxl/libxl.c   Mon Jul 02 12:13:25 2012 +0100
> > @@ -746,6 +746,22 @@ int libxl_domain_suspend(libxl_ctx *ctx,
> ...
> > +        switch (libxl__device_model_version_running(gc, domid)) {
> > +        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
> > +            LOG(ERROR,
> > +                "cannot live migrate HVM domains with qemu-xen 
> > device-model");
> > +            rc = ERROR_FAIL;
> > +            goto out_err;
> > +        case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL:
> > +            /* No problem */
> > +            break;
> > +        default:
> > +            rc = ERROR_FAIL;
> > +            goto out_err;
> > +        }
> 
> This last case should abort() or log something or not exist.

I think
        case -1:
                rc = ERROR_FAIL
                goto out_err;
        default: abort()

would be OK for 4.2. libxl__device_model_version_running either returns
-1 (and logs) or a valid LIBXL_DEVICE_MODEL_VERSION_* so the only thing
to catch is a new LIBXL_DEVICE_MODEL_VERSION_*, in which case an abort()
seems appropriate since it would be a bug to not handle it here.

Possibly -1 ought to become LIBXL_DEVICE_MODEL_VERSION_INVALID too

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