Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333890
b: refs/heads/master
c: cb6b6df
h: refs/heads/master
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Oct 12, 2012
1 parent 90b3258 commit 758eafd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a7bbda5b1ab0e02622761305a32dc38735b90b2
refs/heads/master: cb6b6df111e46b9d0f79eb971575fd50555f43f4
21 changes: 21 additions & 0 deletions trunk/drivers/xen/xenbus/xenbus_xs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -618,14 +619,34 @@ 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;

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)
Expand Down

0 comments on commit 758eafd

Please sign in to comment.