From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Alexander Graf <agraf@suse.de>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines
Date: Sun, 31 Jan 2016 20:10:08 +0000 [thread overview]
Message-ID: <56AE6A20.1030809@ilande.co.uk> (raw)
In-Reply-To: <CAFEAcA81hW15VFEkmScz_-vZ8yBjakRuqnbevs-G38ECDEh1fQ@mail.gmail.com>
On 31/01/16 19:58, Peter Maydell wrote:
> On 31 January 2016 at 19:19, Mark Cave-Ayland
> <mark.cave-ayland@ilande.co.uk> wrote:
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> ---
>> 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) ?
Not exactly that I know of - although I shamelessly borrowed this part
from similar code in spapr which has this comment:
/* FIXME: Should register things through the MachineState's qdev
* interface, this is a legacy from the sPAPREnvironment structure
* which predated MachineState but had a similar function */
Is this something that is now possible?
ATB,
Mark.
next prev parent reply other threads:[~2016-01-31 20:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-31 19:19 [Qemu-devel] [PATCH 0/3] ppc: add timebase migration support to Mac machines Mark Cave-Ayland
2016-01-31 19:19 ` [Qemu-devel] [PATCH 1/3] ppc: fix timebase adjustment during migration Mark Cave-Ayland
2016-02-01 1:16 ` David Gibson
2016-01-31 19:19 ` [Qemu-devel] [PATCH 2/3] ppc: add support for timebase migration on non-PPC hosts Mark Cave-Ayland
2016-02-01 1:19 ` David Gibson
2016-01-31 19:19 ` [Qemu-devel] [PATCH 3/3] ppc: include timebase in migration stream for g3beige/mac99 machines Mark Cave-Ayland
2016-01-31 19:58 ` Peter Maydell
2016-01-31 20:10 ` Mark Cave-Ayland [this message]
2016-02-01 1:36 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56AE6A20.1030809@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.