aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
* [Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocationGeorge Dunlap2010-08-111-14/+4
| | | | | | | | | Rather than trying to count the number of PoD entries we're putting in, we simply pass the target # of pages - the vga hole, and let the hypervisor do the calculation. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xc: fix segfault in pv domain create if kernel is an invalid imageGianni Tedesco2010-08-091-0/+1
| | | | | | | | | | If libelf calls elf_err() or elf_msg() before elf_set_log() has been called then it could potentially read an uninitialised log handling callback function pointer from struct elf_binary. Fix this in libxc by zeroing the structure before calling elf_init(). Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* PV console for HVM domainsStefano Stabellini2010-08-053-1/+42
| | | | | | | | | 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>
* Backed out changeset 6a0dd2c29999Stefano Stabellini2010-08-041-15/+0
|
* libxc: free thread specific hypercall buffer on xc_interface_closeIan Campbell2010-07-301-0/+15
| | | | | | | | | | | | | | 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. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxenguest: correct order of zlib linker options to avoid link errorsOlaf Hering2010-07-261-2/+2
| | | | | | | | | | | | The order of objects and linked libraries is important with recent toolchain when --as-needed is used. Introduce new variable COMPRESSION_LIBS and place it at the end of cc commandline options. Without this change, symbols in libbzip2 are not found when building with openSuSE 11.2 and newer. Signed-off-by: Olaf Hering <olaf@aepfle.de> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Do not bother initialising shared-info page in HVM-domain builder.Keir Fraser2010-07-221-22/+1
| | | | | | | | It is already zeroed by the hypervisor, and setting the evtchn_mask array is pointless since its location varies between 32- and 64-bit guests, and the builder can't know which is the correct bitness. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools/misc/xenpm: provide core/package cstate residenciesIan Jackson2010-07-142-0/+10
| | | | | | | | | | | | According to Intel 64 and IA32 Architectures SDM 3B Appendix B, Intel Nehalem/Westmere processors provide h/w MSR to report the core/package cstate residencies.Extend sysctl_get_pmstat interface to pass the core/package cstate residencies, and modify xenpm to output those information. [tools part of the patch] Signed-off-by: Wei Gang <gang.wei@intel.com>
* tools/libxc: Do not crash freeing logger on xc_interface_open error pathIan Jackson2010-06-281-1/+1
| | | | | | | libxc could sometimes free the logger which xl created. Thanks to report from Yang Hongyang <yanghy@cn.fujitsu.com>. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Fix ia64 build for interface changeIan Jackson2010-06-2511-195/+207
| | | | | | | | | | | | This patch fixes ia64 by the following method: - rename xc_handle xch - rename guest_xc xch - add xc_interface *xch to arguments of some functions - replace xc_dom_printf with macros - Add *xch argument to corresponding x86 functions [iwj] Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: [PATCH 2/3] remove some duplicated code: helper add/del functionsIan Jackson2010-06-221-183/+44
| | | | Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* libxc: [PATCH 1/3] merge libflask into libxenctrlIan Jackson2010-06-222-0/+522
| | | | | | | | | | | The flask library is small, and putting everything in libxenctrl make relying on flask functionalities in libxl easier. libflask is left for compatibility purpose, but should be considered deprecated, and remove in the near future. all flask_ symbols are now xc_flask_ symbols in libxenctrl. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* Revert 21640:05e127771b86 "libxc: Fix Segmentation fault of xend"Keir Fraser2010-06-211-4/+2
| | | | | | Nacked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: Fix Segmentation fault of xendKeir Fraser2010-06-211-2/+4
| | | | | | | | If /proc/xen/privcmd cannot be opened, start xend occurs Segmentation fault. Add check to fix it. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* ia64: Fix xc_save error reportingKeir Fraser2010-06-181-1/+1
| | | | | | | | | | | This is the patch for error reporting on ia64 that has a special handling in comparison with i386/x86_64 platforms. This is pretty straight-forward just to fail on "cannot map mfn page" message instead of continue since the memory is not being correctly mapped using the xc_map_foreign_range() function. From: Michal Novotny <minovotn@redhat.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Allow LZO compressed bzImage to be used as DomU kernelKeir Fraser2010-06-152-0/+197
| | | | | | | ... since recently Linux added this as another kernel compression method. Signed-off-by: Jan Beulich <jbeulich@novell.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>
* xc_domain_restore: Remove static variable 'completed'Keir Fraser2010-06-101-25/+25
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xc_domain_restore: Revert 20126:442bc6f82cf3, 19639:205b1badbcfdKeir Fraser2010-06-101-424/+115
| | | | | | | | | This disables superpage restore support, but should gain us acceptable performance when restoring a domain using a pv_ops dom0 kernel. This is because single-page allocations will be batched rather than issued singly. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: NetBSD build fixKeir Fraser2010-06-071-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Watchdog timers for domainsKeir Fraser2010-06-042-0/+32
| | | | | | | | Each domain is allowed to set, reset and disable its timers; when any timer runs out the domain is killed. Patch from Christian Limpach <Christian.Limpach@citrix.com> Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* libxc: Remove obsolete xc_find_device_number() declaration.Keir Fraser2010-06-042-16/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: assume that special Xen devices have been created by the platformKeir Fraser2010-06-021-118/+3
| | | | | | | | | | | | | | | Remove all the magic surrounding the special Xen devices in Linux specific code whereby we attempt to figure out what the correct major:minor number is and check the the existing device has these numbers etc. In 2010 we really should be able to trust that the platform has created the devices correctly or provide correct configuration settings such that they are without resorting to tearing down the platform configured state and rebuilding it. tools/hotplug/Linux/xen-backend.rules already contains the necessary udev rules to create /dev/xen/evtchn and friends in the correct place. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* xc: deal with xen/evtchn and xen/gntdev device namesKeir Fraser2010-06-011-43/+49
| | | | | | | | | | | | | | | | | | | | This patch makes xc_linux properly deal with: 1. discovering and creating device nodes if necessary 2. the new form of xen/<dev> device names soon to be used by the kernel This changes the logic slightly: - If a device node already exists with the proper name, then it uses it as-is, assuming it has already been correctly created. - If the path doesn't exist, or it exists but isn't a device node, and it has successfully found the major/minor for the device, then (re)create the device node. Since this logic is identical for gntdev and evtchn, make a common function to handle both. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
* tools: Build fixes.Keir Fraser2010-05-281-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xl/libxtl: Remove glitch in xl migrate log outputKeir Fraser2010-05-282-2/+24
| | | | | | | | | * Provide a new XTL_STDIOSTREAM_HIDE_PROGRESS flag in the stdio logger * Provide a way to adjust the flags after logger setup * Use these to disable progress output from the migration receiver, as the sender is also sending progress information. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxc: remove \n from strings passed to PERRORKeir Fraser2010-05-289-34/+34
| | | | | | | | 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-284-117/+126
| | | | | | | | | | | | | | * 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>
* xl: Allow control of logging level.Keir Fraser2010-05-281-1/+4
| | | | | | | The -v option, which must come before the xl command, increases the logging level each time it is supplied. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Use new DBGPRINTF for a few debugging output messagesKeir Fraser2010-05-283-2/+3
| | | | | | | 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-2859-1752/+1921
| | | | | | | | | | | | | | | | | | | | 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>
* xtl: New xentoollog mini-library.Keir Fraser2010-05-284-2/+308
| | | | | | | | | | | | | We provide a new header file "xentoollog.h" which defines an interface that libraries and applications can use for logging. This avoids having to wrap each library's log callbacks up, massage arguments to log callbacks, and so on. The library's .o files are within libxc to avoid having to create a separate lib*.a, but callers do not need to #include xenctrl.h and it should be regarded as a separate API. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libelf: Tidy up logging and remove dependency on stdio.Keir Fraser2010-05-282-2/+20
| | | | | | | | | | | 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>
* libxc: xc_domain_save.c: rename "write_exact" macroKeir Fraser2010-05-281-16/+16
| | | | | | | There is already a "write_exact" function declared in xc_private.h. So rename this macro to to wrexact. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* hvm: Extend the CPUID whitelist to include Intel's AES-NI intructionsKeir Fraser2010-05-262-1/+3
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* cpupool: Control interface should be a sysctl rather than a domctl.Keir Fraser2010-05-042-62/+60
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Change the global suspend event channel lock file to a per-domain lock fileKeir Fraser2010-05-042-12/+19
| | | | | | | | 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>
* HAP 1GB: Add corner case handling for 1GB super page.Keir Fraser2010-04-221-0/+8
| | | | | | | - Without the check, guest memory allocation will never reach the boundary of a 1GB super page. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
* cpupools [2/6]: libxc changesKeir Fraser2010-04-215-0/+264
| | | | Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
* credit2: Add toolstack options to control credit2 scheduler parametersKeir Fraser2010-04-143-0/+59
| | | | Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
* Topology-info sysctl cleanups.Keir Fraser2010-04-132-36/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: Flush I/O before xc_domain_save completionKeir Fraser2010-04-121-0/+7
| | | | | | | | The final, flushing call to discard_file_cache also discards any errors from fsync. Call fsync explicitly before leaving, to check if all VM memory actually made it to the disk. Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
* Refactor Xen Support for Intel Turbo BoostKeir Fraser2010-04-092-0/+3
| | | | | | | | | | Refactor the existing code that supports the Intel Turbo feature to move all the driver specific bits in the cpufreq driver. Create a tri-state interface for the Turbo feature that can distinguish amongst enabled Turbo, disabled Turbo, and processors that don't support Turbo at all. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
* Host Numa information in dom0Keir Fraser2010-04-072-2/+49
| | | | | | | | | | 'xm info' command now also gives the cpu topology & host numa information. This will be later used to build guest numa support. The patch basically changes physinfo sysctl, and adds topology_info & numa_info sysctls, and also changes the python & libxc code accordingly. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* 1GB Page Table Support for HVM Guest 1/3Keir Fraser2010-04-061-24/+101
| | | | | | | | | | This patch changes Xen tools to allocate 1GB first. If such requests fail, it will fall back to 2MB and then 4KB. We skip 1GB allocation for the MMIO space between 3GB and 4GB. Signed-off-by: Wei Huang <wei.huang2@amd.com> Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Acked-by: Tim Deegan <tim.deegan@citrix.com>
* Fix gdbserver-xen support on older kernels.Keir Fraser2010-03-251-0/+7
| | | | | | | | | | | The xc_ptrace API relies on errno for passing success/failure indication back to callers. However, mapping operations that fall back on legacy APIs may leave errno set to a non-zero result even thought the operation is successful. This patch resets errno after successful map operations so that xc_ptrace doesn't inadvertently return a failure. Signed-off-by: Justin Gibbs <gibbs@scsiguy.com>
* Fixes for 21040:b64a8d2a80ad "support affinity for >64 CPUs"Keir Fraser2010-03-181-2/+1
| | | | Signed-off-by: James (Song Wei) <jsong@novell.com>
* libxc: Support set affinity for more than 64 CPUs.Keir Fraser2010-03-172-13/+30
| | | | | | | | There are more than 64 cpus on new intel platform especially on NUMA system, so that we need break the pcpu limit (that is 64) when set affinity of a VCPU. Signed-off-by: James (song wei) <jsong@novell.com>
* libxc: Pre-zero argument structures for map/unmap_pirq operations.Keir Fraser2010-02-251-0/+3
| | | | | From: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: Fix cpuid() inline asm.Keir Fraser2010-02-241-4/+13
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>