aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_domain_save.c
Commit message (Collapse)AuthorAgeFilesLines
* tools/libxc: Fix memory leaks in xc_domain_save()Andrew Cooper2013-06-261-0/+9
| | | | | | | | Introduces outbuf_free() to mirror the currently existing outbuf_init(). Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* Fix emacs local variable block to use correct C style variable.David Vrabel2013-02-211-1/+1
| | | | | | | The emacs variable to set the C style from a local variable block is c-file-style, not c-set-style. Signed-off-by: David Vrabel <david.vrabel@citrix.com
* tools/xc: log pid in xc_save/xc_restore outputOlaf Hering2013-02-151-1/+3
| | | | | | | | | | 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: drop relics of running on non-PAE 32-bit hostsJan Beulich2013-01-241-12/+3
| | | | | | | | | 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>
* X86/vMCE: handle broken page with regard to migrationLiu Jinsong2012-12-061-1/+12
| | | | | | | | | | | | | | | | | | | | | | | At the sender xc_domain_save has a key point: 'to query the types of all the pages with xc_get_pfn_type_batch' 1) if broken page occur before the key point, migration will be fine since proper pfn_type and pfn number will be transferred to the target and then take appropriate action; 2) if broken page occur after the key point, whole system will crash and no need care migration any more; At the target Target will populates pages for guest. As for the case of broken page, we prefer to keep the type of the page for the sake of seamless migration. Target will set p2m as p2m_ram_broken for broken page. If guest access the broken page again it will kill itself as expected. Suggested-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Liu Jinsong <jinsong.liu@intel.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* docs: document/mark-up SCHEDOP_*Ian Campbell2012-11-191-1/+8
| | | | | | | | | | | | | The biggest subtlety here is there additional argument when op == SCHEDOP_shutdown and reason == SHUTDOWN_suspend and its interpretation by xc_domain_{save,restore}. Add some clarifying comments to libxc as well. This patch moves some structs around but there is no functional change other than improved documentation. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: Support save/restore of up to 4096 VCPUs (increase from 64 VCPUs).Keir Fraser2012-08-221-8/+9
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: Do not segfault if (e.g.) switch_qemu_logdirty failsIan Jackson2012-06-281-1/+1
| | | | | | | | | | | | | | In xc_domain_save the local variable `ob' is initialised to NULL. There are then various startup actions. Some of these `goto out' on failure; for example the call to callbacks->switch_qemu_logdirty on l.978. However, out is used both by success and error paths. So it attempts (l.2043) to flush the current output buffer. If ob has not yet been assigned a non-NULL value, this segfaults. So make the call to outbuf_flush conditional on ob. 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>
* libxc: introduce XC_SAVE_ID_TOOLSTACKStefano Stabellini2012-05-111-0/+17
| | | | | | | | 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/+36
| | | | | | | | | | | | | | | | | | 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>
* x86/vMCE: save/restore MCA capabilitiesJan Beulich2012-02-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows migration to a host with less MCA banks than the source host had, while without this patch accesses to the excess banks' MSRs caused #GP-s in the guest after migration (and it depended on the guest kernel whether this would be fatal). A fundamental question is whether we should also save/restore MCG_CTL and MCi_CTL, as the HVM save record would better be defined to the complete state that needs saving from the beginning (I'm unsure whether the save/restore logic allows for future extension of an existing record). Of course, this change is expected to make migration from new to older Xen impossible (again I'm unsure what the save/restore logic does with records it doesn't even know about). The (trivial) tools side change may seem unrelated, but the code should have been that way from the beginning to allow the hypervisor to look at currently unused ext_vcpucontext fields without risking to read garbage when those fields get a meaning assigned in the future. This isn't being enforced here - should it be? (Obviously, for backwards compatibility, the hypervisor must assume these fields to be clear only when the extended context's size exceeds the old original one.) A future addition to this change might be to allow configuration of the number of banks and other MCA capabilities for a guest before it starts (i.e. to not inherits the values seen on the first host it runs on). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* tools: VM generation ID save/restore and migrate.Paul Durrant2011-12-161-1/+12
| | | | | | | | | | | | | | | 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-8/+210
| | | | | | | | | | | | | | | | | 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/+12
| | | | | | | | | | | | | 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: Squash xc_e820.h (and delete) into xenctrl.hKonrad Rzeszutek Wilk2011-06-281-1/+0
| | | | | | | | | | | | | | .. as there is no need to keep that internal header file anymore. We export two functions xc_domain_[set|get]_memory_map which depend on the 'struct e820entry' defined in 'xc_e820.h'. We move the contents of the 'xc_e820.h' to the 'xenctrl.h' fixing compiler errors when applications outside the Xen tree are trying to compile against the libraries. Tested-by: Daniel Castro <evil.dani@gmail.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: merge several bitop functions into xc_bitops.hOlaf Hering2011-06-101-58/+8
| | | | | | | | | | | | | | | | | | | | | | | | Bitmaps are used in save/restore, xenpaging and blktap2. Merge the code into a private xc_bitops.h file. All users are single threaded, so locking is not an issue. The array of bits is handled as volatile because the x86 save/restore code passes the bitmap to the hypervisor which in turn modifies the bitmap. blktap2 uses a private bitmap. There was a possible overflow in the bitmap_size() function, the remainder was not considered. ia64 save/restore uses a bitmap to send the number of vcpus to the host. x86 save/restore uses a bitmap to track dirty pages. This bitmap is shared with the hypervisor. An unused function count_bits() was removed and a new bitmap_size() function is now used. xenpaging uses 3 private bitmaps to track the gfns which are in paged-out state. It had a copy of some Linux bitops.h, which is now obsolete. Also the BITS_PER_LONG macro was hardcoded to 64 which made it impossible to run 32bit tools on a 64bit host. Wether this works at all has to be tested, yet. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: Introduce "allocate-only" page type for migrationGeorge Dunlap2011-05-261-6/+13
| | | | | | | | | | | | | | | | | | To detect presence of superpages on the receiver side, we need to have strings of sequential pfns sent across on the first iteration through the memory. However, as we go through the memory, more and more of it will be marked dirty, making it wasteful to send those pages. This patch introduces a new PFINFO type, "XALLOC". Like PFINFO_XTAB, it indicates that there is no corresponding page present in the subsquent page buffer. However, unlike PFINFO_XTAB, it contains a pfn which should be allocated. This new type is only used for migration; but it's placed in xen/public/domctl.h so that the value isn't reused. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* tools: Save superpages in the same batch, to make detection easierGeorge Dunlap2011-05-261-0/+12
| | | | | | | | | | | On the first time through (when pfns are mostly allocated on the receiving side), try to keep superpages together in the same batch by ending a batch early if we see the first page of a potential superpage and there isn't enough room in the batch for a full superpage. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: save: move static stats variable to stack variable.Ian Campbell2011-05-241-13/+14
| | | | | | 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>
* libxc: save: don't bother calculating stat's deltas unless we are going to ↵Ian Campbell2011-05-241-10/+12
| | | | | | | | print them 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>
* libxc: save: encapsulate time stats in a structIan Campbell2011-05-241-17/+18
| | | | | | | | As a precursor to making non-static. 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>
* libxc: save: move static "write_count" variable into outbuf.Ian Campbell2011-05-241-5/+6
| | | | | | 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>
* libxc: save: noncached write doesn't use live parameter.Ian Campbell2011-05-241-7/+7
| | | | | | | | so drop it. 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>
* libxc: save: rename ratewrite to uncached.Ian Campbell2011-05-241-3/+3
| | | | | | | | It doesn't do any ratelimiting... 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>
* libxc: save: drop code under ADAPTIVE_SAVE ifdef.Ian Campbell2011-05-241-110/+2
| | | | | | | | | | The ifdef was added in 2005 (7702:b3c2bc39d815) but, as far as I can see, was never enabled by default. Dropping it will help untangle some macros redefining functions etc. 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>
* libxc: save/restore: remove static context variablesIan Campbell2011-05-241-5/+4
| | | | | | | | | | | | | | 20544:ad9d75d74bd5 and 20545:cc7d66ba0dad seemingly intended to change these global static variables into stack variables but didn't remove the static qualifier. Also zero the entire struct once with memset rather than clearing fields piecemeal in two different places. 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> Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* libxc: after saving, unmap correct amount for live_m2pJim Fehlig2011-05-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With some help from Olaf, I've finally got to the bottom of an issue I came across while trying to implement save/restore in the libvirt libxenlight driver. After issuing the save operation, the saved domain was not being cleaned up properly and left in this state from xl's perspective xen33:# xl list Name ID Mem VCPUs State Time(s) Domain-0 0 6821 8 r----- 122.5 (null) 2 2 2 --pssd 10.8 Checking the libvirtd /proc/$pid/maps I found this 7f3798984000-7f3798b86000 r--s 00002000 00:03 4026532097 /proc/xen/privcmd So not all all pages belonging to the domain were unmapped from libvirtd. In tools/libxc/xc_domain_save.c we found that P2M_FL_ENTRIES were being mapped but only P2M_FLL_ENTRIES were being unmapped. The attached patch changes the unmapping to use the same P2M_FL_ENTRIES macro. I'm not too familiar with this code though so posting here for review. I suspect this was not noticed before since most (all?) processes doing save terminate after the save and are not long-running like libvirtd. Ian Campbell writes: > Looks like I introduced this in 18558:ccf0205255e1, sorry! > > I guess it is also wrong in the error path out of map_and_save_p2m_table > and so we also need [another hunk]. This change should be backported to relevant earlier trees. -iwj From: Jim Fehlig <jfehlig@novell.com> From: Ian Campbell <Ian.Campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Olaf Hering <olaf@aepfle.de> Acked-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>
* libxc: Handle failed xc_get_hvm_param in domain saveGeorge Dunlap2011-02-251-0/+4
| | | | | | | | | | | | | | The domain save code will read an HVM param, and if it's not zero, make an entry for it. However, if the hypercall fails for any reason, the data may not be written, and the value for the previous parameter may be written in the save file as the parameter that failed. Initialize the value to zero before each hypercall, so that in case of a failure, no value will be written. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxc: fix comment typo in xc_domain_saveOlaf Hering2010-12-161-1/+1
| | | | | | evey -> every Signed-off-by: Olaf Hering <olaf@aepfle.de>
* libxc: Save the HVM_PARAM_ACPI_IOPORTS_LOCATIONAnthony Perard2010-11-081-0/+10
| | | | | | | | | 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>
* x86: xsave save/restore support for both PV and HVM guests (version 2)Keir Fraser2010-11-081-2/+74
| | | | | | | | | | | | | | I have tested the patch in the following senarios: 1> Non-xsave platform 2> Xsave-capable platform, guest does not support xsave, xen support xsave 3> Xsave-capable platform, guest does support xsave, xen supports xsave 4> Guest (non-xsave) saved on platform without xsave, restored on a Xsave-capable system. All passed. Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* Revert 22347:16093532f384 "x86: xsave save/restore support"Keir Fraser2010-11-041-73/+2
| | | | | | Completely broken when xsave is not enabled or supported on the host. Signed-off-by: Keir Fraser <keir@xen.org>
* x86: xsave save/restore support for both PV and HVM guests.Keir Fraser2010-11-031-2/+73
| | | | | Signed-off-by: Shan Haitao <haitao.shan@intel.com> Signed-off-by: Han Weidong <weidong.han@intel.com>
* libxc: do not align/lock buffers which do not need itIan Campbell2010-10-221-8/+1
| | | | | | | | | | | | | | | | | | | | | On restore: region_mfn is passed to xc_map_foreign_range and xc_map_foreign_bulk. In both cases the buffer is accessed from the ioctl handler in the kernel and not from any hypercall. Therefore normal copy_{to,from}_user handling in the kernel will cope with any faulting access. p2m_batch is passed to xc_domain_memory_populate_physmap which takes care of bouncing the buffer already. On save: pfn_type is passed to xc_map_foreign_bulk which does not need locking as per region_mfn above. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert shadow domctl interfaces and save/restore over to hypercall ↵Ian Campbell2010-10-221-25/+15
| | | | | | | buffers Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: correct handling of switch_qemu_logdirty callback return valueIan Campbell2010-10-251-2/+2
| | | | | | | | The callback return convention follows xc_domain_save and therefore returns 0 on success and >0 on error, correct the check accordingly. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: cleanup domain save switch_qemu_logdirty callbackIan Campbell2010-10-211-6/+15
| | | | | | | | | | | | | | | | | 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>
* libxc: add xc_machphys_mfn_list to wrap XENMEM_machphys_mfn_listIan Campbell2010-10-181-6/+1
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: add xc_domain_maximum_gpfn to wrap XENMEM_maximum_gpfnIan 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: pass an xc_interface handle to page locking functionsIan Campbell2010-10-181-3/+3
| | | | | | | | | Not actually used here but useful to confirm that a handle is passed down to each location where it will be required once we switch to hypercall buffers. 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/+14
| | | | | | | | | | | | | | | | | | 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: logger: add newline when progress is completeIan Campbell2010-09-031-0/+2
| | | | | | | | | | | | | | | | | | | | | In xc_domain_save ensure that we signal completion at the end of each batch. This ensures that the next logged line starts on a new line. e.g. instead of: Savefile contains xl domain config xc: Saving memory: iter 3 (last sent 0 skipped 0): 0/32768 0%migration target: Transfer complete, requesting permission to start domain. migration sender: Target has acknowledged transfer. what is desired is: Savefile contains xl domain config xc: Saving memory: iter 0 (last sent 0 skipped 0): 32768/32768 100% xc: Saving memory: iter 1 (last sent 32576 skipped 192): 32768/32768 100% xc: Saving memory: iter 2 (last sent 217 skipped 0): 32768/32768 100% xc: Saving memory: iter 3 (last sent 0 skipped 0): 32768/32768 100% migration target: Transfer complete, requesting permission to start domain. migration sender: Target has acknowledged transfer. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: document save/restore protocolIan Campbell2010-09-031-10/+10
| | | | | | | | | | 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-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | # 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>
* PV console for HVM domainsStefano Stabellini2010-08-051-0/+11
| | | | | | | | | Creates a shared memory ring buffer and event channel in HVM domains for passing debug messages from PV drivers on HVM guests The console is used by windows pv drivers to send debug data to xenconsoled Signed-off-by: Owen Smith <owen.smith@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* Don't save Xen heap pages during domain saveKeir Fraser2010-06-151-38/+44
| | | | | | | | | | | | | As discussed in the thread starting at http://lists.xensource.com/archives/html/xen-devel/2010-05/msg01383.html, don't save Xen heap pages in order to avoid overallocation when the domain gets restored, as those pages would get (temporarily) backed with normal RAM pages by the restore code. This requires making DOMCTL_getpageframeinfo{2,3} usable for HVM guests, meaning that the input to these must be treated as GMFNs. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* libxc: remove \n from strings passed to PERRORKeir Fraser2010-05-281-2/+2
| | | | | | | | Previously, the code was inconsistent: some calls to PERROR passed \n and some did not. With the new logging arrangements, passing \n is definitely incorrect. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxc: save/restore error handling fixesKeir Fraser2010-05-281-31/+33
| | | | | | | | | | | | | | * Make "read_exact" in libxc always set errno. * Rename "read_exact" macro in xc_domain_restore.c (which shadows real function) to RDEXACT and change all callers. * Make RDEXACT anamorphically use xch for error reporting rather than * stderr. * Call PERROR rather than ERROR when appropriate, so that log messages include errno. * Save errno in noncached_write so that its errno value is always * right. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxc: Use new DBGPRINTF for a few debugging output messagesKeir Fraser2010-05-281-1/+1
| | | | | | | oubuf and batch restore write messages should be sent with level XTL_DEBUG so that they don't disturb progress output even with -v. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-97/+98
| | | | | | | | | | | | | | | | | | | | 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>