From patchwork Sun Jan 31 19:19:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 576242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 528B7140BBF for ; Mon, 1 Feb 2016 06:20:44 +1100 (AEDT) Received: from localhost ([::1]:42907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPxYA-0004FV-CJ for incoming@patchwork.ozlabs.org; Sun, 31 Jan 2016 14:20:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPxXa-00034v-AE for qemu-devel@nongnu.org; Sun, 31 Jan 2016 14:20:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPxXV-00058O-AN for qemu-devel@nongnu.org; Sun, 31 Jan 2016 14:20:06 -0500 Received: from s16892447.onlinehome-server.info ([82.165.15.123]:52576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPxXV-00058K-4U; Sun, 31 Jan 2016 14:20:01 -0500 Received: from host86-175-36-142.range86-175.btcentralplus.com ([86.175.36.142] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1aPxXS-0005Ro-Dv; Sun, 31 Jan 2016 19:19:59 +0000 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, agraf@suse.de, david@gibson.dropbear.id.au, aik@ozlabs.ru Date: Sun, 31 Jan 2016 19:19:36 +0000 Message-Id: <1454267976-27242-4-git-send-email-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1454267976-27242-1-git-send-email-mark.cave-ayland@ilande.co.uk> References: <1454267976-27242-1-git-send-email-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 86.175.36.142 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines 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 Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_newworld.c | 4 ++++ hw/ppc/mac_oldworld.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index f95086b..3283f1d 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -179,6 +179,7 @@ static void ppc_core99_init(MachineState *machine) int *token = g_new(int, 1); hwaddr nvram_addr = 0xFFF04000; uint64_t tbfreq; + PPCTimebase *tb; linux_boot = (kernel_filename != NULL); @@ -201,6 +202,9 @@ static void ppc_core99_init(MachineState *machine) /* Set time-base frequency to 100 Mhz */ cpu_ppc_tb_init(env, TBFREQ); qemu_register_reset(ppc_core99_reset, cpu); + + tb = g_malloc0(sizeof(PPCTimebase)); + vmstate_register(NULL, -1, &vmstate_ppc_timebase, tb); } /* allocate RAM */ diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 8984398..45e410b 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -104,6 +104,7 @@ static void ppc_heathrow_init(MachineState *machine) DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; void *fw_cfg; uint64_t tbfreq; + PPCTimebase *tb; linux_boot = (kernel_filename != NULL); @@ -121,6 +122,9 @@ static void ppc_heathrow_init(MachineState *machine) /* Set time-base frequency to 16.6 Mhz */ cpu_ppc_tb_init(env, TBFREQ); qemu_register_reset(ppc_heathrow_reset, cpu); + + tb = g_malloc0(sizeof(PPCTimebase)); + vmstate_register(NULL, -1, &vmstate_ppc_timebase, tb); } /* allocate RAM */