qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v2 16/16] Add vmstate_cpu_common BER type code a


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [RFC PATCH v2 16/16] Add vmstate_cpu_common BER type code and wire it in.
Date: Wed, 23 Apr 2014 17:37:49 +0100

From: "Dr. David Alan Gilbert" <address@hidden>

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

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 {
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]