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

Re: [Embedded-pv-devel] [Xen-devel] [PATCH RFC 06/18] libxl: parse config data during domain reboot



On Wed, May 18, 2016 at 07:32:29PM +0300, Andrii Anisov wrote:
> From: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx>
> 
> We need to parse config data during domain reboot
> to get correct I/O memory regions for mapping.
> 
> Signed-off-by: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx>
> ---
>  tools/libxl/xl_cmdimpl.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 28d57c3..98a46bc 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -2988,6 +2988,21 @@ start:
>                      d_config.c_info.name = strdup(common_domname);
>                  }
>  
> +             if (config_file) {
> +                 libxl_domain_config_init(&d_config);
> +
> +                 ret = libxl_read_file_contents(ctx, config_file,
> +                                                &config_data, &config_len);
> +                 if (ret) {
> +                     LOG("Failed to read config file: %s: %s\n",
> +                         config_file, strerror(errno));
> +                     goto out;
> +                 }
> +
> +                 parse_config_data(config_file, config_data, config_len,
> +                                   &d_config);
> +             }
> +

I think libxl has already preserve the configuration for you?

This will break device hotplug I think.

Wei.

>                  /*
>                   * XXX FIXME: If this sleep is not there then domain
>                   * re-creation fails sometimes.
> -- 
> 2.8.2
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Embedded-pv-devel mailing list
Embedded-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/embedded-pv-devel

 


Rackspace

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