search for: xbt_null

Displaying 20 results from an estimated 59 matches for "xbt_null".

2010 Aug 12
0
[PATCH, v2]: xl: Implement per-API-call garbage-collection lifetime
...x *ctx, uint32_t domid) { + libxl_gc gc = LIBXL_INIT_GC(ctx); char *path; char *state; - int ret; + int ret, rc = 0; if (is_hvm(ctx, domid)) { - path = libxl_sprintf(ctx, "/local/domain/0/device-model/%d/state", domid); - state = libxl_xs_read(ctx, XBT_NULL, path); + path = libxl_sprintf(&gc, "/local/domain/0/device-model/%d/state", domid); + state = libxl_xs_read(&gc, XBT_NULL, path); if (state != NULL && !strcmp(state, "paused")) { - libxl_xs_write(ctx, XBT_NULL, libxl_sprintf(ctx...
2013 Nov 25
22
[PATCH 0/4] Coverity fixes for tools/libxl
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> -- 1.7.10.4
2010 Sep 02
7
[PATCH] libxl: make libxl communicate with xenstored by socket or xenbus driver
...ar *kvs[3]; - int rc; struct xs_handle *xsh; - xsh = xs_daemon_open(); /* we mustn''t use the parent''s handle in the child */ kvs[0] = "image/device-model-pid"; @@ -1398,9 +1396,10 @@ return; kvs[2] = NULL; - rc = xs_writev(xsh, XBT_NULL, starting->dom_path, kvs); - if (rc) - return; + xsh = xs_daemon_open(); + if (!xsh) + xsh = xs_domain_open(); + xs_writev(xsh, XBT_NULL, starting->dom_path, kvs); xs_daemon_close(xsh); } diff -r eff592364826 tools/libxl/libxl_device.c --- a/tools/libxl/libxl...
2011 Nov 30
4
Compile error with Ubuntu 11.10
Hi, compilation of xen-unstable with a fresh Ubuntu 11.10 x86_64 fails with following error: cc1: warnings being treated as errors libxl_create.c: In function ‘store_libxl_entry’: libxl_create.c:465: error: format not a string literal and no format arguments Steps to reproduce: - Install Ubuntu 11.10 ( http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=latest) - sudo
2013 Apr 17
10
xl network-attach SEGV in 4.2 and 4.1
...f --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 5783cd2..9e06a7d 100644 - --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -2569,7 +2569,8 @@ void libxl__device_nic_add(libxl__egc *egc, uint32_t domid, goto out_free; } if (!(l = libxl__xs_directory(gc, XBT_NULL, - - libxl__sprintf(gc, "%s/device/vif", dompath), &nb))) { + libxl__sprintf(gc, "%s/device/vif", dompath), &nb)) || + nb == 0) { nic->devid = 0; } else {...
2011 Nov 04
2
[PATCH V3 REBASE 1/2] libxl_qmp: Introduce libxl__qmp_pci_del
To remove a pci passthough device from QEMU (upstream). Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> --- tools/libxl/libxl_internal.h | 2 ++ tools/libxl/libxl_qmp.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 0 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 1dff211..84da6b1 100644 ---
2011 Jun 29
5
[PATCH] xen: introduce xen_change_state_handler
...t char *state) { char path[50]; + if (xs == NULL) { + fprintf(stderr, "xenstore connection not initialized\n"); + exit(1); + } + snprintf(path, sizeof (path), "/local/domain/0/device-model/%u/state", xen_domid); - if (!xs_write(s->xenstore, XBT_NULL, path, state, strlen(state))) { + if (!xs_write(xs, XBT_NULL, path, state, strlen(state))) { fprintf(stderr, "error recording dm state\n"); exit(1); } @@ -823,15 +828,20 @@ static void xen_main_loop_prepare(XenIOState *state) if (evtchn_fd != -1) {...
2010 Aug 09
1
[PATCH 1 of 4] xenconsoled: do not write the pty under serial
...0 +++ b/tools/console/daemon/io.c Mon Aug 09 14:26:22 2010 +0100 @@ -451,27 +451,6 @@ static int domain_create_tty(struct doma free(data); } free(path); - } - - success = asprintf(&path, "%s/limit", dom->serialpath) != -1; - if (!success) - goto out; - data = xs_read(xs, XBT_NULL, path, &len); - if (data) { - dom->buffer.max_capacity = strtoul(data, 0, 0); - free(data); - } - free(path); - - success = asprintf(&path, "%s/tty", dom->serialpath) != -1; - if (!success) - goto out; - success = xs_write(xs, XBT_NULL, path, slave, strlen(slave)); - free...
2012 Nov 07
4
[PATCH 2/2] 4.1.2 blktap2 cleanup fixes.
...eturn; @@ -75,5 +76,11 @@ void libxl__device_destroy_tapdisk(libxl err = tap_ctl_find(type, disk, &tap); if (err < 0) return; + /* + * Remove the instance of the backend device to avoid a deadlock with the + * removal of the tap device. + */ + xs_rm(ctx->xsh, XBT_NULL, be_path); + tap_ctl_destroy(tap.id, tap.minor); } diff -r b184698e0893 tools/libxl/libxl_device.c --- a/tools/libxl/libxl_device.c Tue Nov 06 19:53:48 2012 -0600 +++ b/tools/libxl/libxl_device.c Tue Nov 06 19:54:23 2012 -0600 @@ -250,8 +250,7 @@ int libxl__device_destroy(libxl_ctx *ctx...
2013 Feb 01
2
[PATCH v2 02/03] HVM firmware passthrough libxl support
This patch introduces support for two new parameters in libxl: smbios_firmware=<path_to_smbios_structures_file> acpi_firmware=<path_to_acpi_tables_file> The changes are primarily in the domain building code where the firmware files are read and passed to libxc for loading into the new guest. After the domain building call to libxc, the addresses for the loaded blobs are returned and
2012 Sep 25
2
[PATCH V2] libxenstore: filter watch events in libxenstore when we unwatch
...t iovec iov[2]; + struct xs_stored_msg *msg, *tmsg; + bool res; + char *s, *p; + unsigned int i; + char *l_token, *l_path; iov[0].iov_base = (char *)path; iov[0].iov_len = strlen(path) + 1; iov[1].iov_base = (char *)token; iov[1].iov_len = strlen(token) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, - ARRAY_SIZE(iov), NULL)); + res = xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, + ARRAY_SIZE(iov), NULL)); + + /* Filter the watch list to remove potential message */ + mutex_lock(&h->watch_mutex); + + if (list_empty(&h->watch_list)) { + mutex_unlock(&a...
2009 Nov 18
6
[PATCH 1/3] libxenlight: Clean up logging arrangements
...hutdown(struct libxl_ctx *ctx, uint32_t domid, int req) return ERROR_INVAL; dom_path = libxl_xs_get_dompath(ctx, domid); + if (!dom_path) + return ERROR_FAIL; + shutdown_path = libxl_sprintf(ctx, "%s/control/shutdown", dom_path); xs_write(ctx->xsh, XBT_NULL, shutdown_path, req_table[req], strlen(req_table[req])); @@ -347,20 +353,21 @@ static int libxl_destroy_device_model(struct libxl_ctx *ctx, uint32_t domid) pid = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "/local/domain/%d/image/device-model-pid", domid)); if (!pid) { -...
2012 Nov 07
4
[PATCH 1/2] 4.1.2 blktap2 cleanup fixes.
...return NULL; } + + +void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path) +{ + char *path, *params, *type, *disk; + int err; + tap_list_t tap; + + path = libxl__sprintf(gc, "%s/tapdisk-params", be_path); + if (!path) return; + + params = libxl__xs_read(gc, XBT_NULL, path); + if (!params) return; + + type = params; + disk = strchr(params, '':''); + if (!disk) return; + + *disk++ = ''\0''; + + err = tap_ctl_find(type, disk, &tap); + if (err < 0) return; + + tap_ctl_destroy(tap.id, tap.minor); +} dif...
2012 Dec 14
1
[PATCH V4] libxenstore: filter watch events in libxenstore when we unwatch
...t iovec iov[2]; + struct xs_stored_msg *msg, *tmsg; + bool res; + char *s, *p; + unsigned int i; + char *l_token, *l_path; iov[0].iov_base = (char *)path; iov[0].iov_len = strlen(path) + 1; iov[1].iov_base = (char *)token; iov[1].iov_len = strlen(token) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, - ARRAY_SIZE(iov), NULL)); + res = xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, + ARRAY_SIZE(iov), NULL)); + + if (!h->unwatch_filter) /* Don''t filter the watch list */ + return res; + + + /* Filter the watch list to remove potential message */ + mutex_lo...
2013 Jan 18
6
[PATCH v1 01/02] HVM firmware passthrough libxl support
This patch introduces support for two new parameters in libxl: smbios_firmware=<path_to_smbios_structures_file> acpi_firmware=<path_to_acpi_tables_file> The changes are primarily in the domain building code where the firmware files are read and passed to libxc for loading into the new guest. After the domain building call to libxc, the addresses for the loaded blobs are returned and
2006 Jun 15
2
xenbus api
...-3.0-testing). I had to modify the network backend driver (file netback.c), and each call to a xenbus function in a virtual machine make my machine reboot (not the virtual, the real machine). for example, I ''ve add this line of code (wich is useless): printk("%d",xenbus_exists(XBT_NULL,"/local/domain/0/","domid")); after a network packet reception. When I launch my virtual machine, the station reboot after the virtual machine console log is stopped after this block: TCP: Hash tables configured (established 8192 bind 8192) NET: Registered protocol family 1 NE...
2011 Dec 14
18
[PATCH 0 of 3] Support for VM generation ID save/restore and migrate
This patch series adds support for preservation of the VM generation ID buffer address in xenstore across save/restore and migrate, and also code to increment the value in all cases except for migration. The first patch modifies creation of the hvmloader key in xenstore and adds creation of a new read/write hvmloader/generation-id-addr key. The second patch changes hvmloader to use the new key (as
2011 Sep 21
1
[PATCH] libxl: attempt to cleanup tapdisk processes on disk backend destroy
...return NULL; } + + +void libxl__device_destroy_tapdisk(libxl__gc *gc, char *be_path) +{ + char *path, *params, *type, *disk; + int err; + tap_list_t tap; + + path = libxl__sprintf(gc, "%s/tapdisk-params", be_path); + if (!path) return; + + params = libxl__xs_read(gc, XBT_NULL, path); + if (!params) return; + + type = params; + disk = strchr(params, '':''); + if (!disk) return; + + *disk++ = ''\0''; + + err = tap_ctl_find(type, disk, &tap); + if (err < 0) return; + + tap_ctl_destroy(tap.id, tap.minor); +} dif...
2013 May 13
11
[PATCH] Fix QEMU HVM hotplug race in QEMU traditional (Xen 4.1, Xen 4.2, and Xen 4.3) (v1).
Hey Ian and Stefano, Please see this thread: http://lists.xen.org/archives/html/xen-devel/2013-05/msg01053.html for the debug patches and some of the discussion. These three patches fix an race that has been in QEMU traditional for a long time. The guts of the bug is that if you have a guest with these options: vcpus=1 maxvcpus=32 and do ''xl vcpu-set <guest> 32'' the
2013 Jul 06
1
[PATCH 1/2] xenstore: don't die on access-denied child nodes in 'xenstore ls'
...b/tools/xenstore/xenstore_client.c index 3ac214b..996ee64 100644 --- a/tools/xenstore/xenstore_client.c +++ b/tools/xenstore/xenstore_client.c @@ -134,8 +134,13 @@ static void do_ls(struct xs_handle *h, char *path, int cur_depth, int show_perms unsigned int num, len; e = xs_directory(h, XBT_NULL, path, &num); - if (e == NULL) + if (e == NULL) { + if(errno == EACCES && cur_depth) + /* Don''t stop listing just because access was denied to a descendant */ + return; + err(1, "xs_directory (%s)", path); + } for...