[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/3] ppc: include timebase in migrati
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines |
Date: |
Sun, 31 Jan 2016 19:58:55 +0000 |
On 31 January 2016 at 19:19, Mark Cave-Ayland
<address@hidden> wrote:
> Signed-off-by: Mark Cave-Ayland <address@hidden>
> ---
> 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);
Is there no way to avoid the vmstate_register here (ie to
tie the migration data to an actual device or CPU object) ?
thanks
-- PMM