summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-17 09:55:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-17 09:55:58 -0700
commit42e8b9c00176dd3a2f11d05f195131bac851558b (patch)
treef2ac5e3ee4714eaf8ad9eb6b7646a87dcf1e2987
parent674ff51776b012783e5a0ce8ce2fa56f5fec050c (diff)
parentec13ee80145ccb95b00e6e610044bbd94a170051 (diff)
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull last minute virtio fixes from Michael S. Tsirkin: "Here are a couple of last minute virtio fixes for 3.4. Hope it's not too late yes - I might have tried too hard to make sure the fix is well tested. Fixes are by Amit and myself. One fixes module removal and one suspend of a VM, the last one the handling of out of memory condition. They are thus very low risk as most people never hit these paths, but do fix very annoying problems for people that do use the feature. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_net: invoke softirqs after __napi_schedule virtio: balloon: let host know of updated balloon size before module removal virtio: console: tell host of open ports after resume from s3/s4
-rw-r--r--drivers/char/virtio_console.c7
-rw-r--r--drivers/net/virtio_net.c2
-rw-r--r--drivers/virtio/virtio_balloon.c1
3 files changed, 10 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index ddf86b6500b7..cdf2f5451c76 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1895,6 +1895,13 @@ static int virtcons_restore(struct virtio_device *vdev)
/* Get port open/close status on the host */
send_control_msg(port, VIRTIO_CONSOLE_PORT_READY, 1);
+
+ /*
+ * If a port was open at the time of suspending, we
+ * have to let the host know that it's still open.
+ */
+ if (port->guest_connected)
+ send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 1);
}
return 0;
}
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index af8acc85f4bb..cbefe671bcc6 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -492,7 +492,9 @@ static void virtnet_napi_enable(struct virtnet_info *vi)
* We synchronize against interrupts via NAPI_STATE_SCHED */
if (napi_schedule_prep(&vi->napi)) {
virtqueue_disable_cb(vi->rvq);
+ local_bh_disable();
__napi_schedule(&vi->napi);
+ local_bh_enable();
}
}
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)
/* There might be pages left in the balloon: free them. */
while (vb->num_pages)
leak_balloon(vb, vb->num_pages);
+ update_balloon_size(vb);
/* Now we reset the device so we can clean up the queues. */
vdev->config->reset(vdev);