From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanb@linux.vnet.ibm.com, quintela@redhat.com,
mdroth@linux.vnet.ibm.com, agraf@suse.de, mst@redhat.com,
aliguori@amazon.com, afaerber@suse.de
Subject: [Qemu-devel] [RFC PATCH 14/16] Start some BER format docs
Date: Tue, 25 Mar 2014 20:17:25 +0000 [thread overview]
Message-ID: <1395778647-30925-15-git-send-email-dgilbert@redhat.com> (raw)
In-Reply-To: <1395778647-30925-1-git-send-email-dgilbert@redhat.com>
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Add information on the QEMUFile/Visitor/VMState split
Describe how to verify a BER stream against the schema
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
docs/migration.txt | 34 ++++++++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/docs/migration.txt b/docs/migration.txt
index 0e0a1d4..894abf3 100644
--- a/docs/migration.txt
+++ b/docs/migration.txt
@@ -48,8 +48,17 @@ This is used for RAM and block devices. It is not yet ported to vmstate.
=== What is the common infrastructure ===
-QEMU uses a QEMUFile abstraction to be able to do migration. Any type
-of migration that wants to use QEMU infrastructure has to create a
+Migration consists of a number of layers that handle different parts of the
+problem:
+ QEMUFile - Buffering/reading/writing data without worrying about it's
+ contents. Versions exist for file I/O, sockets, RDMA and
+ to put data into a QEMU Block device.
+ Visitor - Visitors format data onto the QEMUFile. A binary format and
+ a BER format currently exist.
+ VMState - Represent the structure of the data for a given device with
+ support for versioning.
+
+Any type of migration that wants to use QEMU infrastructure has to create a
QEMUFile with:
QEMUFile *qemu_fopen_ops(void *opaque,
@@ -296,3 +305,24 @@ save/send this state when we are in the middle of a pio operation
(that is what ide_drive_pio_state_needed() checks). If DRQ_STAT is
not enabled, the values on that fields are garbage and don't need to
be sent.
+
+ASN.1/BER format migration
+==========================
+
+In BER format migration the migration stream is described by an ASN.1 schema
+(that's defined in docs/specs/migration.schema).
+
+The 'asn1c' program can be used to validate a migration stream against the schema
+ - although it'll probably use a lot of memory doing it - so it's best to do it
+with a small RAM image.
+
+To validate an image against the schema:
+ a) Make a temporary directory and cd into it
+ b) asn1c -fcompound-names /path/to/migration.schema
+ c) make -f Makefile.am.sample CFLAGS+="-DPDU=QemuFile -DEMIT_ASN_DEBUG=1 -I."
+ d) ./progname -iber log.ber -d 2> debug > decoding
+
+ If it's happy the 'decoding' output should be an XML like dump of the input file;
+if it's not happy, the debug file might help you find out why (Search backwards
+from the end for the first 'Freeing' to find the point at which it detected something
+bad).
--
1.8.5.3
next prev parent reply other threads:[~2014-03-25 20:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 20:17 [Qemu-devel] [RFC PATCH 00/16] visitor+BER migration format Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 01/16] Visitor: Add methods for migration format use Dr. David Alan Gilbert (git)
2014-06-05 17:00 ` Markus Armbruster
2014-06-05 17:43 ` Dr. David Alan Gilbert
2014-06-05 18:59 ` Dr. David Alan Gilbert
2014-06-06 8:19 ` Markus Armbruster
2014-06-06 11:44 ` Dr. David Alan Gilbert
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 02/16] QEMUSizedBuffer/QEMUFile Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 03/16] qemu-file: Add set/get tmp_visitor Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 04/16] Header/constant/types fixes for visitors Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 05/16] Visitor: Binary compatible output visitor Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 06/16] Visitor: Debug " Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 07/16] Visitor: Binary compatible input visitor Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 08/16] Visitor: Output path Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 09/16] Visitor: Load path Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 10/16] Visitor: Common types to use visitors Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 11/16] Choose output visitor based on env variable Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 12/16] BER Visitor: Create output visitor Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 13/16] BER Visitor: Create input visitor Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` Dr. David Alan Gilbert (git) [this message]
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 15/16] ASN.1 schema for new migration format Dr. David Alan Gilbert (git)
2014-03-25 20:17 ` [Qemu-devel] [RFC PATCH 16/16] Wire in BER visitors Dr. David Alan Gilbert (git)
2014-03-25 20:43 ` [Qemu-devel] [RFC PATCH 00/16] visitor+BER migration format Michael S. Tsirkin
2014-03-26 9:16 ` Dr. David Alan Gilbert
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=1395778647-30925-15-git-send-email-dgilbert@redhat.com \
--to=dgilbert@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=aliguori@amazon.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanb@linux.vnet.ibm.com \
/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).