[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 13/16] Start some BER format docs
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [RFC PATCH v2 13/16] Start some BER format docs |
Date: |
Wed, 23 Apr 2014 17:37:46 +0100 |
From: "Dr. David Alan Gilbert" <address@hidden>
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 <address@hidden>
---
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.9.0
- [Qemu-devel] [RFC PATCH v2 01/16] Visitor: Add methods for migration format use, (continued)
- [Qemu-devel] [RFC PATCH v2 01/16] Visitor: Add methods for migration format use, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 02/16] QEMUSizedBuffer/QEMUFile, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 06/16] Visitor: Binary compatible output visitor, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 03/16] QEMUFilePart: A shim to read part of a file, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 05/16] Header/constant/types fixes for visitors, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 07/16] Visitor: Binary compatible input visitor, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 09/16] Visitor: Load path, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 10/16] Visitor: Common types to use visitors, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 11/16] BER Visitor: Create output visitor, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 14/16] ASN.1 schema for new migration format, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 13/16] Start some BER format docs,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [RFC PATCH v2 16/16] Add vmstate_cpu_common BER type code and wire it in., Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 04/16] qemu-file: Add set/get tmp_visitor, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 08/16] Visitor: Output path, Dr. David Alan Gilbert (git), 2014/04/23
- [Qemu-devel] [RFC PATCH v2 12/16] BER Visitor: Create input visitor, Dr. David Alan Gilbert (git), 2014/04/23
- Re: [Qemu-devel] [RFC PATCH v2 00/16] visitor+BER migration format, Eric Blake, 2014/04/23