Merge tag 'stable/for-linus-3.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
Pull Xen fixes from Konrad Rzeszutek Wilk: "This has four bug-fixes and one tiny feature that I forgot to put initially in my tree due to oversight. The feature is for kdump kernels to speed up the /proc/vmcore reading. There is a ram_is_pfn helper function that the different platforms can register for. We are now doing that. The bug-fixes cover some embarrassing struct pv_cpu_ops variables being set to NULL on Xen (but not baremetal). We had a similar issue in the past with {write|read}_msr_safe and this fills the three missing ones. The other bug-fix is to make the console output (hvc) be capable of dealing with misbehaving backends and not fall flat on its face. Lastly, a quirk for older XenBus implementations that came with an ancient v3.4 hypervisor (so RHEL5 based) - reading of certain non-existent attributes just hangs the guest during bootup - so we take precaution of not doing that on such older installations. Feature: - Register a pfn_is_ram helper to speed up reading of /proc/vmcore. Bug-fixes: - Three pvops call for Xen were undefined causing BUG_ONs. - Add a quirk so that the shutdown watches (used by kdump) are not used with older Xen (3.4). - Fix ungraceful state transition for the HVC console." * tag 'stable/for-linus-3.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: xen/pv-on-hvm kexec: add quirk for Xen 3.4 and shutdown watches. xen/bootup: allow {read|write}_cr8 pvops call. xen/bootup: allow read_tscp call for Xen PV guests. xen pv-on-hvm: add pfn_is_ram helper for kdump xen/hvc: handle backend CLOSED without CLOSING
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include <xen/xenbus.h>
|
||||
#include <xen/xen.h>
|
||||
#include "xenbus_comms.h"
|
||||
#include <asm/xen/hypervisor.h>
|
||||
|
||||
struct xs_stored_msg {
|
||||
struct list_head list;
|
||||
@@ -618,7 +619,24 @@ static struct xenbus_watch *find_watch(const char *token)
|
||||
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
* Certain older XenBus toolstack cannot handle reading values that are
|
||||
* not populated. Some Xen 3.4 installation are incapable of doing this
|
||||
* so if we are running on anything older than 4 do not attempt to read
|
||||
* control/platform-feature-xs_reset_watches.
|
||||
*/
|
||||
static bool xen_strict_xenbus_quirk()
|
||||
{
|
||||
uint32_t eax, ebx, ecx, edx, base;
|
||||
|
||||
base = xen_cpuid_base();
|
||||
cpuid(base + 1, &eax, &ebx, &ecx, &edx);
|
||||
|
||||
if ((eax >> 16) < 4)
|
||||
return true;
|
||||
return false;
|
||||
|
||||
}
|
||||
static void xs_reset_watches(void)
|
||||
{
|
||||
int err, supported = 0;
|
||||
@@ -626,6 +644,9 @@ static void xs_reset_watches(void)
|
||||
if (!xen_hvm_domain() || xen_initial_domain())
|
||||
return;
|
||||
|
||||
if (xen_strict_xenbus_quirk())
|
||||
return;
|
||||
|
||||
err = xenbus_scanf(XBT_NIL, "control",
|
||||
"platform-feature-xs_reset_watches", "%d", &supported);
|
||||
if (err != 1 || !supported)
|
||||
|
Reference in New Issue
Block a user