aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils/xc_restore.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/migrate: Fix regression when migrating from older version of XenAndrew Cooper2013-10-101-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 00a4b65f8534c9e6521eab2e6ce796ae36037774 Sep 7 2010 "libxc: provide notification of final checkpoint to restore end" broke migration from any version of Xen using tools from prior to that commit Older tools have no idea about an XC_SAVE_ID_LAST_CHECKPOINT, causing newer tools xc_domain_restore() to start reading the qemu save record, as ctx->last_checkpoint is 0. The failure looks like: xc: error: Max batch size exceeded (1970103633). Giving up. where 1970103633 = 0x756d6551 = *(uint32_t*)"Qemu" With this fix in place, the behaviour for normal migrations is reverted to how it was before the regression; the migration is considered non-checkpointed right from the start. A XC_SAVE_ID_LAST_CHECKPOINT chunk seen in the migration stream is a nop. For checkpointed migrations the behaviour is unchanged. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> Acked-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> (Remus bits)
* tools/xc: log pid in xc_save/xc_restore outputOlaf Hering2013-02-151-2/+7
| | | | | | | | | | If several migrations log their output to xend.log its not clear which line belongs to a which guest. Print entry/exit of xc_save and xc_restore and also request to print pid with each log call. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: introduce XC_SAVE_ID_TOOLSTACKStefano Stabellini2012-05-111-1/+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>
* lib{xc,xl}: Seed grant tables with xenstore and console grantsAlex Zeffertt2012-02-091-2/+2
| | | | | | | | | | | | | | | | | | This patch claims one reserved grant entry for the console and another for the xenstore. It modifies the builder to fill in the grant table entries for the console and the xenstore. Previous versions of this patch have been sent to xen-devel. See http://lists.xensource.com/archives/html/xen-devel/2008-07/msg00610.html http://lists.xensource.com/archives/html/xen-devel/2009-03/msg01491.html Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com> Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-161-1/+2
| | | | | | | | | | | | | | | 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: 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>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-5/+6
| | | | | | | | | | | | | | | | | | | | 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>
* 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/xc_restore: Fix wrong data typeKeir Fraser2008-09-171-2/+2
| | | | | | | | 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>
* [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] Save/restore: disentangle max_pfn from nr_pages.Tim Deegan2007-02-091-5/+5
| | | | | | | These have been used interchangeably, which is OK for PV domains but not for HVM. This fixes an over-allocation by 256MB when restoring HVM guests that have more than 4GB of RAM. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] Save/restore: don't try to set the console ring MFNTim Deegan2007-02-081-2/+3
| | | | | | in a HVM restore. In particular, don't print an uninitialized stack variable, which causes XMLRPC exceptions in xend. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* [HVM] save restore: frame workTim Deegan2007-01-181-4/+15
| | | | | | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> frame work for HVM save restore in Control Panel
* [XEND] xc_save/xc_restore open the libxc interface independentlykfraser@localhost.localdomain2006-08-151-8/+15
| | | | | | | of their parent. This is required now that the interface fd is marked for close-on-exec. Signed-off-by: Keir Fraser <keir@xensource.com>
* Update suspend/resume for new console code.cl349@firebug.cl.cam.ac.uk2005-09-031-7/+12
| | | | | | | | | - translate console mfn to pfn - unbind/bind console evtchn - recover console mfn on restore - trigger xenconsoled refresh after mfn is put in store Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Break the building/save/restore code out into a separate library libxenguest.cl349@firebug.cl.cam.ac.uk2005-08-251-2/+3
| | | | | | | Also update the tools accordingly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Rename libxc => libxenctrl and xc.h => xen/xenctrl.hcl349@firebug.cl.cam.ac.uk2005-08-241-1/+1
| | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> --HG-- rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
* Fix checkpointing - add save/restore support to the xenbus driver.cl349@firebug.cl.cam.ac.uk2005-08-021-4/+12
| | | | | | | | | | - Add xenbus driver suspend/resume functions - Change xenbus irq to not be shared - Translate store mfn in suspend record to pfn and back - Make tools re-introduce the domain to the store Signed-off-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* bitkeeper revision 1.1513.1.1 (42925a6aSZSwfyaVsNzV4psPmpZwZg)cl349@firebug.cl.cam.ac.uk2005-05-231-0/+30
Execute xc_linux_restore in a seperate process so that it can't crash xend. Also handle errors passed from xc_linux_restore and log info messages from xc_linux_restore. XendDomain.py: Popen xc_restore instead of calling xc_linux_restore directly. xc.c: Add pyxc_handle exporting the file descriptor to the control interface. Remove xc_linux_restore -- replaced by popen of xc_restore directly from python. xc_linux_restore.c: Enable debug output. xpopen.py: Add xpopen functionality: Optionally exclude a list of file descriptors from being closed, allowing access to those file descriptors from the command. Remove unused parts. xpopen.py, Makefile, xc_restore.c: new file Makefile: Add xcutils subdir. ignore: Add tools/xcutils/xc_restore. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>