From: Hongyang Yang <yanghy@cn.fujitsu.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: [Patch v6 01/13] docs: libxc migration stream specification
Date: Tue, 8 Jul 2014 11:53:50 +0800 [thread overview]
Message-ID: <53BB6B4E.30802@cn.fujitsu.com> (raw)
In-Reply-To: <1404754682-28379-2-git-send-email-andrew.cooper3@citrix.com>
On 07/08/2014 01:37 AM, Andrew Cooper wrote:
> Add the specification for a new migration stream format. The document
> includes all the details but to summarize:
>
> The existing (legacy) format is dependant on the word size of the
> toolstack. This prevents domains from migrating from hosts running
> 32-bit toolstacks to hosts running 64-bit toolstacks (and vice-versa).
>
> The legacy format lacks any version information making it difficult to
> extend in compatible way.
>
> The new format has a header (the image header) with version information,
> a domain header with basic information of the domain and a stream of
> records for the image data.
>
> The format will be used for future domain types (such as on ARM).
>
> The specification is pandoc format (an extended markdown format) and the
> documentation build system is extended to support pandoc format documents.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
>
> ---
> v6:
> * Add pandoc -> txt/html conversion
> * Spelling fixes
> * Introduce SAVING_CPU record
> ---
> docs/Makefile | 11 +-
> docs/specs/libxc-migration-stream.pandoc | 677 ++++++++++++++++++++++++++++++
> 2 files changed, 687 insertions(+), 1 deletion(-)
...snip...
> +
> +VERIFY
> +------
> +
> +A verify record indicates that, while all memory has now been sent, the sender
> +shall send further memory records for debugging purposes.
> +
> + 0 1 2 3 4 5 6 7 octet
> + +-------------------------------------------------+
> +
> +The verify record contains no fields; its body_length is 0.
> +
> +\clearpage
> +
> +SAVING\_CPU
> +----------
> +
> +A saving cpu record provides a human readable representation of the CPU on
> +which the guest was saved.
> +
> + 0 1 2 3 4 5 6 7 octet
> + +------------------------+------------------------+
> + | 7bit ASCII String |
> + ...
> + +-------------------------------------------------+
> +
> +The information is purely informative as it doesn't directly affect how to
> +save or restore the guest, but in the case of an error on restoration may help
> +to narrow down the issue.
> +
> +x86 architecutres use the _CPUID_ 48 character processor brand string.
> +
> +\clearpage
> +
> +Layout
> +======
> +
> +The set of valid records depends on the guest architecture and type.
> +
> +x86 PV Guest
> +------------
> +
> +An x86 PV guest image will have this order of records:
> +
> +1. Image header
> +2. Domain header
> +3. X86\_PV\_INFO record
> +4. X86\_PV\_P2M\_FRAMES record
> +5. Many PAGE\_DATA records
> +6. TSC\_INFO
> +7. SHARED\_INFO record
> +8. VCPU context records for each online VCPU
> + a. X86\_PV\_VCPU\_BASIC record
> + b. X86\_PV\_VCPU\_EXTENDED record
> + c. X86\_PV\_VCPU\_XSAVE record
> + d. X86\_PV\_VCPU\_MSRS record
> +9. END record
> +
> +x86 HVM Guest
> +-------------
> +
> +1. Image header
> +2. Domain header
> +3. Many PAGE\_DATA records
> +4. TSC\_INFO
> +5. HVM\_CONTEXT
> +6. HVM\_PARAMS
> +
do VERIFY/SAVING_CPU records should be document here?
Although they are optional, we may need to know in which order
when they are included...
> +
> +Legacy Images (x86 only)
> +========================
> +
> +Restoring legacy images from older tools shall be handled by
> +translating the legacy format image into this new format.
> +
> +It shall not be possible to save in the legacy format.
> +
> +There are two different legacy images depending on whether they were
> +generated by a 32-bit or a 64-bit toolstack. These shall be
> +distinguished by inspecting octets 4-7 in the image. If these are
> +zero then it is a 64-bit image.
> +
> +Toolstack Field Value
> +--------- ----- -----
> +64-bit Bit 31-63 of the p2m_size field 0 (since p2m_size < 2^32^)
> +32-bit extended-info chunk ID (PV) 0xFFFFFFFF
> +32-bit Chunk type (HVM) < 0
> +32-bit Page count (HVM) > 0
> +
> +Table: Possible values for octet 4-7 in legacy images
> +
> +This assumes the presence of the extended-info chunk which was
> +introduced in Xen 3.0.
> +
> +
> +Future Extensions
> +=================
> +
> +All changes to the image or domain headers require the image version
> +to be increased.
> +
> +The format may be extended by adding additional record types.
> +
> +Extending an existing record type must be done by adding a new record
> +type. This allows old images with the old record to still be
> +restored.
> +
> +The image header may only be extended by _appending_ additional
> +fields. In particular, the `marker`, `id` and `version` fields must
> +never change size or location.
>
--
Thanks,
Yang.
next prev parent reply other threads:[~2014-07-08 3:53 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 17:37 [PATCH v6 0/13] Migration Stream v2 Andrew Cooper
2014-07-07 17:37 ` [Patch v6 01/13] docs: libxc migration stream specification Andrew Cooper
2014-07-08 3:53 ` Hongyang Yang [this message]
2014-07-08 8:48 ` Andrew Cooper
2014-07-08 8:59 ` Hongyang Yang
2014-07-08 9:36 ` David Vrabel
2014-07-08 10:48 ` Andrew Cooper
2014-07-07 17:37 ` [Patch v6 02/13] tools/python: Scripts relating to migrationv2 streams Andrew Cooper
2014-07-28 15:20 ` Ian Campbell
2014-07-28 15:38 ` Andrew Cooper
2014-07-28 15:58 ` Ian Campbell
2014-07-29 13:55 ` Jon Ludlam
2014-07-07 17:37 ` [Patch v6 03/13] [HACK] tools/libxc: save/restore v2 framework Andrew Cooper
2014-07-07 17:37 ` [Patch v6 04/13] tools/libxc: C implementation of stream format Andrew Cooper
2014-07-07 17:37 ` [Patch v6 05/13] tools/libxc: noarch common code Andrew Cooper
2014-07-07 17:37 ` [Patch v6 06/13] tools/libxc: x86 " Andrew Cooper
2014-07-07 17:37 ` [Patch v6 07/13] tools/libxc: x86 PV " Andrew Cooper
2014-07-07 17:37 ` [Patch v6 08/13] tools/libxc: x86 PV save code Andrew Cooper
2014-07-07 17:37 ` [Patch v6 09/13] tools/libxc: x86 PV restore code Andrew Cooper
2014-07-07 17:37 ` [Patch v6 10/13] tools/libxc: x86 HVM save code Andrew Cooper
2014-07-07 17:38 ` [Patch v6 11/13] tools/libxc: x86 HVM restore code Andrew Cooper
2014-07-18 14:38 ` Wen Congyang
2014-07-18 15:09 ` Andrew Cooper
2014-07-18 15:42 ` Paul Durrant
2014-07-18 16:13 ` Wen Congyang
2014-07-07 17:38 ` [Patch v6 12/13] tools/libxc: noarch save code Andrew Cooper
2014-07-07 17:38 ` [Patch v6 13/13] tools/libxc: noarch restore code Andrew Cooper
2014-07-08 10:50 ` [PATCH v6 0/13] Migration Stream v2 David Vrabel
2014-07-08 11:10 ` Ian Campbell
2014-07-08 16:35 ` Konrad Rzeszutek Wilk
2014-07-08 17:35 ` Andrew Cooper
2014-07-09 6:01 ` Hongyang Yang
2014-07-09 9:40 ` Andrew Cooper
2014-07-09 15:27 ` Konrad Rzeszutek Wilk
2014-07-10 10:19 ` Andrew Cooper
2014-07-28 15:01 ` Ian Campbell
2014-07-28 15:02 ` Andrew Cooper
2014-07-28 15:20 ` 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=53BB6B4E.30802@cn.fujitsu.com \
--to=yanghy@cn.fujitsu.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=andrew.cooper3@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.