public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	David Vrabel <david.vrabel@citrix.com>
Subject: [PATCH 4.0 18/60] xen/xenbus: Update xenbus event channel on resume
Date: Fri, 15 May 2015 16:14:19 -0700	[thread overview]
Message-ID: <20150515231019.371710066@linuxfoundation.org> (raw)
In-Reply-To: <20150515231018.815421141@linuxfoundation.org>

4.0-stable review patch.  If anyone has any objections, please let me know.

------------------

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

commit 16f1cf3ba7303228372d3756677bf7d10e79cf9f upstream.

After a resume the hypervisor/tools may change xenbus 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/xenbus/xenbus_probe.c |   29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -57,6 +57,7 @@
 #include <xen/xen.h>
 #include <xen/xenbus.h>
 #include <xen/events.h>
+#include <xen/xen-ops.h>
 #include <xen/page.h>
 
 #include <xen/hvm.h>
@@ -735,6 +736,30 @@ static int __init xenstored_local_init(v
 	return err;
 }
 
+static int xenbus_resume_cb(struct notifier_block *nb,
+			    unsigned long action, void *data)
+{
+	int err = 0;
+
+	if (xen_hvm_domain()) {
+		uint64_t v;
+
+		err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+		if (!err && v)
+			xen_store_evtchn = v;
+		else
+			pr_warn("Cannot update xenstore event channel: %d\n",
+				err);
+	} else
+		xen_store_evtchn = xen_start_info->store_evtchn;
+
+	return err;
+}
+
+static struct notifier_block xenbus_resume_nb = {
+	.notifier_call = xenbus_resume_cb,
+};
+
 static int __init xenbus_init(void)
 {
 	int err = 0;
@@ -793,6 +818,10 @@ static int __init xenbus_init(void)
 		goto out_error;
 	}
 
+	if ((xen_store_domain_type != XS_LOCAL) &&
+	    (xen_store_domain_type != XS_UNKNOWN))
+		xen_resume_notifier_register(&xenbus_resume_nb);
+
 #ifdef CONFIG_XEN_COMPAT_XENFS
 	/*
 	 * Create xenfs mountpoint in /proc for compatibility with



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

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15 23:14 [PATCH 4.0 00/60] 4.0.4-stable review Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 01/60] x86/spinlocks: Fix regression in spinlock contention detection Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 02/60] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 03/60] x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 04/60] ACPI / PNP: add two IDs to list for PNPACPI device enumeration Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 05/60] ocfs2: dlm: fix race between purge and get lock resource Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 06/60] rtc: armada38x: fix concurrency access in armada38x_rtc_set_time Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 07/60] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 08/60] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 09/60] gpio: sysfs: fix memory leaks and device hotplug Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 10/60] mnt: Fix fs_fully_visible to verify the root directory is visible Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 11/60] mm/memory-failure: call shake_page() when error hits thp tail page Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 12/60] path_openat(): fix double fput() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 13/60] writeback: use |1 instead of +1 to protect against div by zero Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 14/60] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 15/60] [media] marvell-ccic: fix YCbCr ordering Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 16/60] vfio: Fix runaway interruptible timeout Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 17/60] xen/events: Clear cpu_evtchn_mask before resuming Greg Kroah-Hartman
2015-05-15 23:14 ` Greg Kroah-Hartman [this message]
2015-05-15 23:14 ` [PATCH 4.0 19/60] xen/console: Update console event channel on resume Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 20/60] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 21/60] xen-pciback: Add name prefix to global permissive variable Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 22/60] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 23/60] block: destroy bdi before blockdev is unregistered Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 24/60] blk-mq: fix race between timeout and CPU hotplug Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 25/60] blk-mq: fix CPU hotplug handling Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 26/60] ARM: dts: OMAP3-N900: Add microphone bias voltages Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 27/60] ARM: dts: imx25: Add #pwm-cells to pwm4 Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 28/60] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 29/60] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 30/60] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 31/60] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 32/60] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 33/60] ARM: OMAP2+: Fix omap off idle power consumption creeping up Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 34/60] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 35/60] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 36/60] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 37/60] ARM: ux500: Enable GPIO regulator for SD-card for snowball Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 40/60] drm/i915: Add missing MacBook Pro models with dual channel LVDS Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 41/60] drm/i915/dp: there is no audio on port A Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 42/60] drm/amdkfd: allow unregister process with queues Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 43/60] drm/amdkfd: Initialize sdma vm when creating sdma queue Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 45/60] drm/radeon: dont setup audio on asics that dont support it Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 50/60] pinctrl: Dont just pretend to protect pinctrl_maps, do it for real Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 51/60] mmc: card: Dont access RPMB partitions for normal read/write Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 52/60] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 53/60] mmc: sh_mmcif: Fix timeout value for command request Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 54/60] ARM: 8307/1: psci: move psci firmware calls out of line Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 55/60] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 56/60] coredump: accept any write method Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 57/60] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Greg Kroah-Hartman
2015-05-15 23:14 ` [PATCH 4.0 58/60] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Greg Kroah-Hartman
2015-05-15 23:15 ` [PATCH 4.0 59/60] ACPICA: Utilities: Cleanup to convert physical address printing formats Greg Kroah-Hartman
2015-05-15 23:15 ` [PATCH 4.0 60/60] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Greg Kroah-Hartman
2015-05-16  3:16 ` [PATCH 4.0 00/60] 4.0.4-stable review Guenter Roeck
2015-05-16 15:26   ` Greg Kroah-Hartman
2015-05-16  3:16 ` Shuah Khan
2015-05-16 15:27   ` Greg Kroah-Hartman

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=20150515231019.371710066@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --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