qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migrati


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] virtio-serial-bus: replay guest_open on migration
Date: Wed, 27 Jul 2011 07:45:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Alon Levy <address@hidden> writes:

> Signed-off-by: Alon Levy <address@hidden>
> ---
>  hw/virtio-serial-bus.c |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
> index c5eb931..7a652ff 100644
> --- a/hw/virtio-serial-bus.c
> +++ b/hw/virtio-serial-bus.c
> @@ -618,14 +618,20 @@ static int virtio_serial_load(QEMUFile *f, void 
> *opaque, int version_id)
>      for (i = 0; i < nr_active_ports; i++) {
>          uint32_t id;
>          bool host_connected;
> +        VirtIOSerialPortInfo *info;
>  
>          id = qemu_get_be32(f);
>          port = find_port_by_id(s, id);
>          if (!port) {
>              return -EINVAL;
>          }
> -
>          port->guest_connected = qemu_get_byte(f);
> +        info = DO_UPCAST(VirtIOSerialPortInfo, qdev, port->dev.info);
> +        if (port->guest_connected && info->guest_open) {
> +            /* replay guest open */
> +            info->guest_open(port);
> +
> +        }
>          host_connected = qemu_get_byte(f);
>          if (host_connected != port->host_connected) {
>              /*

The patch makes enough sense to me, but the commit message is
insufficient.  Why do you have to replay?  And what's being fixed?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]