Displaying 20 results from an estimated 63 matches for "xenbus_watch".
2013 Nov 08
4
[PATCH 3/4] xen/manage: Guard against user-space initiated poweroff and XenBus.
...NG:
orderly_poweroff(true);
@@ -201,7 +209,7 @@ static void do_poweroff(void)
static void do_reboot(void)
{
- shutting_down = SHUTDOWN_POWEROFF; /* ? */
+ atomic_set(&shutting_down, SHUTDOWN_POWEROFF); /* ? */
ctrl_alt_del();
}
@@ -222,7 +230,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
};
static struct shutdown_handler *handler;
- if (shutting_down != SHUTDOWN_INVALID)
+ if (atomic_read(&shutting_down) != SHUTDOWN_INVALID)
return;
again:
@@ -256,12 +264,29 @@ static void shutdown_handler(struct xenbus_watch *watch,
handler->cb();
} else {
pr_in...
2011 Feb 04
5
[PATCH] kdump: introduce "reset_devices" command line option
upstream commit 7e96287ddc4f42081e18248b6167041c0908004c
Author: Vivek Goyal <vgoyal@in.ibm.com>
[PATCH] kdump: introduce "reset_devices" command line option
Resetting the devices during driver initialization can be a costly
operation in terms of time (especially scsi devices). This option can be
used by drivers to know that user forcibly wants the devices to
2012 Jul 10
2
[PATCH] xen/pv-on-hvm kexec: shutdown watches from old kernel
...terface/io/xs_wire.h | 3 ++-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index d1c217b..bce15cf 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -618,6 +618,23 @@ static struct xenbus_watch *find_watch(const char *token)
return NULL;
}
+static void xs_reset_watches(void)
+{
+ int err, supported = 0;
+
+ if (!xen_hvm_domain())
+ return;
+
+ err = xenbus_scanf(XBT_NIL, "control",
+ "platform-feature-xs_reset_watches", "%d", &supported);
+ if (er...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...ct device *_dev);
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
index 6cf467b..ec510e5 100644
--- a/drivers/xen/xenbus/xenbus_probe_backend.c
+++ b/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -183,10 +183,6 @@ static void frontend_changed(struct xenbus_watch *watch,
xenbus_otherend_changed(watch, vec, len, 0);
}
-static struct device_attribute xenbus_backend_dev_attrs[] = {
- __ATTR_NULL
-};
-
static struct xen_bus_type xenbus_backend = {
.root = "backend",
.levels = 3, /* backend/type/<frontend>/<id> */
@@ -200,7 +196,...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...ct device *_dev);
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
index 6cf467b..ec510e5 100644
--- a/drivers/xen/xenbus/xenbus_probe_backend.c
+++ b/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -183,10 +183,6 @@ static void frontend_changed(struct xenbus_watch *watch,
xenbus_otherend_changed(watch, vec, len, 0);
}
-static struct device_attribute xenbus_backend_dev_attrs[] = {
- __ATTR_NULL
-};
-
static struct xen_bus_type xenbus_backend = {
.root = "backend",
.levels = 3, /* backend/type/<frontend>/<id> */
@@ -200,7 +196,...
2011 Jun 24
1
[PATCH 1/2] xen: Populate xenbus device attributes
...ct device *_dev);
diff --git a/drivers/xen/xenbus/xenbus_probe_backend.c b/drivers/xen/xenbus/xenbus_probe_backend.c
index 6cf467b..ec510e5 100644
--- a/drivers/xen/xenbus/xenbus_probe_backend.c
+++ b/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -183,10 +183,6 @@ static void frontend_changed(struct xenbus_watch *watch,
xenbus_otherend_changed(watch, vec, len, 0);
}
-static struct device_attribute xenbus_backend_dev_attrs[] = {
- __ATTR_NULL
-};
-
static struct xen_bus_type xenbus_backend = {
.root = "backend",
.levels = 3, /* backend/type/<frontend>/<id> */
@@ -200,7 +196,...
2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...;read_prod++)
u->read_buffer[MASK_READ_IDX(u->read_prod)] = data[i];
BUG_ON((u->read_prod - u->read_cons) > sizeof(u->read_buffer));
+ mutex_unlock(&u->reply_mutex);
+
wake_up(&u->read_waitq);
}
+
+struct watch_adapter
+{
+ struct list_head list;
+ struct xenbus_watch watch;
+ struct xenbus_dev_data *dev_data;
+ char *token;
+};
+
+static void free_watch_adapter (struct watch_adapter *watch)
+{
+ kfree(watch->watch.node);
+ kfree(watch->token);
+ kfree(watch);
+}
+
+static void watch_fired(struct xenbus_watch *watch,
+ const char **vec,
+ unsigned int...
2012 Oct 15
1
[PATCH] xen/xenbus: silence GCC warning
...xen/xenbus/xenbus_xs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 48220e1..7a2b0da 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -619,13 +619,14 @@ 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-fe...
2012 Oct 15
1
[PATCH] xen/xenbus: silence GCC warning
...xen/xenbus/xenbus_xs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 48220e1..7a2b0da 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -619,13 +619,14 @@ 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-fe...
2011 Jun 21
13
VM disk I/O limit patch
...d long reqtime;
+ int reqcount;
+ int reqmin;
+ int reqrate;
+
} blkif_t;
+#define VBD_QOS_MIN_RATE_LIMIT 2*1024 /* 1MBs */
+
struct backend_info
{
struct xenbus_device *dev;
@@ -111,6 +120,8 @@ struct backend_info
unsigned major;
unsigned minor;
char *mode;
+ struct xenbus_watch rate_watch;
+ int have_rate_watch;
};
blkif_t *blkif_alloc(domid_t domid);
diff -urNp blkback/vbd.c blkback-qos/vbd.c
--- blkback/vbd.c 2010-05-20 18:07:00.000000000 +0800
+++ blkback-qos/vbd.c 2011-06-22 07:34:50.000000000 +0800
@@ -35,6 +35,11 @@
#define vbd_sz(_v) ((_v)->bdev->bd_p...
2011 Jun 21
13
VM disk I/O limit patch
...d long reqtime;
+ int reqcount;
+ int reqmin;
+ int reqrate;
+
} blkif_t;
+#define VBD_QOS_MIN_RATE_LIMIT 2*1024 /* 1MBs */
+
struct backend_info
{
struct xenbus_device *dev;
@@ -111,6 +120,8 @@ struct backend_info
unsigned major;
unsigned minor;
char *mode;
+ struct xenbus_watch rate_watch;
+ int have_rate_watch;
};
blkif_t *blkif_alloc(domid_t domid);
diff -urNp blkback/vbd.c blkback-qos/vbd.c
--- blkback/vbd.c 2010-05-20 18:07:00.000000000 +0800
+++ blkback-qos/vbd.c 2011-06-22 07:34:50.000000000 +0800
@@ -35,6 +35,11 @@
#define vbd_sz(_v) ((_v)->bdev->bd_p...
2011 Sep 22
4
[PATCH 0/2] reset xenstore watches to fix kexec in Xen PVonHVM guests
The following series improves kexec in a Xen PVonHVM guest.
It is available via git:
git://github.com/olafhering/linux.git xen-kexec-XS_RESET_WATCHES-3.0
A new xenstored command XS_RESET_WATCHES has been added in
xen-unstable.hg changeset 23839:42a45baf037d. The command removes all
watches and transactions for the guest. The following patches make use
of the new command to wipe all existing
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...crease_reservation(unsigned long nr_pages)
(unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0);
BUG_ON(ret);
- }
+ }
}
@@ -360,8 +360,7 @@ static void balloon_set_new_target(unsigned long target)
schedule_work(&balloon_worker);
}
-static struct xenbus_watch target_watch =
-{
+static struct xenbus_watch target_watch = {
.node = "memory/target"
};
@@ -460,8 +459,8 @@ BALLOON_SHOW(low_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_low));
BALLOON_SHOW(high_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_high));
BALLOON_SHOW(d...
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...crease_reservation(unsigned long nr_pages)
(unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0);
BUG_ON(ret);
- }
+ }
}
@@ -360,8 +360,7 @@ static void balloon_set_new_target(unsigned long target)
schedule_work(&balloon_worker);
}
-static struct xenbus_watch target_watch =
-{
+static struct xenbus_watch target_watch = {
.node = "memory/target"
};
@@ -460,8 +459,8 @@ BALLOON_SHOW(low_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_low));
BALLOON_SHOW(high_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_high));
BALLOON_SHOW(d...
2010 Mar 11
1
[PATCH 1/2] xen: balloon: Fix checkpatch issues
...crease_reservation(unsigned long nr_pages)
(unsigned long)__va(pfn << PAGE_SHIFT),
__pte_ma(0), 0);
BUG_ON(ret);
- }
+ }
}
@@ -360,8 +360,7 @@ static void balloon_set_new_target(unsigned long target)
schedule_work(&balloon_worker);
}
-static struct xenbus_watch target_watch =
-{
+static struct xenbus_watch target_watch = {
.node = "memory/target"
};
@@ -460,8 +459,8 @@ BALLOON_SHOW(low_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_low));
BALLOON_SHOW(high_kb, "%lu\n", PAGES2KB(balloon_stats.balloon_high));
BALLOON_SHOW(d...
2011 Mar 03
6
[PATCH] Make explicit message when guest failed to suspend
...@ -165,6 +165,8 @@ out_destroy_sm:
stop_machine_destroy();
out:
+ if (cancelled)
+ xenbus_write(XBT_NIL, "control", "shutdown", "failed");
shutting_down = SHUTDOWN_INVALID;
}
#endif /* CONFIG_PM_SLEEP */
@@ -190,6 +192,11 @@ static void shutdown_handler(struct xenbus_watch *watch,
xenbus_transaction_end(xbt, 1);
return;
}
+ /* Ignore failed message, posted by self */
+ if (strcmp(str, "failed") == 0) {
+ xenbus_transaction_end(xbt, 1);
+ return;
+ }
xenbus_write(xbt, "control", "shutdown", "");
@@ -212,6 +219,7 @@...
2011 Feb 03
0
[PATCH R3 4/7] xen/balloon: Migration from mod_timer() to schedule_delayed_work()
...lloon_mutex);
}
@@ -343,7 +337,7 @@ static void balloon_set_new_target(unsigned long target)
{
/* No need for lock. Not read-modify-write updates. */
balloon_stats.target_pages = target;
- schedule_work(&balloon_worker);
+ schedule_delayed_work(&balloon_worker, 0);
}
static struct xenbus_watch target_watch =
@@ -400,10 +394,6 @@ static int __init balloon_init(void)
balloon_stats.balloon_low = 0;
balloon_stats.balloon_high = 0;
- init_timer(&balloon_timer);
- balloon_timer.data = 0;
- balloon_timer.function = balloon_alarm;
-
register_balloon(&balloon_sysdev);
/*
--...
2011 Apr 04
0
[PATCH] xen: netback: use unsigned type for one-bit bitfield.
...-)
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 22b8c35..1ce729d 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -26,7 +26,7 @@ struct backend_info {
struct xenvif *vif;
enum xenbus_state frontend_state;
struct xenbus_watch hotplug_status_watch;
- int have_hotplug_status_watch:1;
+ u8 have_hotplug_status_watch:1;
};
static int connect_rings(struct backend_info *);
--
1.7.2.5
2011 Apr 04
0
[PATCH] xen: netback: use unsigned type for one-bit bitfield.
...-)
diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index 22b8c35..1ce729d 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -26,7 +26,7 @@ struct backend_info {
struct xenvif *vif;
enum xenbus_state frontend_state;
struct xenbus_watch hotplug_status_watch;
- int have_hotplug_status_watch:1;
+ u8 have_hotplug_status_watch:1;
};
static int connect_rings(struct backend_info *);
--
1.7.2.5
2007 Apr 29
33
[patch 00/32] xen: Xen implementation for paravirt_ops
Hi Andi,
This series of patches implements the Xen paravirt-ops interface.
It applies to 2.6.21 + 2.6.21-070428-1 + the patches I've posted over
the last couple of days.
Changes since the last posting:
- update per review comments
- comment each file
- comment barrier use
- use common cpu sibling setup
- fixed a few minor bugs, specifically a traceirq mismatch warning
- some