qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
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 15/16] ASN.1 schema for new migration format
Date: Tue, 25 Mar 2014 20:17:26 +0000	[thread overview]
Message-ID: <1395778647-30925-16-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>

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 docs/specs/migration.schema | 113 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)
 create mode 100644 docs/specs/migration.schema

diff --git a/docs/specs/migration.schema b/docs/specs/migration.schema
new file mode 100644
index 0000000..d433127
--- /dev/null
+++ b/docs/specs/migration.schema
@@ -0,0 +1,113 @@
+-- Copyright 2014 Red Hat, Inc. and/or its affiliates
+--
+-- Authors:
+--   Dave Gilbert <dgilbert@redhat.com>
+--
+-- This work is licensed under the terms of the GNU LGPL, version 2 or later.
+-- See the COPYING.LIB file in the top-level directory.
+
+Qemu {}
+DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+
+-- Some basic types used in multiple places --
+QemuString ::= UTF8String (SIZE (1..255))
+
+-- TODO: 4096 is actually page size whatever that is
+FullPage ::= OCTET STRING (SIZE (4096))
+
+-- Types for specific devices --
+
+VMState-CPU-Common ::= [ APPLICATION 20000 ] SEQUENCE {
+  halted            INTEGER,
+  interrupt-request INTEGER
+}
+
+--------------------------------
+
+RAMBlockID ::= SEQUENCE {
+  name   QemuString,
+  len    INTEGER
+}
+
+RAMSecEntry ::= [ APPLICATION 8914 ] SEQUENCE {
+  addr         INTEGER,   -- Address or offset or size
+  flags        INTEGER,   -- maybe more explicit type?
+  name         QemuString OPTIONAL,
+
+  body         CHOICE {
+    bl         SEQUENCE OF RAMBlockID,
+    compr      INTEGER (0..255), -- Page filled with this value
+    page       FullPage
+    -- TODO xbzrle --
+  }
+}
+
+RAMSecList ::= [ APPLICATION 9810 ] SEQUENCE OF RAMSecEntry
+
+SubSection ::= [ APPLICATION 10707 ] SEQUENCE {
+  name         QemuString,
+  versionid    INTEGER,
+
+  contents     SEQUENCE OF VMStateEntries
+}
+
+SubSecList ::= [ APPLICATION 10700 ] SEQUENCE OF SubSection
+
+VMStateEntries ::= CHOICE {
+  -- Hmm need to think more --
+  array       SEQUENCE OF VMStateEntries,
+  bool        BOOLEAN,
+  int         INTEGER,
+  oldblob     OCTET STRING,
+  subsecl     SubSecList
+}
+
+VMState ::= CHOICE {
+  SEQUENCE OF VMStateEntries,
+
+  VMState-CPU-Common
+}
+
+-- Restrict to unsigned?
+SectionID ::= INTEGER
+
+SecFull ::= [ APPLICATION 2003 ] SEQUENCE {
+  name         QemuString,
+  sectionid    SectionID,
+  instanceid   INTEGER,
+  versionid    INTEGER,
+
+  contents     CHOICE {
+    ramsec     RAMSecList,
+    -- TODO other iterator initial stuff --
+    vmstate    VMState,
+    oldblob  OCTET STRING
+  }
+}
+
+SecMin ::= [ APPLICATION 211 ] SEQUENCE {
+  sectionid   SectionID,
+
+  contents     CHOICE {
+    ramsec     RAMSecList
+    -- TODO other iterator general/end stuff --
+  }
+}
+
+Sections ::= CHOICE {
+  full    SecFull,
+  min     SecMin
+}
+
+-- The whole file --
+-- Application tag used to get first 32bits of file
+-- to come out as 7f cd c5 51  - the 51 is Q
+-- the c5 and cd being E,M but with the top bit set
+-- which BER requires
+QemuFile ::= [ APPLICATION 1270481 ] SEQUENCE {
+  version INTEGER (3),
+  top     SEQUENCE OF Sections
+}
+
+END
-- 
1.8.5.3

  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 ` [Qemu-devel] [RFC PATCH 14/16] Start some BER format docs 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 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-16-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).