aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xg_save_restore.h
Commit message (Collapse)AuthorAgeFilesLines
* libxc: introduce xc_domain_get_guest_width()Dario Faggioli2013-09-131-8/+1
| | | | | | | | | | | | | | As a wrapper to XEN_DOMCTL_get_address_size, and use it wherever the call was being issued directly via do_domctl(), saving quite some line of code. Actually, the function returns the guest width in bytes, rather than directly what XEN_DOMCTL_get_address_size provides (which is a number of bits), since that is what it is useful almost everywhere. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: drop relics of running on non-PAE 32-bit hostsJan Beulich2013-01-241-2/+0
| | | | | | | | | Additionally drop unused (and dangerous) defines and typedefs, plus a minor legibility improvement to setup_pgtables_x86_{32_pae,64}(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* libxc: Support save/restore of up to 4096 VCPUs (increase from 64 VCPUs).Keir Fraser2012-08-221-0/+3
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: introduce XC_SAVE_ID_TOOLSTACKStefano Stabellini2012-05-111-0/+1
| | | | | | | | Introduce a new save_id to save/restore toolstack specific extra information. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* Use a reserved pfn in the guest address space to store mem event ringsTim Deegan2012-03-081-0/+4
| | | | | | | | | | | | | | | | | | This solves a long-standing issue in which the pages backing these rings were pages belonging to dom0 user-space processes. Thus, if the process would die unexpectedly, Xen would keep posting events to a page now belonging to some other process. We update all API-consumers in tree (xenpaging and xen-access). This is an API/ABI change, so please speak up if it breaks your accumptions. The patch touches tools, hypervisor x86/hvm bits, and hypervisor x86/mm bits. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-161-0/+1
| | | | | | | | | | | | | | | 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/libxc: Remus Checkpoint CompressionShriram Rajagopalan2011-12-011-1/+119
| | | | | | | | | | | | | | | | | Instead of sending dirty pages of guest memory as-is, use a simple compression algorithm that sends a RLE-encoded XOR of the page against its last sent copy. A small LRU cache is used to hold recently dirtied pages. Pagetable pages are sent as-is, as they are canonicalized at sender side and uncanonicalized at receiver. [ Fixed up a conflict in sg_save_restore.h. I had to increase the ID values used from -11 and -12 to -12 and -13 because -11 had been taken by ..._HVM_VIRIDIAN in the meantime. -iwj ] Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* Fix save/restore for HVM domains with viridian=1Paul Durrant2011-11-251-0/+1
| | | | | | | | | | | | | xc_domain_save/restore currently pay no attention to HVM_PARAM_VIRIDIAN which results in an HVM domain running a recent version on Windows (post-Vista) locking up on a domain restore due to EOIs (done via a viridian MSR write) being silently dropped. This patch adds an extra save entry for the viridian parameter and also adds code in the viridian kernel module to catch attempted use of viridian functionality when the HVM parameter has not been set. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
* libxc: Save the HVM_PARAM_ACPI_IOPORTS_LOCATIONAnthony Perard2010-11-081-0/+1
| | | | | | | | | This will save the acpi_ioport_location hvm_param in the checkpoint file and set the parameter in Xen at restore. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxl: Fix migration of HVM guestsIan Campbell2010-10-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the default "QemuDeviceModelRecord"-style HVM tail of the migration protocol the size of the qemu save record is unknown at the receiver and therefore it must read until EOF. This is not compatible with the xl migration protocol which contains a post-migration handshake and therefore cannot close the socket on the sending end. What is required is an explicit length field for the save record, which the "RemusDeviceModelState"-style HVM tail includes. Rather than overload the "RemusDeviceModelState" name for a non-Remus use case (on off chance that they need to diverge for some reason in the future) introduce a third style called "DeviceModelRecord0002" which is identical to current "RemusDeviceModelState"-style. Hopefully the inclusion of a number here will allow easier extension in the future without needing to come up with increasingly less helpful names! Also propagate errors from xc_domain_save and libxl__domain_suspend_common to callers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: add xc_maximum_ram_page to wrap XENMEM_maximum_ram_pageIan Campbell2010-10-181-1/+1
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: provide notification of final checkpoint to restore endIan Campbell2010-09-071-0/+1
| | | | | | | | | | | | | | | | | | When the restore code sees this notification it will restore the currently in-progress checkpoint when it completes. This allows the restore end to finish up without waiting for a spurious timeout on the receive fd and thereby avoids unnecessary error logging in the case of a successful migration or restore. In the normal migration or restore case the first checkpoint is always the last. For a rolling checkpoint (such as Remus) the notification is currently unused but could be used in the future for example to provide a controlled failover for reasons other than error Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Brendan Cully <brendan@cs.ubc.ca> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: document save/restore protocolIan Campbell2010-09-031-1/+112
| | | | | | | | | | Reverse engineered from the code, likely contains inaccuracies but I think provides a base to work from. Add symbolic names for the minus-flags. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* # HG changeset patchIan Campbell2010-08-241-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | # User Ian Campbell <ian.campbell@citrix.com> # Date 1282671421 -3600 # Node ID d1dd29a470ef1b9d2c77478a123326036dfe90bb # Parent d7a4adad9c328decbd384d87b23001aea8951b86 tools/libxc, tools/libelf: Relicense under LGPL v2.1 Relicense these two libraries under LGPL v2.1 only except where individual files already included the "or later" provision. Copyright holders have been contacted by Stephen Spector and have all agreed this change. Removed tools/libxc/ia64/aclinux.h since it appeared to be unused. There is a separate, more up to date, copy in xen/include/acpi/platform/aclinux.h which does appear to be used. Clarify the license of MiniOS privcmd.h under the same terms as other tools/include/xen-sys headers. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stephen Spector <stephen.spector@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-5/+5
| | | | | | | | | | | | | | | | | | | | 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>
* libxc: create a domain_info_context structure to store guest_width and ↵Keir Fraser2009-12-011-6/+6
| | | | | | | | p2m_size for macros. Macro now refers to guest_width and p2m_size through a dinfo pointer. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* libxc: The following patch replace the libxc interface to useKeir Fraser2008-06-191-22/+0
| | | | | | | vcpu_guest_context_any_t (which is both 32 and 64 bits) instead of vcpu_guest_context_t. Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
* Tools: fix save/restore of 32-bit PV guests with 64-bit toolsKeir Fraser2008-02-131-0/+17
| | | | | | | by removing some obvious typos, handling CR3 folding and hvirt_start based on guest word-size, and understanding 32-bit INVALID_MFN. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* [TOOLS] Make xc_domain_{save, restore} understand compat guestsTim Deegan2007-09-191-11/+72
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* Move some definitions from xg_save_resotre.h to xg_private.hKeir Fraser2007-02-241-21/+0
| | | | | | which are necessary for the new dump core implementation. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Implement clean return from save/restore failure (so that originalkfraser@localhost.localdomain2007-01-221-5/+4
| | | | | domain can continue execution). Signed-off-by: Andrei Petrov <andrei.petrov@xensource.com>
* Support for save and restore of compatibility guestsEmmanuel Ackaouy2007-01-051-0/+9
| | | | Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
* Remove unused #defines.Steven Hand2006-12-291-6/+0
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* [LIBXC] Convert all printf/fprintf uses to use a macro instead.kaf24@firebug.cl.cam.ac.uk2006-06-071-22/+0
| | | | | | | Thus all can be disabled at compile time. It would be easy to make enabling/disabling a run-time option too. Signed-off-by: Keir Fraser <keir@xensource.com>
* Represent PFNs with their own type, rather than 'unsigned long'.kaf24@firebug.cl.cam.ac.uk2006-06-061-6/+6
| | | | | | ('long' changes size and alignment between 32- and 64-bit ABIs.) Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Fix whitespace in libxc. Tabs are manually fixed.kaf24@firebug.cl.cam.ac.uk2006-04-151-41/+41
| | | | | | | | Trailing whitespace removed with: perl -p -i -e 's/\s+$/\n/g' tools/libxc/*.[ch] Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Added the errno to the messages printed with the ERR macro. Tidy the use ofemellor@leeni.uk.xensource.com2005-11-301-1/+1
| | | | | | | | this macro where newlines have been appended -- the macro does this itself so there is no need to add another one. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Update the memory_op() hypercall. Add two new subcommands, tokaf24@firebug.cl.cam.ac.uk2005-11-211-3/+1
| | | | | | | | | | | | | query a domain's current and maximum memory reservation. Also, XENMEM_maximum_ram_page now returns the max_page directly, rather than writing through a passed-in pointer. Also, disable PAE in the default config (accidentally checked in two changesets ago). Signed-off-by: Keir Fraser <keir@xensource.com>
* Fix 'belt + braces' check in xc_linux_save and improve error handling smh22@firebug.cl.cam.ac.uk2005-11-211-0/+6
| | | | | | | for live migrate (this includes making shadow enable idempotent). Signed-off-by: Steven Hand <steven@xensource.com>
* Many fixes for save/restore and related areas for PAE in particular. Nowsmh22@firebug.cl.cam.ac.uk2005-11-161-12/+22
| | | | | | | | should be able to save/restore successfully on machines with up to 16GB and any size of guest. Signed-off-by: Steven Hand <steven@xensource.com>
* Rename XENVER_parameters to slightly more informativekaf24@firebug.cl.cam.ac.uk2005-11-161-3/+3
| | | | | | | | XENVER_platform_parameters. Signed-off-by: Keir Fraser <keir@xensource.com>
* More fixes for save/restore; use configured memory for generating sxp.smh22@firebug.cl.cam.ac.uk2005-11-091-0/+1
| | | | | Signed-off-by: Steven Hand <steven@xensource.com>
* Enable save/restore for PAE domains.smh22@firebug.cl.cam.ac.uk2005-11-081-0/+123
This includes quite a few cleanups / refactoring of the old code, some of which is intended to prepare for 64-bit save/restore. Signed-off-by: Steven Hand <steven@xensource.com>