balloon: Do not save VM state wrt asynchronous virtio operations
commit6d0ee85040e4d238e2483191fe6e74aebbecd5d5
authorAdam Litke <agl@us.ibm.com>
Tue, 9 Mar 2010 18:54:09 +0000 (9 12:54 -0600)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 17 Mar 2010 15:42:40 +0000 (17 10:42 -0500)
treed7c032052570a55cdcdfec12bb4676b86811112c
parent8cfacf079047c50d272ce64e45a78d816db8b36e
balloon: Do not save VM state wrt asynchronous virtio operations

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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/virtio-balloon.c