diff mbox

[RFC,v2,16/16] Add vmstate_cpu_common BER type code and wire it in.

Message ID 1398271069-22057-17-git-send-email-dgilbert@redhat.com
State New
Headers show

Commit Message

Dr. David Alan Gilbert April 23, 2014, 4:37 p.m. UTC
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 docs/specs/migration.schema | 8 +++++++-
 exec.c                      | 2 ++
 include/qapi/ber.h          | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/docs/specs/migration.schema b/docs/specs/migration.schema
index e72c575..c899b08 100644
--- a/docs/specs/migration.schema
+++ b/docs/specs/migration.schema
@@ -15,6 +15,11 @@  QemuString ::= UTF8String (SIZE (1..255))
 
 -- Types for specific devices --
 
+VMState-CPU-Common ::= [ APPLICATION 20000 ] SEQUENCE {
+  halted            INTEGER,
+  interrupt-request INTEGER
+}
+
 --------------------------------
 
 -- Types for RAM
@@ -78,7 +83,8 @@  VMStateEntries ::= CHOICE {
 }
 
 VMState ::= CHOICE {
-  vmstateentries  SEQUENCE OF VMStateEntries
+  vmstateentries  SEQUENCE OF VMStateEntries,
+  cpucommon       VMState-CPU-Common
 }
 
 -- Restrict to unsigned?
diff --git a/exec.c b/exec.c
index 91513c6..e2f3907 100644
--- a/exec.c
+++ b/exec.c
@@ -23,6 +23,7 @@ 
 #endif
 
 #include "qemu-common.h"
+#include "qapi/ber.h"
 #include "cpu.h"
 #include "tcg.h"
 #include "hw/hw.h"
@@ -427,6 +428,7 @@  static int cpu_common_post_load(void *opaque, int version_id)
 
 const VMStateDescription vmstate_cpu_common = {
     .name = "cpu_common",
+    .ber_tag = BER_TYPE_QEMU_VMSTATE_CPU_COMMON,
     .version_id = 1,
     .minimum_version_id = 1,
     .minimum_version_id_old = 1,
diff --git a/include/qapi/ber.h b/include/qapi/ber.h
index 04cef4e..af9f18f 100644
--- a/include/qapi/ber.h
+++ b/include/qapi/ber.h
@@ -100,6 +100,7 @@  typedef enum ber_type_tag {
 
 
     /* Specific VMState types */
+    BER_TYPE_QEMU_VMSTATE_CPU_COMMON = 20000,
 } BERTypeTag;
 
 typedef enum ber_length {