aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2012-04-26 15:15:56 -0400
committerMichael S. Tsirkin <mst@redhat.com>2012-05-17 05:14:34 -0400
commitb8ae0eb320b38415da94a41f75e9f99e0aaff06c (patch)
tree0e0d05059f13a1a67796c60274951bab2e0a0b2c
parentfa8b66ccd2d200b64496cfedcce90bf54fe7d6e9 (diff)
virtio: balloon: let host know of updated balloon size before module removal
When the balloon module is removed, we deflate the balloon, reclaiming all the pages that were given to the host. However, we don't update the config values for the new balloon size, resulting in the host showing outdated balloon values. The size update is done after each leak and fill operation, only the module removal case was left out. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--drivers/virtio/virtio_balloon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index c2d05a8279fd..8807fe501d20 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -390,6 +390,7 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev)
390 /* There might be pages left in the balloon: free them. */ 390 /* There might be pages left in the balloon: free them. */
391 while (vb->num_pages) 391 while (vb->num_pages)
392 leak_balloon(vb, vb->num_pages); 392 leak_balloon(vb, vb->num_pages);
393 update_balloon_size(vb);
393 394
394 /* Now we reset the device so we can clean up the queues. */ 395 /* Now we reset the device so we can clean up the queues. */
395 vdev->config->reset(vdev); 396 vdev->config->reset(vdev);