Displaying 20 results from an estimated 42 matches for "xs_watch_ev".
2010 Aug 25
7
A bug in Xenbus driver
Hi all,
I think this is a serious bug, existing in the pvops 2.6.31.13 (also existing in linux 2.6.35);
In the xenbus driver (drivers/xen/xenfs/xenbus.c), the function of xenbus_file_read has a section of source code like this:
if (ret != sz) {
if (i == 0)
i = -EFAULT;
goto out;
}
/* Clear
2012 Sep 19
5
[PATCH] libxenstore: filter watch events in libxenstore when we unwatch
.../* Filter the watch list to remove potential message */
+ mutex_lock(&h->watch_mutex);
+
+ if (list_empty(&h->watch_list)) {
+ mutex_unlock(&h->watch_mutex);
+ return res;
+ }
+
+ list_for_each_entry_safe(msg, tmsg, &h->watch_list, list) {
+ assert(msg->hdr.type == XS_WATCH_EVENT);
+
+ strings = msg->body;
+ num_strings = xs_count_strings(strings, msg->hdr.len);
+
+ for (i = 0; i < num_strings; i++) {
+ if (i == XS_WATCH_TOKEN && !strcmp (token, strings)) {
+ list_del(&msg->list);
+ free(msg);
+ break;
+ }
+ strings = strings + s...
2012 Sep 25
2
[PATCH V2] libxenstore: filter watch events in libxenstore when we unwatch
...e pipe token if there are no more pending watches. */
- if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1))
- while (read(h->watch_pipe[0], &c, 1) != 1)
- continue;
-
+ xs_clear_watch_pipe(h);
mutex_unlock(&h->watch_mutex);
assert(msg->hdr.type == XS_WATCH_EVENT);
@@ -855,14 +864,62 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num)
bool xs_unwatch(struct xs_handle *h, const char *path, const char *token)
{
struct iovec iov[2];
+ struct xs_stored_msg *msg, *tmsg;
+ bool res;
+ char *s, *p;
+ unsigned int i;
+ char *l_token, *l_path;...
2012 Dec 14
1
[PATCH V5] libxenstore: filter watch events in libxenstore when we unwatch
...token if there are no more pending watches. */
- if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1))
- while (read(h->watch_pipe[0], &c, 1) != 1)
- continue;
-
+ xs_maybe_clear_watch_pipe(h);
mutex_unlock(&h->watch_mutex);
assert(msg->hdr.type == XS_WATCH_EVENT);
@@ -855,14 +873,64 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num)
bool xs_unwatch(struct xs_handle *h, const char *path, const char *token)
{
struct iovec iov[2];
+ struct xs_stored_msg *msg, *tmsg;
+ bool res;
+ char *s, *p;
+ unsigned int i;
+ char *l_token, *l_path;...
2012 Dec 14
1
[PATCH V4] libxenstore: filter watch events in libxenstore when we unwatch
...token if there are no more pending watches. */
- if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1))
- while (read(h->watch_pipe[0], &c, 1) != 1)
- continue;
-
+ xs_maybe_clear_watch_pipe(h);
mutex_unlock(&h->watch_mutex);
assert(msg->hdr.type == XS_WATCH_EVENT);
@@ -855,14 +873,64 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num)
bool xs_unwatch(struct xs_handle *h, const char *path, const char *token)
{
struct iovec iov[2];
+ struct xs_stored_msg *msg, *tmsg;
+ bool res;
+ char *s, *p;
+ unsigned int i;
+ char *l_token, *l_path;...
2006 Aug 02
2
[PATCH][RFC] permit domU userspace to watch xenstore
...r_of(watch, struct watch_adapter, watch);
+ struct xsd_sockmsg hdr;
+ const char *path, *token;
+ int path_len, tok_len, body_len;
+
+ path = vec[XS_WATCH_PATH];
+ token = adap->token;
+
+ path_len = strlen(path) + 1;
+ tok_len = strlen(token) + 1;
+ body_len = path_len + tok_len;
+
+ hdr.type = XS_WATCH_EVENT;
+ hdr.len = body_len;
+
+ queue_reply(adap->dev_data, (char *)&hdr, sizeof(hdr));
+ queue_reply(adap->dev_data, (char *)path, path_len);
+ queue_reply(adap->dev_data, (char *)token, tok_len);
+}
+
+static LIST_HEAD(watch_list);
static ssize_t xenbus_dev_write(struct file *filp,...
2012 Dec 13
4
[PATCH V3] libxenstore: filter watch events in libxenstore when we unwatch
...token if there are no more pending watches. */
- if (list_empty(&h->watch_list) && (h->watch_pipe[0] != -1))
- while (read(h->watch_pipe[0], &c, 1) != 1)
- continue;
-
+ xs_maybe_clear_watch_pipe(h);
mutex_unlock(&h->watch_mutex);
assert(msg->hdr.type == XS_WATCH_EVENT);
@@ -855,14 +873,66 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num)
bool xs_unwatch(struct xs_handle *h, const char *path, const char *token)
{
struct iovec iov[2];
+ struct xs_stored_msg *msg, *tmsg;
+ bool res;
+ char *s, *p;
+ unsigned int i;
+ char *l_token, *l_path;...
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
2008 Jan 17
0
[PATCH] [Mini-OS] add xenbus token support and separate watch event queues
...@@ -91,7 +109,7 @@ char* xenbus_wait_for_value(const char*
free(res);
if(r==0) break;
- else wait_for_watch();
+ else xenbus_wait_for_watch();
}
return NULL;
}
@@ -129,20 +147,32 @@ static void xenbus_thread_func(void *ign
if(msg.type == XS_WATCH_EVENT)
{
- char* payload = (char*)malloc(sizeof(msg) + msg.len);
- char *path,*token;
+ struct xenbus_event *event = malloc(sizeof(*event) + msg.len),
+ *volatile *events = NULL;
+ char *data = (char*)event + sizeof(*event...
2013 Sep 12
6
[PATCH] RFC xen: suppress Coverity warnings about atomic_read and atomic_set.
Coverity generates false positives when read_atomic() and
write_atomic() are called with pointers to objects smaller than 64
bits (because it can''t see that the 64-bit access in the switych
statement is dead code).
I don''t want to automatically suppress all ofthose, because
read_atomic() and write_atomic() could still be called with mis-cast
pointers, but for atomic_t accessors
2005 Aug 04
0
[PATCH 6/11] Xenstore watch rework
...do_introduce(conn, in);
+ do_introduce(conn, in);
+ break;
case XS_RELEASE:
- return do_release(conn, onearg(in));
+ do_release(conn, onearg(in));
+ break;
case XS_GETDOMAINPATH:
- return do_get_domain_path(conn, onearg(in));
+ do_get_domain_path(conn, onearg(in));
+ break;
case XS_WATCH_EVENT:
default:
eprintf("Client unknown operation %i", in->hdr.msg.type);
send_error(conn, ENOSYS);
- return false;
}
}
@@ -1164,6 +1230,8 @@
struct buffered_data *in = NULL;
enum xsd_sockmsg_type type = conn->in->hdr.msg.type;
jmp_buf talloc_fail;
+
+ assert(con...
2005 Sep 08
45
/proc/xen/xenbus supports watch?
Hi,
Anybody (Christian?) could please tell me if we can get the support
for registering watch with /proc/xen/xenbus? (..OK, I know that we
will change it this /proc stuff to a device soon)
So far we can only do read/write/rm. I really miss the xen watch feature.
Many thanks,
Hieu
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
2007 Apr 18
20
[patch 00/20] XEN-paravirt: Xen guest implementation for paravirt_ops interface
This patch series implements the Linux Xen guest in terms of the
paravirt-ops interface. The features in implemented this patch series
are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen console
* virtual block
2007 Apr 18
20
[patch 00/20] XEN-paravirt: Xen guest implementation for paravirt_ops interface
This patch series implements the Linux Xen guest in terms of the
paravirt-ops interface. The features in implemented this patch series
are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen console
* virtual block
2007 Apr 18
20
[patch 00/20] XEN-paravirt: Xen guest implementation for paravirt_ops interface
This patch series implements the Linux Xen guest in terms of the
paravirt-ops interface. The features in implemented this patch series
are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen console
* virtual block
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen hvc console (console=hvc0)
*
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen hvc console (console=hvc0)
*
2007 Apr 18
24
[patch 00/24] Xen-paravirt_ops: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest as a paravirt_ops
backend. The features in implemented this patch series are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen hvc console (console=hvc0)
*
2007 Apr 18
25
[patch 00/21] Xen-paravirt: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest in terms of the
paravirt-ops interface. The features in implemented this patch series
are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen console
* virtual
2007 Apr 18
25
[patch 00/21] Xen-paravirt: Xen guest implementation for paravirt_ops interface
Hi Andi,
This patch series implements the Linux Xen guest in terms of the
paravirt-ops interface. The features in implemented this patch series
are:
* domU only
* UP only (most code is SMP-safe, but there's no way to create a new vcpu)
* writable pagetables, with late pinning/early unpinning
(no shadow pagetable support)
* supports both PAE and non-PAE modes
* xen console
* virtual