All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@linux.vnet.ibm.com>
To: Adam Litke <agl@us.ibm.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>,
	Juan Quintela <quintela@redhat.com>, Avi Kivity <avi@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] balloon: Do not save VM state wrt asynchronous virtio operations
Date: Wed, 17 Mar 2010 11:00:00 -0500	[thread overview]
Message-ID: <4BA0FC80.4040105@linux.vnet.ibm.com> (raw)
In-Reply-To: <1268160849.2579.56.camel@aglitke>

On 03/09/2010 12:54 PM, Adam Litke wrote:
> When working with the VM state (for loadvm/savevm and migration), it is not
> valid to load and store pointers since the validity of those pointers cannot be
> assured in the new qemu address space.  Therefore, virtio_balloon_save() and
> virtio_balloon_load() must not handle the stats-related fields in struct
> VirtIOBalloon.
>
> If a memory stats request is in-flight at the time of a migration or savevm,
> the request will not complete and should be resubmitted once migration or
> loadvm completes.  Note that this extremely small race window can only be
> triggered using QMP so it is not possible to hang the user monitor.
>
> Signed-off-by: Adam Litke<agl@us.ibm.com>
>    
Applied.  Thanks.

Regards,

Anthony Liguori
> diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c
> index 086d9d1..6d12024 100644
> --- a/hw/virtio-balloon.c
> +++ b/hw/virtio-balloon.c
> @@ -261,10 +261,6 @@ static void virtio_balloon_save(QEMUFile *f, void *opaque)
>
>       qemu_put_be32(f, s->num_pages);
>       qemu_put_be32(f, s->actual);
> -    qemu_put_buffer(f, (uint8_t *)&s->stats_vq_elem, sizeof(VirtQueueElement));
> -    qemu_put_buffer(f, (uint8_t *)&s->stats_vq_offset, sizeof(size_t));
> -    qemu_put_buffer(f, (uint8_t *)&s->stats_callback, sizeof(MonitorCompletion));
> -    qemu_put_buffer(f, (uint8_t *)&s->stats_opaque_callback_data, sizeof(void));
>   }
>
>   static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id)
> @@ -278,11 +274,6 @@ static int virtio_balloon_load(QEMUFile *f, void *opaque, int version_id)
>
>       s->num_pages = qemu_get_be32(f);
>       s->actual = qemu_get_be32(f);
> -    qemu_get_buffer(f, (uint8_t *)&s->stats_vq_elem, sizeof(VirtQueueElement));
> -    qemu_get_buffer(f, (uint8_t *)&s->stats_vq_offset, sizeof(size_t));
> -    qemu_get_buffer(f, (uint8_t *)&s->stats_callback, sizeof(MonitorCompletion));
> -    qemu_get_buffer(f, (uint8_t *)&s->stats_opaque_callback_data, sizeof(void));
> -
>       return 0;
>   }
>
>
>
>    

      parent reply	other threads:[~2010-03-17 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 18:54 [Qemu-devel] [PATCH] balloon: Do not save VM state wrt asynchronous virtio operations Adam Litke
2010-03-09 19:20 ` [Qemu-devel] " Juan Quintela
2010-03-17 16:00 ` Anthony Liguori [this message]

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=4BA0FC80.4040105@linux.vnet.ibm.com \
    --to=aliguori@linux.vnet.ibm.com \
    --cc=agl@us.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=lcapitulino@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 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.