aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
Commit message (Collapse)AuthorAgeFilesLines
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-162-2/+3
| | | | | | | | | | | | | | | 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>
* tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}Roger Pau Monne2011-11-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Create two new variables called APPEND_ and PREPEND_ to add compile flags at the beginning or at the end of the search path. Added a new semantic for user defined compile flags, here is the list of possible options: PREPEND_LIB: add libraries to the search path before xen (before xen installation folders). PREPEND_INCLUDES: add headers to the search path before xen (before xen installation folders). APPEND_LIB: add libraries to the search path at the end (after all xen installation folders have been added). APPEND_INCLUDES: add libraries to the search path at the end (after all xen installation folders have been added). EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the same effect as PREPEND_INCLUDES and PREPEND_LIB. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Enable superpages for HVM domains by defaultGeorge Dunlap2011-05-261-1/+1
| | | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: remove pattern matched linking rulesIan Campbell2011-03-311-7/+11
| | | | | | | | | Most subdirs only build a single tool to start with and those which build multiple tools often have different linkage requirements. 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>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-311-9/+5
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). 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>
* tools: do not link against unused libraries.Ian Campbell2011-03-172-6/+15
| | | | | | | | | | | | | | | | | A fair few things under tools link against libraries which they don't even use. Most of this appears to come from copy-and-pasting previous Makefile snippets and cargo-culting plus the tendency to define global $(LIBS) even for Makefiles which build multiple separate utilities or libraries. Identified by comparing a build with --as-needed to one without by looking at the NEEDED header of all ELF objects. 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>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-6/+5
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/xcutils: xc_save: add missing whitespaceOlaf Hering2010-12-161-1/+1
| | | | | | Add missing whitespace between the two error strings. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* tools: cleanup domain save switch_qemu_logdirty callbackIan Campbell2010-10-211-3/+5
| | | | | | | | | | | | | | | | | Move the function into struct save_callbacks with the others and add the void *closure to the callback arguments. Add and propagate an error return code from the callback. Use this in libxl to pass the save context to libxl__domain_suspend_common_switch_qemu_logdirty allowing us to reuse the parent's xenstore handle, gc context etc. Also add an apparently missing libxl__free_all to libxl__domain_suspend_common. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-1/+1
| | | | | | | | | | | | | | | | Linker command lines are order-sensitive. Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new variable after the objects to link. This resolves build errors in xenpagin and blktap with recent toolchains. rename SHLIB_CFLAGS to SHLIB_LDFLAGS rename LDFLAGS_* to LDLIBS_* move LDFLAGS usage after CFLAGS in CC calls remove stale comments in xenpaging Makefile Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-284-22/+29
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libelf: Tidy up logging and remove dependency on stdio.Keir Fraser2010-05-281-1/+1
| | | | | | | | | | | libelf now permits callers to specify logging callback functions, rather than a FILE*. libelf's non-Xen callers are all libxc users, so the stdio dependency and the default logging callback function (which calls vfprintf) is now in libxc. Xen's use of libxc is unaffected in this patch. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* Change the global suspend event channel lock file to a per-domain lock fileKeir Fraser2010-05-041-1/+1
| | | | | | | | This allows multiple guests to be migrated or protected by Remus simultaneously. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Brendan Cully <brendan@cs.ubc.ca>
* Remus: Add callbacks for suspend, postcopy and preresume in xc_domain_save.Keir Fraser2009-11-091-2/+5
| | | | | | This makes it possible to perform repeated checkpoints. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* Fix some issues for HVM log dirty:Keir Fraser2009-09-071-87/+36
| | | | | | | | | * Add necessary logging dirty in qemu to avoid guest error with intensive disk access when live migration * Take place of shared memory between qemu and migration tools by new added hypercall, which is clean and simple Signed-Off-By: Zhai, Edwin <edwin.zhai@intel.com>
* Add support for superpages (hugepages) in PV domainKeir Fraser2009-05-261-3/+8
| | | | | | | | | | | | | | | | | | This patch adds the option "superpages" to the domain configuration file. If it is set, the domain is populated using 2M pages. This code does not support fallback to small pages. If the domain can not be created with 2M pages, the create will fail. The patch also includes support for saving and restoring domains with the superpage flag set. However, if a domain has freed small pages within its physical page array and then extended the array, the restore will fill in those freed pages. It will then attempt to allocate more than its memory limit and will fail. This is significant because apparently Linux does this during boot, thus a freshly booted Linux image can not be saved and restored successfully. Signed-off-by: Dave McCracken <dcm@mccr.org>
* xc_save: fixes typo in error message.Keir Fraser2009-04-221-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Move the suspend event channel function to libxc, it will use theKeir Fraser2009-03-181-89/+25
| | | | | | /var/lib/xen/suspend_evtchn_lock.d to protect the access. Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
* xc_save: remove the dependency on the global si structureKeir Fraser2009-03-181-33/+28
| | | | Signed-off-by: Jiang Yunhong <yunhong.jiang@intel.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-121-6/+2
| | | | | | | | | | | | | | | | | | | | | | If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Move libelf headers out of xen public header dir.Keir Fraser2009-01-081-1/+1
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix domain save when guest is in S3.Keir Fraser2008-12-051-8/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Do not request domain shutdown if in S3 state during domain save.Keir Fraser2008-12-031-10/+26
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save/xc_restore: Fix wrong data typeKeir Fraser2008-09-172-4/+4
| | | | | | | | xc_interface_open() may return -1, but if we define xc_fd as unsigned int, then -1 will be > 0. Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: ignore the first suspend event channel notificationKeir Fraser2008-09-081-31/+47
| | | | | | | | | | | | | I've noticed that the suspend event channel becomes pending as soon as it is bound. I'm not sure why or whether this is intentional, but it means that the suspend function will return before the domain has completed suspending unless the first notification is cleared. Without this patch, xc_domain_save may find that the guest has not suspended and sleep in 10ms chunks until it does. Typically this is several milliseconds of wasted time. From: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: Clean up (*suspend)() callback hook.Keir Fraser2008-09-081-9/+9
| | | | Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_save: Janitorial work.Keir Fraser2008-09-081-17/+10
| | | | | | | | Remove an unused variable. Replace errx by warnx when cleanup code follows. From: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* lsevtchn: Improve this evtchn reporting tool.Keir Fraser2008-09-051-21/+27
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Cleanups to suspend-event-channel patches.Keir Fraser2008-07-041-18/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Teach xc_save to use event-channel-based domain suspend if available.Keir Fraser2008-07-041-1/+137
| | | | | | | | | | If the guest provides a suspend event channel through xenstore, xc_save will use it in preference to the old xenstore-based method. Xend is still informed when the domain has suspended so that it can perform device migration in parallel with last-round migration. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
* lsevtchn: Simple tool to list event channel states for a domain.Keir Fraser2008-04-092-1/+60
| | | | Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Fix xc_save compileKeir Fraser2008-03-181-0/+1
| | | | | | Add missing <err.h> include. Signed-off-by: John Levon <john.levon@sun.com>
* Define CFLAGS and LDFLAGS for libxenstore.Keir Fraser2008-01-271-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenguest.Keir Fraser2008-01-271-4/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Define CFLAGS and LDFLAGS for libxenctrl.Keir Fraser2008-01-271-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add PRIVATE_BINDIR. Use it.Keir Fraser2008-01-261-5/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-261-1/+1
| | | | | | | This patch merges the two versions of public header generation currently used in the build into one. Signed-off-by: Bastian Blank <waldi@debian.org>
* Apply PREFIX directly to LIBDIR.Keir Fraser2008-01-221-1/+1
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* tools: LDFLAGS in link linesKeir Fraser2008-01-171-1/+1
| | | | | | | LDFLAGS is not honoured by a couple of link lines in tools/*, but should be. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* [HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.Tim Deegan2007-07-261-7/+18
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Live-migration fixups after 15639:c585f993385cTim Deegan2007-07-241-1/+3
| | | | | | Use the same xenstore area for log-dirty commands as for save/continue, and avoid a race condition by acking the save command after the save. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* Specify -fno-strict-aliasing in root build config file.Keir Fraser2007-07-071-1/+1
| | | | | | | | Fixes correctness issues with xenstored and gcc-4.2. Original patch by Charles Coffing <ccoffing@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [HVM] Save/restore: merge xc_linux_save and xc_hvm_saveTim Deegan2007-04-111-6/+3
| | | | | | | | into xc_domain_save, like we did for xc_domain_restore Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com> --HG-- rename : tools/libxc/xc_linux_save.c => tools/libxc/xc_domain_save.c
* [HVM] Save/restore: merge xc_linux_restore and xc_hvm_restoreTim Deegan2007-04-051-8/+2
| | | | | | | | into one function (and one file) since they share a lot of code Signed-off-by: Tim Deegan <Tim.Deegan@øensource.com> --HG-- rename : tools/libxc/xc_linux_restore.c => tools/libxc/xc_domain_restore.c
* Clean up save/restore state record handling. No need for Python tokfraser@localhost.localdomain2007-04-041-12/+12
| | | | | | read out the 'p2m size' field. Also that field is not needed at all for HVM guests. Signed-off-by: Keir Fraser <keir@xensource.com>
* hvm: Lazy memory allocation during HVM restore. General cleanup andkfraser@localhost.localdomain2007-04-041-18/+18
| | | | | reduce gross assumptions about memory-map layout. Signed-off-by: Keir Fraser <keir@xensource.com>
* Some save/restore cleanups.Steven Hand2007-04-021-16/+17
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [HVM] Save/restore: don't get guest size from "memory_static_min"Tim Deegan2007-03-291-2/+0
| | | | | | | since it doesn't mean that any more. This is a sticking-plaster to get HVM S/R working until the proper memory-map handling patch is ready. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM][QEMU] Save/restore: enable HVM live migrationTim Deegan2007-03-162-5/+130
| | | | | by getting page-dirtying bitmaps from qemu-dm as well as from xen. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>