Skip to content

Commit 401bbdc

Browse files
mstsirkinrustyrussell
authored andcommitted
virtio_console: enable VQs early on restore
virtio spec requires drivers to set DRIVER_OK before using VQs. This is set automatically after resume returns, virtio console violated this rule by adding inbufs, which causes the VQ to be used directly within restore. To fix, call virtio_device_ready before using VQs. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 52c9cf1 commit 401bbdc

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/char/virtio_console.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,6 +2184,8 @@ static int virtcons_restore(struct virtio_device *vdev)
21842184
if (ret)
21852185
return ret;
21862186

2187+
virtio_device_ready(portdev->vdev);
2188+
21872189
if (use_multiport(portdev))
21882190
fill_queue(portdev->c_ivq, &portdev->c_ivq_lock);
21892191

0 commit comments

Comments
 (0)