aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools: xencommons init script: Fix setting XENSTORED_ROOTDIRJim Fehlig2012-01-261-1/+1
| | | | | | | | | Due to a logic bug, XENSTORED_ROOTDIR was not being set to default value when zero length. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: fix parse_backend_path and device_backend_path to be mutualRoger Pau Monne2012-01-261-4/+3
| | | | | | | | | | | Currently if libxl__parse_backend_path is used and then you try to get the original path again with libxl__device_backend_path the result is wrong. This patch fixes the issue, so transformation from path to libxl__device and back is reciprocal. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Fix build.Tim Deegan2012-01-261-1/+1
| | | | | | | Bring xc_mem_paging.c in line with other users of munlock in libxc. Otherwise it trips over -Werror=unused-value Signed-off-by: Tim Deegan <tim@xen.org>
* Tools: Add a sharing command to xl for information about shared pagesAndres Lagar-Cavilla2012-01-265-0/+76
| | | | | | | | | | | Also add the global sharing statistics to the libxl physinfo. This is a slight departure from libxc, but there's no reason libxl physinfo can't include extra bits of useful and relevant information. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* Tools: Expose to libxc the total number of shared frames and space savedAndres Lagar-Cavilla2012-01-262-0/+27
| | | | | | Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Tim Deegan <tim@xen.org>
* Update memshr API and toolsAndres Lagar-Cavilla2012-01-268-38/+139
| | | | | | | | | | | | | | | | | | | | | | | This patch is the folded version of API updates, along with the associated tool changes to ensure that the build is always consistent. API updates: - The source domain in the sharing calls is no longer assumed to be dom0. - Previously, the mem sharing code would return an opaque handle to index shared pages (and nominees) in its global hash table. By removing the hash table, the handle becomes a version, to avoid sharing a stale version of a page. Thus, libxc wrappers and tools need to be updated to recall the share functions with the information needed to fetch the page (which they readily have). Tool updates: The only (in-tree, that we know of) consumer of the mem sharing API is the memshr tool. This is updated to use the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* tools/libxc: fix error handling in xc_mem_paging_loadOlaf Hering2012-01-261-5/+10
| | | | | | | | | | | | | | xc_mem_paging_load() does not pass errors in errno and the actual errno from xc_mem_event_control() is overwritten by munlock(). xenpaging_populate_page() needs to check errno, but with the switch to xc_mem_paging_load() it could not receive ENOMEM anymore. Update xc_mem_paging_load() to return -1 and preserve errno during munlock(). Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Keir Fraser <keir@xen.org>
* libxl: rename is_assigned to is_pcidev_in_arrayDoug Magee2012-01-241-4/+4
| | | | | | | | | | | All this function does is check to see if a device is in an array of pcidevs passed by the caller. The function name can be misleading if ever used to check against a list of devices other than those assigned to a domain. Signed-off-by: Doug Magee <djmagee@mageenet.net> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xl: Add missing trigger for the xl trigger cmd.Jean Guyader2012-01-241-1/+1
| | | | | | | | Add s3resume trigger in the usage of the xl trigger cmd. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: remove _libxl_json_internal.h from libxl_json.hIan Campbell2012-01-242-2/+3
| | | | | | | | | | libxl_json.h is intended as a user-includable header for applications which would like to use libyajl directly with libxl types. It should not expose libxl internals. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: use new qemu at the location where xen-unstable installs it2012-01-241-1/+1
| | | | | | | From: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Clone and build Seabios by default2012-01-243-2/+93
| | | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Clone and build upstream Qemu by default2012-01-241-0/+44
| | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* move the call to xen-setup after libxc and xenstore are built2012-01-241-4/+5
| | | | | | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Move the call to xen-setup, the wrapper script to configure qemu-xen-traditional, right before building qemu-xen-traditional and after libxc and xenstore are already built. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Rename ioemu-dir as qemu-xen-traditional-dir2012-01-241-13/+13
| | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Introduce git-checkout.sh2012-01-241-16/+4
| | | | | | | | | | From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Introduce a script to perform git checkout on an external git tree; use git-checkout.sh in ioemu-dir-find. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libelf-loader: introduce elf_load_imageStefano Stabellini2012-01-232-3/+10
| | | | | | | | | | | | | | Implement a new function, called elf_load_image, to perform the actually copy of the elf image and clearing the padding. The function is implemented as memcpy and memset when the library is built as part of the tools, but it is implemented as raw_copy_to_guest and raw_clear_guest when built as part of Xen, so that it can be safely called with an HVM style dom0. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* tools/libvchan: Beef up the CPU barriers in libvchan.Keir Fraser2012-01-211-9/+9
| | | | | | Although they were sufficient for x86, they weren't safe more generally. Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: Update rmb/wmb for x86.Keir Fraser2012-01-211-4/+6
| | | | | | Only the compiler needs to see the barriers; not the CPU. Signed-off-by: Keir Fraser <keir@xen.org>
* libxl: libxl_qmp.c should use libxl's own list macros, since theyKeir Fraser2012-01-211-9/+10
| | | | | | | exist. Also, older Linux versions do not have SIMPLEQ macros in sys/queue.h. Signed-off-by: Keir Fraser <keir@xen.org>
* libxl: VM generation ID: Add missing gate for HVM domain.Paul Durrant2012-01-171-1/+3
| | | | | | | | This will fix localhost migrate failures found by the automatic tests. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: drop vfs path -- fsback/front were deleted some time agoIan Campbell2012-01-161-2/+0
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ocaml: Correct ocaml type name for Aggregate types.Ian Campbell2012-01-101-0/+2
| | | | | | | | No change to the generated code because this path isn't used yet. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: Fix leaks on context init failureIan Jackson2012-01-131-8/+12
| | | | | | | | | | | | Several of the error exits from libxl_ctx_alloc leaked the context struct itself and sometimes other resources too. Fix this by using the standard "rc = ERROR_FOO; goto out" error handling style throughout. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: Provide more formal libxl__ctx_lock and _unlockIan Jackson2012-01-131-10/+13
| | | | | | | | | | | | | | Previously the only official interface for the ctx lock was the CTX_LOCK and CTX_UNLOCK convenience macros, which assume and use "ctx" from the surrounding scope. Instead, provide libxl__ctx_lock and _unlock functions which can be used by these convenience macros, and other callers who have nonstandard requirements. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: move a lot more includes into libxl_internal.hIan Jackson2012-01-1327-138/+53
| | | | | | | | | | | | | | | | | Move a lot of #include <stdfoo.h> from individual files into libxl_internal.h. This helps avoid portability mistakes where necessary system headers are omitted from individual files, and is also of course a convenience when developing. Also add #include "libxl_osdeps.h" /* must come before any other headers */ to the top of most libxl*.c files, so that anyone who adds any headers before libxl_internal.h will put the in the right place. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* xenstore: New function xs_path_is_subpathIan Jackson2012-01-132-0/+24
| | | | | | | | | This utility function compares two paths, textually and reports whether one is a subpath (a child path) of the other. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: make LIBXL_INIT_GC a statement, not an initialiserIan Jackson2012-01-132-3/+8
| | | | | | | | | | | | | | | | | | | | | Previously LIBXL_INIT_GC was an initialiser, which you were expected to use like this: libxl__gc gc = LIBXL_INIT_GC(ctx); But we are going to want to put things in the gc which are to be initialised using other macros. That means that LIBXL_INIT_GC has to become a statement too. So instead, we make it so that it's used like this: libxl_gc gc; LIBXL_INIT_GC(gc,ctx); In fact there are only a couple of callers now, including GC_INIT which uses this trick: libxl_gc gc[1]; LIBXL_INIT_GC(gc[0],ctx); Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxl: fix build with make prior to 3.81Jan Beulich2012-01-121-1/+3
| | | | | | | | | Up to 3.80, make only supported simple 'else' constructs, which got violated by 24432:e0effa7c04f5. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenpaging: convert mem_event_t to struct mem_eventOlaf Hering2012-01-092-5/+5
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: convert xenpaging_t to struct xenpagingOlaf Hering2012-01-095-23/+23
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpaging: convert xenpaging_victim_t to struct victimOlaf Hering2012-01-094-11/+9
| | | | | Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* xenpm: assorted adjustmentsJan Beulich2012-01-101-42/+31
| | | | | | | | | | | | | | | | | - use consistent error values (stop mixing of [positive] errno values with literal -E... ones) - properly format output - don't use leading zeros in decimal output - move printing of average frequency into P-state conditional (rather than a C-state one) - don't print some C-state related info when CPU idle management is disabled in the hypervisor - use calloc() for array allocations that also got cleared via memset() so far Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: add feature flag to xenstore for XS_RESET_WATCHESOlaf Hering2012-01-052-0/+2
| | | | | | | | | | Tell guest about availibilty of xenstoreds XS_RESET_WATCHES function. Guests can not issue this command unconditionally because some buggy toolstacks (such as EC2) do not ignore unknown commands properly. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* flask/policy: add missing manage_domain rulesDaniel De Graaf2012-01-102-0/+9
| | | | | | | | The updated example policy did not include rules to allow managing the created domains (pause, unpause, destroy); allow these actions. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* docs: Update xsm-flask documentationDaniel De Graaf2012-01-101-1/+1
| | | | | Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* blktap2/vhd: add -liconv when linking if using libiconvRoger Pau Monne2011-12-201-0/+4
| | | | | | | | | | | | | | | | | If libiconv is detected on the system add -liconv when linking the libvhd library. If -liconv is not added when compiling libvhd with libiconv the following error occours when linking vhd-util and vhd-update: gcc -o vhd-util vhd-util.o -Llib -lvhd lib/libvhd.so: undefined reference to `libiconv_open' lib/libvhd.so: undefined reference to `libiconv_close' lib/libvhd.so: undefined reference to `libiconv' Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap2: remove local definitions and include byteswap.hRoger Pau Monne2011-12-201-37/+2
| | | | | | | | | | | Use the same approach as tools/blktap2/include/libvhd.h, remove local definitions of bswap* and include byteswap.h. Also remove the HAVE_BYTESWAP_H ifdef, since it was not defined in this context (it's defined by QEMU). Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* blktap: remove local definitions and include byteswap.hRoger Pau Monne2011-12-201-37/+1
| | | | | | | | | | | Use the same approach as tools/blktap2/include/libvhd.h, remove local definitions of bswap* and include byteswap.h. Also remove the HAVE_BYTESWAP_H ifdef, since it was not defined in this context (it's defined by QEMU). Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-1614-13/+130
| | | | | | | | | | | | | | | Add code to track the address of the VM generation ID buffer across a save/restore or migrate, and increment it as necessary. The address of the buffer is written into xenstore by hvmloader at boot time. It must be read from xenstore by the caller of xc_domain_save() and then written back again by the caller of xc_domain_restore(). Note that the changes to xc_save.c and xc_restore.c are merely sufficient for them to build. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: Add hvm specific ro and rw nodes.Paul Durrant2011-12-162-3/+11
| | | | | | | | | | | The hvmloader node was created by libxl__create_device_model() but it needs to be moved earlier so that it can parent the new rw generation-id-address node. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Open code rw and ro node creation.Paul Durrant2011-12-163-20/+42
| | | | | | | | | | | | | | | | | Use a new libxl__xs_mkdir() to do this and also clean up extraneous node creation while in the neighbourhood. Checking 'xenstore-ls -fp' output before and after shows that, as well as the disappearance of error, drivers, messages and domid, the following perms change is also present: -device/suspend = "" (ndomU) +device/suspend = "" (n0,rdomU) I believe the new perms are more desirable than the old ones. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Add correct const-ness to memshr tool functionsAndres Lagar-Cavilla2012-01-106-5/+9
| | | | | | | | | | This patch addresses some of the compile and link issues with the memshr module. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Fix types used in xc_memshr_* functionsAndres Lagar-Cavilla2012-01-102-21/+21
| | | | | | | | | | | | | Currently the memshr functions use uint32_t for the domid. This actually leads to a funny domid_t -> uint32_t -> domid_t sequence of casts. This patch updates the API functions to be domid_t in the first place. No tools need to be modified with this patch, the casts were implicit. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Jackson <ian.jackson.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: Only retry mapping pages when ENOENT is returnedAndres Lagar-Cavilla2012-01-101-1/+1
| | | | | | | | | | | If the return value from the ioctl() is not ENOENT, it's possible that err[i] will not be updated and libxc will just loop forever. Although it's unlikely that err[i] would not be updated after the ioctl() gets through at least once, it's better to be defensive. Signed-off-by: Adin Scannell <adin@scannell.ca> Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* ipxe: remove tarball on cleanIan Campbell2012-01-051-1/+1
| | | | | | | | This prevents us picking up a stale tarball when the tag changes. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* pygrub: fix extlinux parsingRoger Pau Monne2012-01-032-1/+21
| | | | | | | | | | | | | | | | | | pygrub was unable to parse extlinux config files correctly, exactly the ones like: LABEL grsec KERNEL vmlinuz-3.0.10-grsec APPEND initrd=initramfs-3.0.10-grsec root=UUID=cfd4a7b4-8c40-4025-b877-8205f1c622ee modules=sd-mod,usb-storage,ext4 xen quiet This patch fixes it, adding a new case when parsing the "append" line, that searches for the initrd image. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: write vifname in xenstore if set.Wei Liu2012-01-051-0/+6
| | | | | | | | Simple fix to enable user to specify vif names. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxl: print out vifname in create dryrun.Wei Liu2012-01-051-0/+2
| | | | | | Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* ipxe: update to upstream versionRoger Pau Monne2011-12-205-167/+11
| | | | | | | | | | | | | Updated ipxe to current tree, which is 540e5960dc6b49eacf367f7c319fd0546474b845: Provide PXENV_FILE_EXIT_HOOK only for ipxelinux.0 builds Removed all the backported patches and updated boot_prompt_option.patch to apply against current ipxe. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson.citrix.com>