linux/drivers/xen/xenbus
Konrad Rzeszutek Wilk cb6b6df111 xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches.
The commit 254d1a3f02, titled
"xen/pv-on-hvm kexec: shutdown watches from old kernel" assumes that the
XenBus backend can deal with reading of values from:
 "control/platform-feature-xs_reset_watches":

    ... a patch for xenstored is required so that it
    accepts the XS_RESET_WATCHES request from a client (see changeset
    23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
    the registration of watches will fail and some features of a PVonHVM
    guest are not available. The guest is still able to boot, but repeated
    kexec boots will fail."

Sadly this is not true when using a Xen 3.4 hypervisor and booting a PVHVM
guest. We end up hanging at:

  err = xenbus_scanf(XBT_NIL, "control",
                        "platform-feature-xs_reset_watches", "%d", &supported);

This can easily be seen with guests hanging at xenbus_init:

NX (Execute Disable) protection: active
SMBIOS 2.4 present.
DMI: Xen HVM domU, BIOS 3.4.0 05/13/2011
Hypervisor detected: Xen HVM
Xen version 3.4.
Xen Platform PCI: I/O protocol version 1
... snip ..
calling  xenbus_init+0x0/0x27e @ 1

Reverting the commit or using the attached patch fixes the issue. This fix
checks whether the hypervisor is older than 4.0 and if so does not try to
perform the read.

Fixes-Oracle-Bug: 14708233
CC: stable@vger.kernel.org
Acked-by: Olaf Hering <olaf@aepfle.de>
[v2: Added a comment in the source code]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-10-12 08:49:21 -04:00
..
Makefile xen: Add xenbus_backend device 2011-12-16 13:29:41 -05:00
xenbus_client.c xen/gndev: Xen backend support for paged out grant targets V4. 2012-09-21 09:23:51 -04:00
xenbus_comms.c xen/arm: compile and run xenbus 2012-09-17 10:04:04 -04:00
xenbus_comms.h xenbus: Add support for xenbus backend in stub domain 2012-05-21 09:53:18 -04:00
xenbus_dev_backend.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
xenbus_dev_frontend.c xenbus_dev: add missing error check to watch handling 2012-02-03 16:07:05 -05:00
xenbus_probe_backend.c Xen: consolidate and simplify struct xenbus_driver instantiation 2012-01-04 17:01:17 -05:00
xenbus_probe_frontend.c xen: missing includes 2012-08-21 14:49:21 -04:00
xenbus_probe.c xen/arm: compile and run xenbus 2012-09-17 10:04:04 -04:00
xenbus_probe.h Xen: consolidate and simplify struct xenbus_driver instantiation 2012-01-04 17:01:17 -05:00
xenbus_xs.c xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches. 2012-10-12 08:49:21 -04:00