From patchwork Fri Feb 1 00:44:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 217312 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AD1042C0291 for ; Fri, 1 Feb 2013 11:45:28 +1100 (EST) Received: from localhost ([::1]:38638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U14kw-0002AV-O6 for incoming@patchwork.ozlabs.org; Thu, 31 Jan 2013 19:45:26 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U14kb-0001yn-Sb for qemu-devel@nongnu.org; Thu, 31 Jan 2013 19:45:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U14kZ-0004o2-GI for qemu-devel@nongnu.org; Thu, 31 Jan 2013 19:45:05 -0500 Received: from cantor2.suse.de ([195.135.220.15]:34408 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U14kZ-0004mi-7q for qemu-devel@nongnu.org; Thu, 31 Jan 2013 19:45:03 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id B3103A3B99; Fri, 1 Feb 2013 01:45:02 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2013 01:44:30 +0100 Message-Id: <1359679480-32356-3-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359679480-32356-1-git-send-email-afaerber@suse.de> References: <1359679480-32356-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: "Edgar E. Iglesias" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Juan Quintela Subject: [Qemu-devel] [PATCH 02/12] target-microblaze: Mark as unmigratable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org cpu_{save,load} were no-ops, so de facto it is unmigratable and no backwards compatibility to keep. Therefore mark the MicroBlazeCPU as unmigratable at device level the QOM way and suppress "cpu_common" VMState registration by dropping CPU_SAVE_VERSION. Signed-off-by: Juan Quintela Signed-off-by: Andreas Färber Reviewed-by: Juan Quintela --- target-microblaze/Makefile.objs | 2 +- target-microblaze/cpu.c | 9 +++++++++ target-microblaze/cpu.h | 2 -- target-microblaze/machine.c | 11 ----------- 4 Dateien geändert, 10 Zeilen hinzugefügt(+), 14 Zeilen entfernt(-) delete mode 100644 target-microblaze/machine.c diff --git a/target-microblaze/Makefile.objs b/target-microblaze/Makefile.objs index afb87bc..985330e 100644 --- a/target-microblaze/Makefile.objs +++ b/target-microblaze/Makefile.objs @@ -1,2 +1,2 @@ obj-y += translate.o op_helper.o helper.o cpu.o -obj-$(CONFIG_SOFTMMU) += mmu.o machine.o +obj-$(CONFIG_SOFTMMU) += mmu.o diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 0f858fd..39230fd 100644 --- a/target-microblaze/cpu.c +++ b/target-microblaze/cpu.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "qemu-common.h" +#include "migration/vmstate.h" /* CPUClass::reset() */ @@ -94,13 +95,21 @@ static void mb_cpu_initfn(Object *obj) set_float_rounding_mode(float_round_nearest_even, &env->fp_status); } +static const VMStateDescription vmstate_mb_cpu = { + .name = "cpu", + .unmigratable = 1, +}; + static void mb_cpu_class_init(ObjectClass *oc, void *data) { + DeviceClass *dc = DEVICE_CLASS(oc); CPUClass *cc = CPU_CLASS(oc); MicroBlazeCPUClass *mcc = MICROBLAZE_CPU_CLASS(oc); mcc->parent_reset = cc->reset; cc->reset = mb_cpu_reset; + + dc->vmsd = &vmstate_mb_cpu; } static const TypeInfo mb_cpu_type_info = { diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h index 5621068..41480e7 100644 --- a/target-microblaze/cpu.h +++ b/target-microblaze/cpu.h @@ -307,8 +307,6 @@ static inline CPUMBState *cpu_init(const char *cpu_model) #define cpu_gen_code cpu_mb_gen_code #define cpu_signal_handler cpu_mb_signal_handler -#define CPU_SAVE_VERSION 1 - /* MMU modes definitions */ #define MMU_MODE0_SUFFIX _nommu #define MMU_MODE1_SUFFIX _kernel diff --git a/target-microblaze/machine.c b/target-microblaze/machine.c deleted file mode 100644 index 1be1c35..0000000 --- a/target-microblaze/machine.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "hw/hw.h" -#include "hw/boards.h" - -void cpu_save(QEMUFile *f, void *opaque) -{ -} - -int cpu_load(QEMUFile *f, void *opaque, int version_id) -{ - return 0; -}