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

Re: [Xen-devel] [PATCH v5 7/9] libxc: introduce soft reset for HVM domains

On Thu, 2014-12-11 at 14:45 +0100, Vitaly Kuznetsov wrote:
> Add new xc_domain_soft_reset() function which performs so-called 'soft reset'
> for an HVM domain. It is being performed in the following way:
> - Save HVM context and all HVM params;
> - Devour original domain with XEN_DOMCTL_devour;
> - Wait till original domain dies or has no pages left;
> - Restore HVM context, HVM params, seed grant table.

Are any of these operations "slow", per the definition under 'Machinery
for asynchronous operations ("ao")' in libxl_internal.h? "Wait till
original domain dies" sounds like it might be.

That might have implications for the use of this functionality from

> +    xc_hvm_param_get(xch, source_dom, HVM_PARAM_IDENT_PT,
> +                     &hvm_params[HVM_PARAM_IDENT_PT]);

There's quite a risk of the set of HVM parameters retrieved getting out
of sync, either with the hypervisor or with the sets done below.

I don't know if any part of the migration infrastructure (specifically
Andy Cooper's v2 stuff, or some of the underlying hypercalls) could be
reused here to pickle/unpickle the state?

Other possibilities:

A new hypercall pair to get/set all hvm params.

An list of params to save/restore locally here, which would at least
stop the get/set parts gettuing out of sync, but doesn't help with the
hypervisor getting out of sync (and therefore would not be my preferred

Also this function needs to take arch specifics into account.

> +    while ( 1 )
> +    {
> +        sleep(SLEEP_INT);
> +        if ( xc_get_tot_pages(xch, source_dom) <= 0 )
> +        {
> +            DPRINTF("All pages were transferred");
> +            break;
> +        }
> +    }

I think we are going to need to find a better solution than this.

Changing the nature of the hypercall as I suggested in a previous reply
would also remove this, so I'll wait for a verdict on that before
worrying about this bit any further.
> [...]

> +            PERROR("Faled to perform soft reset, destroying domain %d",



Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.