|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 10/10] (lib)xl: soft reset support
On Wed, 2015-05-27 at 17:25 +0200, Vitaly Kuznetsov wrote:
> Perform soft reset when a domain did SHUTDOWN_soft_reset. Migrate the
> content with xc_domain_soft_reset(), reload dm and toolstack.
>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
> ---
> Changes in v7:
> - Save toolstack earlier.
> - Introduce LIBXL_HAVE_SOFT_RESET [Wei Liu]
> ---
> docs/man/xl.cfg.pod.5 | 12 +++++
> tools/libxl/libxl.c | 4 ++
> tools/libxl/libxl.h | 14 +++++
> tools/libxl/libxl_create.c | 119
> +++++++++++++++++++++++++++++++++++++++----
> tools/libxl/libxl_internal.h | 26 ++++++++++
> tools/libxl/libxl_types.idl | 3 ++
> tools/libxl/xl.h | 1 +
> tools/libxl/xl_cmdimpl.c | 33 +++++++++++-
> 8 files changed, 201 insertions(+), 11 deletions(-)
>
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index 8e4154f..ced5cc0 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -368,6 +368,13 @@ destroy the domain.
> write a "coredump" of the domain to F</var/xen/dump/NAME> and then
> restart the domain.
>
> +=item B<soft-reset>
> +
> +create a new domain with the same configuration, reassign all the domain's
> +memory to this new domain, kill the original domain, and continue execution
s/this/a/ I think?
> @@ -1529,20 +1545,67 @@ static void domcreate_destruction_cb(libxl__egc *egc,
> typedef struct {
> libxl__domain_create_state dcs;
> uint32_t *domid_out;
> + libxl__domain_destroy_state dds;
> + uint8_t *toolstack_buf;
> + uint32_t toolstack_len;
I think a libxl__domain_soft_reset_state would be appropriate here,
perhaps containing the app_domain_create_state rather than adding all
the fields next to it.
> } libxl__app_domain_create_state;
> [...]
> @@ -1550,12 +1613,34 @@ static int do_domain_create(libxl_ctx *ctx,
> libxl_domain_config *d_config,
> libxl_domain_config_init(&cdcs->dcs.guest_config_saved);
> libxl_domain_config_copy(ctx, &cdcs->dcs.guest_config_saved, d_config);
> cdcs->dcs.restore_fd = restore_fd;
> + cdcs->dcs.domid_soft_reset = domid_soft_reset;
> cdcs->dcs.callback = domain_create_cb;
> cdcs->dcs.checkpointed_stream = checkpointed_stream;
> libxl__ao_progress_gethow(&cdcs->dcs.aop_console_how, aop_console_how);
> cdcs->domid_out = domid;
Since the backend of this function has very little in common between the
create and soft/reset cases, perhaps refactor the first half into a new
function to initialise a cdcs to be called by do_domain_create and the
soft reset function, the latter of which would go on to do the body of
the following if here.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |