From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH] libxl: refactor toolstack save restore code
Date: Fri, 5 Jun 2015 18:46:35 +0100 [thread overview]
Message-ID: <5571E07B.1040007@citrix.com> (raw)
In-Reply-To: <1433523702-4540-1-git-send-email-wei.liu2@citrix.com>
On 05/06/15 18:01, Wei Liu wrote:
> This patch does following things:
> 1. Document v1 format.
> 2. Factor out function to handle QEMU restore data and function to
> handle v1 blob for restore path.
> 3. Refactor save function to generate different blobs in the order
> specified in format specification.
> 4. Change functions to use "goto out" idiom.
>
> No functional changes introduced.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
> I wrote this patch when exploring the idea of have toolstack save / restore v2
> to record max pages information. Though that idea has been abandon it wouldn't
> hurt to have clearer code structure and documentation.
> ---
> tools/libxl/libxl_dom.c | 247 +++++++++++++++++++++++++++++-------------------
> 1 file changed, 150 insertions(+), 97 deletions(-)
>
> diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> index 867172a..23c4691 100644
> --- a/tools/libxl/libxl_dom.c
> +++ b/tools/libxl/libxl_dom.c
> @@ -1032,6 +1032,15 @@ struct libxl__physmap_info {
> char name[];
> };
>
> +/* Bump version every time when toolstack saved data changes.
> + * Different types of data are arranged in the specified order.
> + *
> + * Version 1:
> + * uint32_t version
> + * QEMU physmap data:
> + * uint32_t count
> + * libxl__physmap_info * count
> + */
Ah fantastic - this was some information which IanJ asked me to detail
in the libxl v2 stream spec, and I had not gotten around to working out
yet. (Current handling was just to pass it verbatim back to libxl.)
It is probably the kind of thing which needs splitting into appropriate
v2 records, rather than having a structured binary blob inside a
structered stream, both defined for the same library.
OOI, why does libxl need to send this information for Qemu? We don't
have any equivalent in XenServer.
~Andrew
next prev parent reply other threads:[~2015-06-05 17:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 17:01 [PATCH] libxl: refactor toolstack save restore code Wei Liu
2015-06-05 17:46 ` Andrew Cooper [this message]
2015-06-05 18:15 ` Wei Liu
2015-06-08 11:23 ` George Dunlap
2015-06-17 10:36 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5571E07B.1040007@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.