diff options
Diffstat (limited to 'drivers/char/virtio_console.c')
| -rw-r--r-- | drivers/char/virtio_console.c | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index ddf86b6500b..cdf2f5451c7 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;  }  |