All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCH for-4.6 v2 2/6] docs/libxl: Re-specify XENSTORE_DATA as EMULATOR_XENSTORE_DATA
Date: Tue, 4 Aug 2015 10:40:38 +0100	[thread overview]
Message-ID: <1438681238.31129.68.camel@citrix.com> (raw)
In-Reply-To: <1438617395-20329-3-git-send-email-andrew.cooper3@citrix.com>

On Mon, 2015-08-03 at 16:56 +0100, Andrew Cooper wrote:
> The legacy "toolstack" record as implemented in libxl turns out not to
> be 32/64bit safe.  As migration v2 has not shipped yet, take this
> opportunity to adjust the specification and fix the incompatibility.
> 
> Libxl shall loose all knowledge of the old "toolstack" blob and use this
> EMULATOR_XENSTORE_DATA record instead.  Compatibility shall be handled
> by the legacy conversion script.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> 
> v2:
>  * More adjustments to the libxl spec.
>  * Make the emulator id/index table common and move it up beside the
>    record type/length table.
>  * Be more specific about the format and encoding of the xenstore
>    key/value data.
>  * Add a note about the unspecified nature of the emulator context blob.
> ---
>  docs/specs/libxl-migration-stream.pandoc   |   83 ++++++++++++++++++++--
> ------
>  tools/libxl/libxl_sr_stream_format.h       |   11 ++--
>  tools/python/scripts/convert-legacy-stream |    2 +-
>  tools/python/xen/migration/legacy.py       |   40 +++++++++++++-
>  tools/python/xen/migration/libxl.py        |   71 +++++++++++++++++-----
> --
>  tools/python/xen/migration/tests.py        |    2 +-
>  6 files changed, 155 insertions(+), 54 deletions(-)
> 
> diff --git a/docs/specs/libxl-migration-stream.pandoc b/docs/specs/libxl
> -migration-stream.pandoc
> index cdec168..85adbf0 100644
> --- a/docs/specs/libxl-migration-stream.pandoc
> +++ b/docs/specs/libxl-migration-stream.pandoc
> @@ -90,8 +90,8 @@ i386, x86_64, or arm host.
>  \clearpage
>  
>  
> -Records
> -=======
> +Record Overview
> +===============
>  
>  A record has a record header, type specific data and a trailing footer. 
>  If
>  `length` is not a multiple of 8, the body is padded with zeroes to align 
> the
> @@ -113,7 +113,7 @@ type         0x00000000: END
>  
>               0x00000001: LIBXC_CONTEXT
>  
> -             0x00000002: XENSTORE_DATA
> +             0x00000002: EMULATOR_XENSTORE_DATA
>  
>               0x00000003: EMULATOR_CONTEXT
>  
> @@ -135,6 +135,39 @@ padding      0 to 7 octets of zeros to pad the whole 
> record to a multiple
>  
>  \clearpage
>  
> +Emulator Records
> +----------------
> +
> +Several records are specifically for emulators, and have a common sub 
> header.

It would be useful to mention in the specific records which have this
header that they do, I think.

> +
> +     0     1     2     3     4     5     6     7 octet
> +    +------------------------+------------------------+
> +    | emulator_id            | index                  |
> +    +------------------------+------------------------+
> +    | record specific data                            |
> +    ...
> +    +-------------------------------------------------+
> +
> +--------------------------------------------------------------------
> +Field            Description
> +------------     ---------------------------------------------------
> +emulator_id      0x00000000: Unknown (In the case of a legacy stream)
> +
> +                 0x00000001: Qemu Traditional
> +
> +                 0x00000002: Qemu Upstream
> +
> +                 0x00000003 - 0xFFFFFFFF: Reserved for future emulators.
> +
> +index            Index of this emulator for the domain, if multiple
> +                 emulators are in use.

This is old wording, but what value does this take if no emulators are in
use? If the answer is "undefined" then I suppose there is a field somewhere
else which indicates the number of emulators?

  reply	other threads:[~2015-08-04  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 15:56 [PATCH for-4.6 v2 0/6] Fix libxl TOOLSTACK records for migration v2 Andrew Cooper
2015-08-03 15:56 ` [PATCH for-4.6 v2 1/6] tools/libxl: Make libxl__conversion_helper_abort() safe to use Andrew Cooper
2015-08-04  9:30   ` Ian Campbell
2015-08-03 15:56 ` [PATCH for-4.6 v2 2/6] docs/libxl: Re-specify XENSTORE_DATA as EMULATOR_XENSTORE_DATA Andrew Cooper
2015-08-04  9:40   ` Ian Campbell [this message]
2015-08-04  9:42     ` Andrew Cooper
2015-08-04 10:06       ` Ian Campbell
2015-08-04 10:16         ` Andrew Cooper
2015-08-03 15:56 ` [PATCH for-4.6 v2 3/6] tools/libxl: Save and restore EMULATOR_XENSTORE_DATA content Andrew Cooper
2015-08-04  9:55   ` Ian Campbell
2015-08-03 15:56 ` [PATCH for-4.6 v2 4/6] tools/libxl: Prepare to write multiple records with EMULATOR headers Andrew Cooper
2015-08-04  9:59   ` Ian Campbell
2015-08-03 15:56 ` [PATCH for-4.6 v2 5/6] libxl/save&restore&convert: Switch to new EMULATOR_XENSTORE_DATA records Andrew Cooper
2015-08-03 15:56 ` [PATCH for-4.6 v2 6/6] tools/libxl: Drop all legacy "toolstack" record infrastructure Andrew Cooper

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=1438681238.31129.68.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.