public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: stable@vger.kernel.org
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Jiri Slaby <jslaby@suse.cz>
Subject: [patch added to the 3.12 stable tree] xen/console: Update console event channel on resume
Date: Fri, 15 May 2015 16:28:29 +0200	[thread overview]
Message-ID: <1431700109-10261-9-git-send-email-jslaby@suse.cz> (raw)
In-Reply-To: <1431700109-10261-1-git-send-email-jslaby@suse.cz>

From: Boris Ostrovsky <boris.ostrovsky@oracle.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

commit b9d934f27c91b878c4b2e64299d6e419a4022f8d upstream.

After a resume the hypervisor/tools may change console event
channel number. We should re-query it.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 drivers/tty/hvc/hvc_xen.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index c193af6a628f..b4805adc50af 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -299,11 +299,27 @@ static int xen_initial_domain_console_init(void)
 	return 0;
 }
 
+static void xen_console_update_evtchn(struct xencons_info *info)
+{
+	if (xen_hvm_domain()) {
+		uint64_t v;
+		int err;
+
+		err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
+		if (!err && v)
+			info->evtchn = v;
+	} else
+		info->evtchn = xen_start_info->console.domU.evtchn;
+}
+
 void xen_console_resume(void)
 {
 	struct xencons_info *info = vtermno_to_xencons(HVC_COOKIE);
-	if (info != NULL && info->irq)
+	if (info != NULL && info->irq) {
+		if (!xen_initial_domain())
+			xen_console_update_evtchn(info);
 		rebind_evtchn_irq(info->evtchn, info->irq);
+	}
 }
 
 static void xencons_disconnect_backend(struct xencons_info *info)
-- 
2.3.7


      parent reply	other threads:[~2015-05-15 14:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 14:28 [patch added to the 3.12 stable tree] ocfs2: dlm: fix race between purge and get lock resource Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] gpio: sysfs: fix memory leaks and device hotplug Jiri Slaby
2015-05-15 14:51   ` Johan Hovold
2015-05-15 19:51     ` Jiri Slaby
2015-05-15 20:24       ` Johan Hovold
2015-05-16  6:42         ` Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] mnt: Fix fs_fully_visible to verify the root directory is visible Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] mm/memory-failure: call shake_page() when error hits thp tail page Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] writeback: use |1 instead of +1 to protect against div by zero Jiri Slaby
2015-05-15 14:28 ` [patch added to the 3.12 stable tree] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Jiri Slaby
2015-05-15 14:28 ` Jiri Slaby [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=1431700109-10261-9-git-send-email-jslaby@suse.cz \
    --to=jslaby@suse.cz \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=stable@vger.kernel.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