From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Ross Lagerwall <ross.lagerwall@citrix.com>
Subject: [PATCH VERY RFC 2/5] tools/libxl: Stream v2 format
Date: Wed, 3 Sep 2014 18:14:08 +0100 [thread overview]
Message-ID: <1409764451-13053-3-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1409764451-13053-1-git-send-email-andrew.cooper3@citrix.com>
From: Ross Lagerwall <ross.lagerwall@citrix.com>
TODO: Namespacing
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
tools/libxl/libxl_saverestore.h | 47 +++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 tools/libxl/libxl_saverestore.h
diff --git a/tools/libxl/libxl_saverestore.h b/tools/libxl/libxl_saverestore.h
new file mode 100644
index 0000000..31a22d6
--- /dev/null
+++ b/tools/libxl/libxl_saverestore.h
@@ -0,0 +1,47 @@
+#ifndef LIBXL_SAVERESTORE_H
+#define LIBXL_SAVERESTORE_H
+
+#include <stdint.h>
+
+/* Definitions for LibXenLight Domain Image Format version 2 */
+struct restore_hdr
+{
+ uint64_t ident;
+ uint32_t version;
+ uint32_t options;
+};
+
+struct restore_rec_hdr
+{
+ uint32_t type;
+ uint32_t length;
+};
+
+struct restore_emulator_hdr
+{
+ uint32_t id;
+ uint32_t index;
+};
+
+#define REC_TYPE_END 0x00000000U
+#define REC_TYPE_DOMAIN_JSON 0x00000001U
+#define REC_TYPE_LIBXC_CONTEXT 0x00000002U
+#define REC_TYPE_XENSTORE_DATA 0x00000003U
+#define REC_TYPE_EMULATOR_CONTEXT 0x00000004U
+
+/* All records must be aligned up to an 8 octet boundary */
+#define REC_ALIGN_ORDER 3U
+
+#define ROUNDUP(_x,_w) (((unsigned long)(_x)+(1UL<<(_w))-1) & ~((1UL<<(_w))-1))
+
+#define EMULATOR_UNKNOWN 0x00000000U
+#define EMULATOR_QEMU_TRADITIONAL 0x00000001U
+#define EMULATOR_QEMU_UPSTREAM 0x00000002U
+
+#define RESTORE_STREAM_IDENT 0x4c6962786c466d74UL
+#define RESTORE_STREAM_VERSION 0x00000002U
+
+#define RESTORE_OPT_BIG_ENDIAN (1 << 0)
+#define RESTORE_OPT_LEGACY (1 << 1)
+
+#endif
--
1.7.10.4
next prev parent reply other threads:[~2014-09-03 17:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 17:14 [PATCH VERY RFC 0/5] Libxl migration v2 support Andrew Cooper
2014-09-03 17:14 ` [PATCH VERY RFC 1/5] tools/libxl: Add support for writing a set of buffers asynchronously Andrew Cooper
2014-09-04 1:28 ` Wen Congyang
2014-09-03 17:14 ` Andrew Cooper [this message]
2014-09-03 17:14 ` [PATCH VERY RFC 3/5] tools/libxl: Implement libxl_domain_restore() for v2 streams Andrew Cooper
2014-09-03 17:14 ` [PATCH VERY RFC 4/5] tools/xl: Restore v2 streams using new libxl_domain_restore() interface Andrew Cooper
2014-09-03 17:14 ` [PATCH VERY RFC 5/5] tools/[lib]xl: Alter libxl_domain_suspend() to write a v2 stream 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=1409764451-13053-3-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=ross.lagerwall@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).