From: Paolo Bonzini <pbonzini@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Juan Quintela" <quintela@redhat.com>
Subject: Re: [PATCH 2/2] hw/char/serial: Allow migration of the I/O serial device
Date: Tue, 7 Jul 2020 12:39:33 +0200 [thread overview]
Message-ID: <ef63ebb4-5f60-e4a7-3027-065b8d1d1f61@redhat.com> (raw)
In-Reply-To: <20200703185809.5896-3-f4bug@amsat.org>
On 03/07/20 20:58, Philippe Mathieu-Daudé wrote:
> The serial device mapped on the I/O bus hold a migratable
> SerialState. Keep the same version range from SerialState:
>
> 837 const VMStateDescription vmstate_serial = {
> 838 .name = "serial",
> 839 .version_id = 3,
> 840 .minimum_version_id = 2,
>
> Fixes: 10315a7089 ("serial: make SerialIO a sysbus device")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/char/serial.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 9eebcb27e7..c167b584fb 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -1002,12 +1002,22 @@ static void serial_io_realize(DeviceState *dev, Error **errp)
> sysbus_init_irq(SYS_BUS_DEVICE(sio), &s->irq);
> }
>
> +static const VMStateDescription vmstate_serial_io = {
> + .name = "serial",
> + .version_id = 3,
> + .minimum_version_id = 2,
> + .fields = (VMStateField[]) {
> + VMSTATE_STRUCT(serial, SerialIO, 0, vmstate_serial, SerialState),
> + VMSTATE_END_OF_LIST()
> + }
> +};
> +
> static void serial_io_class_init(ObjectClass *klass, void* data)
> {
> DeviceClass *dc = DEVICE_CLASS(klass);
>
> dc->realize = serial_io_realize;
> - /* No dc->vmsd: class has no migratable state */
> + dc->vmsd = &vmstate_serial_io;
> }
>
> static void serial_io_instance_init(Object *o)
>
Is there any difference between SerialMM and SerialIO at this point?
Paolo
next prev parent reply other threads:[~2020-07-07 10:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 18:58 [PATCH 0/2] hw/char/serial: Migrate I/O serial device Philippe Mathieu-Daudé
2020-07-03 18:58 ` [PATCH 1/2] hw/char/serial: Separate and document static properties Philippe Mathieu-Daudé
2020-07-10 8:23 ` Peter Maydell
2020-07-10 9:24 ` Juan Quintela
2020-07-03 18:58 ` [PATCH 2/2] hw/char/serial: Allow migration of the I/O serial device Philippe Mathieu-Daudé
2020-07-07 10:39 ` Paolo Bonzini [this message]
2020-07-10 8:34 ` Peter Maydell
2020-07-10 9:32 ` Juan Quintela
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=ef63ebb4-5f60-e4a7-3027-065b8d1d1f61@redhat.com \
--to=pbonzini@redhat.com \
--cc=dgilbert@redhat.com \
--cc=f4bug@amsat.org \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).