aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
* libxc: convert memory op interface over to hypercall buffersIan Campbell2010-10-222-50/+58
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert gnttab interfaces over to hypercall buffersIan Campbell2010-10-222-22/+17
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert tmem interface over to hypercall buffersIan Campbell2010-10-221-28/+37
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert mca interface over to hypercall buffersIan Campbell2010-10-221-6/+7
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert hvmop interfaces over to hypercall buffersIan Campbell2010-10-222-80/+93
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert flask interfaces over to hypercall buffersIan Campbell2010-10-221-6/+7
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert physdevop interface over to hypercall buffersIan Campbell2010-10-221-6/+5
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert schedop interfaces over to hypercall buffersIan Campbell2010-10-221-10/+11
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert evtchn interfaces over to hypercall buffersIan Campbell2010-10-221-9/+8
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert acm interfaces over to hypercall buffersIan Campbell2010-10-221-18/+21
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert watchdog interface over to hypercall buffersIan Campbell2010-10-221-10/+11
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert sysctl interfaces over to hypercall buffersIan Campbell2010-10-228-158/+167
| | | | | 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-226-72/+59
| | | | | | | buffers Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert domctl interfaces over to hypercall buffersIan Campbell2010-10-225-101/+103
| | | | | | | (defer save/restore and shadow related interfaces til a later patch) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: convert xc_version over to hypercall buffersIan Campbell2010-10-222-15/+20
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: infrastructure for hypercall safe data buffers.Ian Campbell2010-10-265-2/+352
| | | | | | | | (Modified version of this patch, with updated #includes in xc_hcall_buf.c to fix stubdomain build.) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.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-213-15/+36
| | | | | | | | | | | | | | | | | 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>
* tools: cpupools: Support arbitrary numbers of physical cpusJuergen Gross2010-10-213-60/+100
| | | | | | | | | | | | | | To be able to support arbitrary numbers of physical cpus it was necessary to include the size of cpumaps in the xc-interfaces for cpu pools. These were: definition of xc_cpupoolinfo_t xc_cpupool_getinfo() xc_cpupool_freeinfo() xc_cpupool_getinfo() and xc_cpupool_freeinfo() are changed to allocate the needed buffer and return it. Signed-off-by: juergen.gross@ts.fujitsu.com Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: use generic xc_get_pfn_list on ia64Ian Campbell2010-10-182-33/+0
| | | | | | | | | The ia64 specific xc_get_pfn_list doesn't seem any different to the generic xc_get_pfn_list once the call to xc_ia64_get_pfn_list is expanded so remove and just use the generic one. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: do not lock VCPU context in xc_ia64_pv_recv_vcpu_contextIan Campbell2010-10-181-7/+0
| | | | | | | | | xc_ia64_pv_recv_vcpu_context does not need to lock the ctxt buffer since it calls xc_ia64_recv_vcpu_context which calls xc_vcpu_setcontext which takes care of any necessary bouncing. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: drop xc_get_max_pagesIan Campbell2010-10-183-19/+0
| | | | | | | | | The function isn't really ia64 specific but since the result isn't actually used in the only caller and the same info is available via xc_domain_getinfo simply drop the function. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: simplify lock profiling APIIan Campbell2010-10-182-13/+39
| | | | | | | | Current function has heavily overloaded semantics for the various arguments. Separate out into more specific functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: simplify performance counters APIIan Campbell2010-10-182-15/+39
| | | | | | | | Current function has heavily overloaded semantics for the various arguments. Separate out into more specific functions. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: make do_memory_op's callers responsible for locking indirect buffersIan Campbell2010-10-182-64/+41
| | | | | | | | | | | Push responsibility for locking buffers refered to by the memory_op argument up into the callers (which are now all internal to libxc). This removes the last of the introspecation from do_memory_op and generally makes the transistion to hypercall buffers smoother. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: make xc_memory_op library privateIan Campbell2010-10-184-52/+23
| | | | | | | | | | | | | | | Now that all XENMEM_* callers go via an op specific function make xc_memory_op private to libxc (and rename to do_memory_op for consistency with other private functions). Also change the interface to take a size parameter so that do_memory_op knows how much memory to lock for the top-level argument, removing some of the introspection. [ Compatibility note: this breaks qemu-xen before 706bc8c588cb ] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: remove compatibility macro for xc_domain_memory_populate_physmapIan Campbell2010-10-181-4/+0
| | | | | | | [ Compatibility note: this breaks qemu-xen before d3c5e73eb3ae ] 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-184-2/+9
| | | | | 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-183-6/+19
| | | | | 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-186-6/+13
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: add xc_domain_add_to_physmap to wrap XENMEM_add_to_physmapIan Campbell2010-10-183-13/+29
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: add xc_domain_memory_exchange_pages to wrap XENMEM_exchangeIan Campbell2010-10-183-30/+43
| | | | | | | Generalised from exchange_page in xc_offline_page.c Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: wrappers for XENMEM {increase,decrease}_reservation and populate_physmapIan Campbell2010-10-189-138/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the wrappers for these hypercalls swallow partial success and return failure to the caller. In order to use these functions more widely instead of open-coding uses of XENMEM_* and xc_memory_op add variants which return the actual hypercall result. Therefore add the following functions: xc_domain_increase_reservation xc_domain_decrease_reservation xc_domain_populate_physmap and implement the existing semantics using these new functions as xc_domain_increase_reservation_exact xc_domain_decrease_reservation_exact xc_domain_populate_physmap_exact replacing the existing xc_domain_memory_* functions. Use these new functions to replace all open coded uses of XENMEM_increase_reservation, XENMEM_decrease_reservation and XENMEM_populate_physmap. Also rename xc_domain_memory_*_pod_target to xc_domain_*_pod_target for consistency. Temporarily add a compatibility macro for xc_domain_memory_populate_physmap to allow time for qemu to catch up. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: use correct size of struct xen_mcIan Campbell2010-10-181-2/+2
| | | | | | | | We want the size of the struct not the pointer (although rounding up to page size in lock_pages probably saves us). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: remove unnecessary double indirection from xc_readconsoleringIan Campbell2010-10-182-3/+2
| | | | | | | | The double indirection has been unnecessary since 9867:ec61a8c25429, there is no possibility of the buffer being reallocated now. 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-1816-158/+160
| | | | | | | | | 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: flask: use (un)lock pages rather than open coding m(un)lock.Ian Campbell2010-10-183-10/+5
| | | | | | | Allows us to do away with safe_unlock and merge into unlock_pages. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc, tmem: Fix build after fd2e5008c2e0Keir Fraser2010-09-132-4/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tmem (tools): move to new ABI version to handle long object-idsKeir Fraser2010-09-132-10/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a great deal of discussion and review with linux kernel developers, it appears there are "next-generation" filesystems (such as btrfs, xfs, Lustre) that will not be able to use tmem due to an ABI limitation... a field that represents a unique file identifier is 64-bits in the tmem ABI and may need to be as large as 192-bits. So to support these guest filesystems, the tmem ABI must be revised, from "v0" to "v1". I *think* it is still the case that tmem is experimental and is not used anywhere yet in production. The tmem ABI is designed to support multiple revisions, so the Xen tmem implementation could be updated to handle both v0 and v1. However this is a bit messy and would require data structures for both v0 and v1 to appear in public Xen header files. I am inclined to update the Xen tmem implementation to only support v1 and gracefully fail v0. This would result in only a performance loss (as if tmem were disabled) for newly launched tmem-v0-enabled guests, but live-migration between old tmem-v0 Xen and new tmem-v1 Xen machines would fail, and saved tmem-v0 guests will not be able to be restored on a tmem-v1 Xen machine. I would plan to update both pre-4.0.2 and unstable (future 4.1) to only support v1. I believe these restrictions are reasonable at this point in the tmem lifecycle, though they may not be reasonable in the near future; should the tmem ABI need to be revised from v1 to v2, I understand backwards compatibility will be required. Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* libxc: restore: reset I/O fd to flags to back to state caller passed usIan Campbell2010-09-071-7/+11
| | | | | | | | | | | | | | | In particular this causes us to turn O_NONBLOCK back off if we set it. The caller may continue to use the fd for it's own protocol needs and may not be prepared to have it become non-blocking. This probably only effects Remus now after my previous patch to signal the last checkpoint, since a regular migration will no longer set the fd non-blocking. 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: provide notification of final checkpoint to restore endIan Campbell2010-09-073-4/+38
| | | | | | | | | | | | | | | | | | 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: use a switch statement in xc_domain_restore.c::pagebuf_get_one.Ian Campbell2010-09-031-14/+29
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: logger: add newline when progress is completeIan Campbell2010-09-032-2/+7
| | | | | | | | | | | | | | | | | | | | | 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-033-19/+130
| | | | | | | | | | 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-2472-336/+1424
| | | | | | | | | | | | | | | | | | | | | | | | | # 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: remove xc_ptraceIan Campbell2010-08-245-1379/+0
| | | | | | | | | | | | | | It has been unused since 21732:eb34666befcc. There was no response to my RFC regarding its removal http://marc.info/?l=xen-devel&m=128170404422822 and unfortunately we have not been able to trace down all copyright holders of this code for the purposes of relicensing libxc. The code will be available in mercurial if we need to retrieve it in the future. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: remus: unbreak after 21488:dd6bbdc42033Brendan Cully2010-08-191-14/+18
| | | | | | | | | | | The aforementioned patch missed several calls to read_exact, causing spurious timeouts under Remus. Also add a couple of additional error reports to rdexact. Signed-off-by: Brendan Cully <brendan@cs.ubc.ca> Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxc: free thread specific hypercall buffer on xc_interface_closeIan Campbell2010-08-181-0/+14
| | | | | | | | | | | | | | | | | | The per-thread hypercall buffer is usually cleaned up on pthread_exit by the destructor passed to pthread_key_create. However if the calling application is not threaded then the destructor is never called. This frees the data for the current thread only but that is OK since any other threads will be cleaned up by the destructor. Changed since v1: * Ensure hcall_buf_pkey is initialised before use. Thanks to Christoph Egger for his help diagnosing this issue on NetBSD. * Remove redundant if (hcall_buf) from xc_clean_hcall_buf since _xc_clean_hcall_buf includes the same check. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: disable xc_ptrace on x86 LinuxIan Campbell2010-08-133-2/+4
| | | | | | | | | | | It has been unused since 21732:eb34666befcc. Removing the include of sys/ptrace.h and threaddb.h exposed a few places which were using time(2) or gettimeofday(2) without including time.h or sys/time.h respectively and were relying on an include. 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-2/+2
| | | | | | | | | | | | | | | | 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>