virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: stable@vger.kernel.org.#.Only.for.3.3,
	Virtualization List <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 1/1] virtio: console: tell host of open ports after resume from s3/s4
Date: Wed, 25 Apr 2012 13:37:18 +0300	[thread overview]
Message-ID: <20120425103717.GA26878@redhat.com> (raw)
In-Reply-To: <393cb3180cbb3dd4ca71ac90714f71b0472c5b48.1335345026.git.amit.shah@redhat.com>

On Wed, Apr 25, 2012 at 02:40:39PM +0530, Amit Shah wrote:
> If a port was open before going into one of the sleep states, the port
> can continue normal operation after restore.  However, the host has to
> be told that the guest side of the connection is open to restore
> pre-suspend state.
> 
> This wasn't noticed so far due to a bug in qemu that was fixed recently
> (which marked the guest-side connection as always open).
> 
> CC: stable@vger.kernel.org   # Only for 3.3
> 
> Signed-off-by: Amit Shah <amit.shah@redhat.com>

Applied and queued for the next 3.4 pull, thanks.

> ---
>  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 ddf86b6..cdf2f54 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;
>  }
> -- 
> 1.7.7.6

      reply	other threads:[~2012-04-25 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-25  9:10 [PATCH 1/1] virtio: console: tell host of open ports after resume from s3/s4 Amit Shah
2012-04-25 10:37 ` Michael S. Tsirkin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120425103717.GA26878@redhat.com \
    --to=mst@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=stable@vger.kernel.org.#.Only.for.3.3 \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).