aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc
Commit message (Collapse)AuthorAgeFilesLines
...
* libxc: set all VCPU's online by default in HVM info tableGianni Tedesco2011-04-071-0/+1
| | | | | | | | | | This sets a saner default for the cpu-online-map by setting all bits to 1. The default assumption ought to be that nr-vcpus == nr-vcpus-at-start. If that is not true, then the toolstack must modify the bitmap, but if it is true, the toolstack oughtn't need to do anything further. Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
* tools: Add nestedhvm guest config optioncegger2011-02-281-9/+66
| | | | | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Eddie Dong <eddie.dong@intel.com> Acked-by: Tim Deegan <Tim.Deegan@citrix.com> Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-311-3/+3
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). Signed-off-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>
* Remove unmaintained Access Control Module (ACM) from hypervisor.Keir Fraser2011-03-253-137/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* tools: provide generic rules for compiling .S filesIan Campbell2011-03-231-6/+0
| | | | | | Signed-off-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>
* tools: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.Ian Campbell2011-03-211-2/+2
| | | | | | Signed-off-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>
* tools: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-211-1/+1
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. Signed-off-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>
* tools: remove unnecessary uses of -L.Ian Campbell2011-03-211-4/+2
| | | | | | | | | It's not needed unless you are linking against a library in the current directory. Signed-off-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>
* tools: Drop use of $(INCLUDES)Ian Campbell2011-03-211-1/+1
| | | | | | | | | | Several places include it in CFLAGS even though it is never defined. A few others use it as nothing more than a gathering point for CFLAGS. Get rid of it. Signed-off-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>
* tools: libxc: drop rpm.specIan Campbell2011-03-211-28/+0
| | | | | | | | Last updated in 2004, doesn't even use the right library names. Signed-off-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: remove dependency on xenstore headers.Ian Campbell2011-03-212-2/+1
| | | | | | | | xc_offline_page doesn't really need xs.h. Signed-off-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>
* tools: support building with --as-neededIan Campbell2011-03-171-1/+1
| | | | | | | | | Tested by forcing --as-needed via tools/Rules.mk but this is included since the intention is simply to support diustros which default to --as-needed, not to enable it everywhere. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-172-8/+8
| | | | | | | | Otherwise make can search the path relative to certain standard paths such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in Config.mk suffers from this). Signed-off-by: Keir Fraser <keir@xen.org>
* libxc: move error checking next to the function which returned the error.Ian Campbell2011-03-111-11/+16
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: osdep: convert hypercall buffer allocationIan Campbell2011-03-116-37/+95
| | | | | | | This will allow us to use OS specific interfaces to ensure that the allocated memory is safe for use as a hypercall buffer in the future. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* Add DomU xz kernel decompressionJan Beulich2011-03-091-23/+61
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Merge4.1.0-branchedIan Jackson2011-03-031-3/+4
|\
| * x86, libxc: Fix xc_translate_foreign_address() for PV guests ofKeir Fraser2011-03-031-3/+4
| | | | | | | | | | | | | | different bitness than dom0 (32-bit vs 64-bit). Original patch by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Keir Fraser <keir@xen.org>
* | libxc: Missed one when replacing read_exact with RDEXACT macroGeorge Dunlap2011-03-031-1/+1
| | | | | | | | | | | | | | | | This corrects an error in 21488:dd6bbdc42033. 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>
* | libxc: fix incorrect scanning of pfn array in pagebuf during migrationShriram Rajagopalan2011-03-031-4/+4
|/ | | | | | | | | | | | | | | | | | | xc_domain_restore.c:apply_batch function makes two passes over the pfn_types array in pagebuf to allocate the needed MFNs. The curbatch parameter to this function specifies the array offset in pfn_types, from where the current scan should begin. But this variable is not taken into account (index always starts at 0) during the two passes. While this [bug] does not manifest itsef during save/restore or live migration, under Remus, xc_domain_restore fails due to corrupt guest page tables. (This appears to have been broken by 21588:6c3d8aec202d which reverted two changesets from before Remus support was added and hence reintroduced some none-Remus compatible bits.) Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> 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>
* [IA64] fix missing header: asm/fpswa.hKUWAMURA Shin'ya2011-02-181-0/+1
| | | | | | | | This patch fixes the following error in recent kernel: ia64/asm/dom_fw_common.h:47:23: error: asm/fpswa.h: No such file or directory Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* libxc: increase lzma max memory constant to 128MbyIan Jackson2011-02-111-1/+1
| | | | | | | | | | | According to lzma's configure.ac (!) the minimum memory limit to cope with arbitrary input is 128Mby (!) This is obviously an unreasonable amount of memory for this kind of task, but we need to increase the constant limit for it not to randomly fail. So do so. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: maintain a small, per-handle, cache of hypercall buffer memoryIan Campbell2011-02-013-19/+162
| | | | | | | | | | | | | | | | | | | | | | | | | Constantly m(un)locking memory can have significant overhead on systems with large numbers of CPUs. This was previously fixed by 20841:fbe8f32fa257 but this was dropped during the transition to hypercall buffers. Introduce a small cache of single page hypercall buffer allocations which can be resused to avoid this overhead. Add some statistics tracking to the hypercall buffer allocations. The cache size of 4 was chosen based on these statistics since they indicated that 2 pages was sufficient to satisfy all concurrent single page hypercall buffer allocations seen during "xl create", "xl shutdown" and "xl destroy" of both a PV and HVM guest therefore 4 pages should cover the majority of important cases. This fixes http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1719. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reported-by: Zheng, Shaohui <shaohui.zheng@intel.com> Tested-by: Haitao Shan <maillists.shan@gmail.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Do not use dom0 physmem as parameter to lzma decoderIan Jackson2011-01-284-46/+1
| | | | | | | | | | | | | | | | | | It's not clear why a userspace lzma decode would want to use that particular value, what bearing it has on anything or why it would assume it could use 1/3 of the total RAM in the system (potentially quite a large amount of RAM) as opposed to any other limit number. Instead, hardcode 32Mby. This reverts 22830:c80960244942, removes the xc_get_physmem/physmem function entirely, and replaces the expression at the call site with a fixed constant. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Cc: Christoph Egger <Christoph.Egger@amd.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/libxc, hvm: Fix 1G page allocation algorithmShan Haitao2011-01-281-11/+13
| | | | | | | | | | | | | | | | | | Currently, cur_pages (which is used as index into page_array for fetching gfns) is used to judge whether it is proper here to allocated 1G pages. However, cur_pages == page_array[cur_pages] only holds true when it is below 4G. When it is above 4G, page_array[cur_pages] - cur_pages = 256M. As a result, when guest has 10G memory, 8 1G-pages are allocated. But only 2 of them have their corresponding gfns 1G aligned. The other 6 are forced to split to 2M pages, as their starting gfns are 4G+256M, 5G+256M ................. Inside the patch, true gfns are used instead of cur_pages to fix this issue. Signed-off-by: Shan Haitao <haitao.shan@intel.com> Acked-by: George Dunlap <george.dunlap@citrix.com>
* libxc: break xc_get_physmem out into os-dependent filesChristoph Egger2011-01-274-22/+46
| | | | | | | | | | | NetBSD doesn't have sysconf(_SC_PHYS_PAGES). Factor physmem() out into os-dependent files and rename it to xc_get_physmem() so as not to pollute the namespace. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* hvm: allow pass-through of new FPU/ALU CPUID featuresKeir Fraser2011-01-272-1/+8
| | | | | | | | | there are some new CPUID features that are safe for guests to see, as they don't require OS awareness (FPU/ALU related instructions only). Among features for new AMD CPUs there is also the PCLMULQDQ bit, which Intel CPU have already for quite a while. Signed-off-by: Andre Przywara <andre.przywara@amd.com>
* libxc: provide XENCTRL_HAS_XC_INTERFACE feature test macroIan Jackson2011-01-271-0/+10
| | | | | | | | | This makes it easier for out-of-tree callers to tell which version of the libxc interface this version of xenctrl.h provides. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* x86: blacklist new AMD CPUID bits for PV domainsKeir Fraser2011-01-261-0/+5
| | | | | | | | | | | | there are some new CPUID bits (and leaves) which Dom0 and PV domains should not see to avoid trouble, since we don't emulate the features. The most prominent one is a topology leaf, which contains information specific to the physical CPU, not the virtual one. To avoid confusion (and possibly crashes) due to a confused Dom0 scheduler simply disable these bits. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Keir Fraser <keir@xen.org>
* tools: Change the name of the qemu save file at restore timeStefano Stabellini2011-01-212-1/+9
| | | | | | | | | Change the name of the qemu save file to qemu-resume at restore time so that it doesn't collide with the name of the next save file. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Remove set_max_grants in linuxDaniel De Graaf2011-01-172-14/+2
| | | | | | | | | The maximum number of grants is now constrained domain-wide in linux, so set_max_grants should be a noop there. Previously, this constraint was per-file-description. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* PoD: Fix two code commentsLiu, Jinsong2011-01-141-2/+3
| | | | | Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com> Acked-by: George Dunlap <george.dunlap@citrix.com>
* libxc: build fix with debugging disabled.Ian Campbell2011-01-141-2/+2
| | | | | | | | | | | | | Currently hypercalls have only 5 arguments, hypercall->arg[0..4]. Do not try and print arg[5] else: cc1: warnings being treated as errors xenctrl_osdep_ENOSYS.c: In function 'ENOSYS_privcmd_hypercall': xenctrl_osdep_ENOSYS.c:30: error: array subscript is above array bounds Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: Update AMD CPU feature flags 0x80000001:ECX for Xen toolsKeir Fraser2011-01-082-17/+22
| | | | | | | This patch syncs-up AMD CPU feature flags 0x80000001:ECX in libxc with the latest Linux kernel. Signed-off-by: Wei Huang <wei.huang2@amd.com>
* mem_access: added trap injection to libxcJoe Epstein2011-01-072-0/+40
| | | | | | | | * Carries forward the trap injection hypercall into libxc Signed-off-by: Joe Epstein <jepstein98@gmail.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
* mem_access: HVMOPs for setting mem accessJoe Epstein2011-01-075-0/+142
| | | | | | | | | | | | | | * Creates HVMOPs for setting and getting memory access. The hypercalls can set individual pages or the default access for new/refreshed pages. * Added functions to libxc to access these hypercalls. Signed-off-by: Joe Epstein <jepstein98@gmail.com> Reviewed-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
* libxc: portability fixes for NetBSDChristoph Egger2011-01-062-3/+3
| | | | | | | | | | | | | | | | | Attached patch makes libxc build again on NetBSD after the recent rework. [ Modified by iwj: I changed the name of the new make variable from LIBDL to DLOPEN_LIBS. The latter conforms to the naming scheme for similar variables found in config/*.mk - PTHREAD_LIBS et al. Also I moved the setting of the variable to -dl from Linux to StdGNU (which makes it apply more widely) and also added it to SunOS.mk (based on pure guesswork). ] Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: Use .opic to build xenctrl_osdep_ENOSYS.soKeir Fraser2010-12-241-3/+9
| | | | | | | | | | | | | Resolves build error: /usr/bin/ld: xenctrl_osdep_ENOSYS.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC xenctrl_osdep_ENOSYS.o: could not read symbols: Bad value collect2: ld returned 1 exit status Clean up object files correctly too. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* x86 xsave: supports xsave (CPUID:0xD) enumeration for all sub-leaves.Keir Fraser2010-12-241-48/+64
| | | | | | | | | | | | | | | | In specific, it fixes the following issues: 1. The sub-leaves of CPUID:0x0000000D aren't contiguous. Hypervisor shouldn't use register values to stop the enumeration. This patch moves checking on XSAVE sub-leaves out of if-else statement. It also bumps up sub-leaves to 63. 2. It creates a common function for xsave. 3. The main leaf 0 of CPUID:0x0000000D in current Xen is broken, especially ECX and EBX registers. This patch cleans it up. 4. It adds support to detects EBX value of CPUID:0x0000000D main leaf 0 on-the-fly. Signed-off-by: Wei Huang2 <wei.huang2@amd.com>
* libxc: refactor Linux OS interface into a separate file.Ian Campbell2010-12-033-642/+686
| | | | | | | | | | | This helps ensure that the osdep abstraction is complete by allowing us to avoid including xc_private.h. All the other OS backends could benefit from the same treatment but since I cannot compile test I did not do this. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: move foreign memory functions to xc_foreign_memory.cIan Campbell2010-12-032-72/+72
| | | | | | | Now that this file exists it is a better home for these than xc_misc.c Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: add abitility to dynamically load osdep.Ian Campbell2010-12-034-2/+291
| | | | | | | | Add a dummy backend which always returns ENOSYS. Mainly as a compile time testbed rather than because it is a useful backend. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: Use XC_PAGE_{SHIFT,MASK}.Ian Campbell2010-12-035-24/+24
| | | | | | | Avoid dependency on xc_private.h Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: allow osdep backends to log via the xc infrastructure.Ian Campbell2010-12-032-0/+11
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: drop fd from xc_interfaceIan Campbell2010-12-036-14/+0
| | | | | | | | Transition to xc_osdep_handle is now complete and nothing uses (or should be using) it. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: add ability to query OS interface for "fakeness"Ian Campbell2010-12-037-0/+29
| | | | | | | | | | | | i.e. not running on a real hypervisor Allows users of the library to adjust behaviour. I don't especially like this violation of the abstraction but both oxenstored and xapi use this to avoid difficult to simulate operations when running on the simulator. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_gnttab_set_max_grants()Ian Campbell2010-12-034-4/+13
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_gnttab_munmap()Ian Campbell2010-12-034-7/+24
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* libxc: osdep: convert xc_gnttab_map_{grant_ref,grant_refs,domain_grant_refs}()Ian Campbell2010-12-034-31/+106
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>