From: hitmoon <zxq_yx_007@163.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Michael Walle" <michael@walle.cc>,
qemu-arm <qemu-arm@nongnu.org>,
"Guan Xuetao" <gxt@mprc.pku.edu.cn>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-arm] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2)
Date: Mon, 22 Feb 2016 18:28:43 +0800 [thread overview]
Message-ID: <56CAE2DB.3080702@163.com> (raw)
In-Reply-To: <CAFEAcA-sDDj=kKmQnru0nfrjuHSjD8KDzO-PWGd0ia3GMZrEdg@mail.gmail.com>
在 2016年02月22日 17:24, Peter Maydell 写道:
> On 22 February 2016 at 09:11, xiaoqiang zhao <zxq_yx_007@163.com> wrote:
>> assign DeviceClass::vmsd instead of using vmstate_register function
>>
>> Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
>> ---
>> hw/timer/m48t59.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
>> index 3c683aa..b0cf79d 100644
>> --- a/hw/timer/m48t59.c
>> +++ b/hw/timer/m48t59.c
>> @@ -742,8 +742,6 @@ static void m48t59_realize_common(M48t59State *s, Error **errp)
>> s->wd_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, &watchdog_cb, s);
>> }
>> qemu_get_timedate(&s->alarm, 0);
>> -
>> - vmstate_register(NULL, -1, &vmstate_m48t59, s);
>> }
>>
>> static void m48t59_isa_realize(DeviceState *dev, Error **errp)
>> @@ -822,6 +820,7 @@ static void m48txx_isa_class_init(ObjectClass *klass, void *data)
>> dc->realize = m48t59_isa_realize;
>> dc->reset = m48t59_reset_isa;
>> dc->props = m48t59_isa_properties;
>> + dc->vmsd = &vmstate_m48t59;
>> nc->read = m48txx_isa_read;
>> nc->write = m48txx_isa_write;
>> nc->toggle_lock = m48txx_isa_toggle_lock;
>> @@ -866,6 +865,7 @@ static void m48txx_sysbus_class_init(ObjectClass *klass, void *data)
>> dc->realize = m48t59_realize;
>> dc->reset = m48t59_reset_sysbus;
>> dc->props = m48t59_sysbus_properties;
>> + dc->vmsd = &vmstate_m48t59;
>> nc->read = m48txx_sysbus_read;
>> nc->write = m48txx_sysbus_write;
>> nc->toggle_lock = m48txx_sysbus_toggle_lock;
>> --
>> 2.1.4
>>
> Just noticed this won't work as it is -- the vmstate
> struct is for the M48t59State*, but the ISA and
> Sysbus wrappers have their own structs which are
> what the dc->vmsd will be wanting to operate on.
> You'd need extra VMState structs I think and
> somebody who knows migration better than me to say
> whether that is a migration compat break.
>
> thanks
> -- PMM
It seems that the old code also use the same vmstate structure. Maybe
it's a common structure which will not be used at the same time.
next prev parent reply other threads:[~2016-02-22 10:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 9:11 [Qemu-arm] [PATCH v4 5/9] hw/timer: QOM'ify m48txx_sysbus (pass 2) xiaoqiang zhao
2016-02-22 9:24 ` [Qemu-devel] " Peter Maydell
2016-02-22 10:28 ` hitmoon [this message]
2016-02-22 11:03 ` Peter Maydell
2016-02-22 11:24 ` [Qemu-arm] " xiaoqiang zhao
2016-02-22 11:25 ` xiaoqiang zhao
2016-02-23 5:11 ` hitmoon
2016-02-23 9:04 ` Peter Maydell
2016-02-23 10:02 ` hitmoon
2016-02-23 10:26 ` [Qemu-devel] " Peter Maydell
2016-02-23 10:36 ` [Qemu-arm] " hitmoon
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=56CAE2DB.3080702@163.com \
--to=zxq_yx_007@163.com \
--cc=afaerber@suse.de \
--cc=gxt@mprc.pku.edu.cn \
--cc=i.mitsyanko@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=michael@walle.cc \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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.