aboutsummaryrefslogtreecommitdiff
path: root/target-unicore32/cpu.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-01-20 11:43:30 +0100
committerAndreas Färber <afaerber@suse.de>2013-02-01 01:35:21 +0100
commit88e28512efd8d36476e50a78acb1dca8b41a3cf1 (patch)
tree817090e797171454bd9f3390c054267298b555b8 /target-unicore32/cpu.c
parent6b2578d678497dbce44ed7999d269fc973ae6e8f (diff)
target-unicore32: Mark as unmigratable
CPU_SAVE_VERSION 2 was bogus as both save and load would just throw a hw_error(). Therefore we can without problems suppress registration of "cpu_common" VMState by dropping CPU_SAVE_VERSION define and provide an unmigratable "cpu" VMStateDescription for UniCore32CPU at device level instead, where we can attach this the QOM way. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'target-unicore32/cpu.c')
-rw-r--r--target-unicore32/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c
index c120440653..18ef1c5dad 100644
--- a/target-unicore32/cpu.c
+++ b/target-unicore32/cpu.c
@@ -14,6 +14,7 @@
#include "cpu.h"
#include "qemu-common.h"
+#include "migration/vmstate.h"
static inline void set_feature(CPUUniCore32State *env, int feature)
{
@@ -96,11 +97,18 @@ static void uc32_cpu_initfn(Object *obj)
tlb_flush(env, 1);
}
+static const VMStateDescription vmstate_uc32_cpu = {
+ .name = "cpu",
+ .unmigratable = 1,
+};
+
static void uc32_cpu_class_init(ObjectClass *oc, void *data)
{
+ DeviceClass *dc = DEVICE_CLASS(oc);
CPUClass *cc = CPU_CLASS(oc);
cc->class_by_name = uc32_cpu_class_by_name;
+ dc->vmsd = &vmstate_uc32_cpu;
}
static void uc32_register_cpu_type(const UniCore32CPUInfo *info)