aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xg_private.h
Commit message (Collapse)AuthorAgeFilesLines
* libxc: introduce xc_map_domain_meminfo (and xc_unmap_domain_meminfo)Dario Faggioli2013-09-131-0/+9
| | | | | | | | | | | | | And use it in xc_exchange_page(). This is basically because the following change need something really similar to the set of steps that are here abstracted in these two functions. Despite of the change in the interface and in the signature of some functions, this is pure code motion. No functional changes involved. Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: drop relics of running on non-PAE 32-bit hostsJan Beulich2013-01-241-36/+0
| | | | | | | | | 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>
* libxc: add ARM support to xc_dom (PV domain building)Ian Campbell2012-10-091-0/+4
| | | | | | | | Includes ARM zImage support. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* libxc: convert shadow domctl interfaces and save/restore over to hypercall ↵Ian Campbell2010-10-221-0/+1
| | | | | | | buffers Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
* # HG changeset patchIan Campbell2010-08-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | # 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: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-3/+5
| | | | | | | | | | | | | | | | | | | | 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>
* libxc: New hcall_buf_{prep,release} pre-mlock interfaceKeir Fraser2010-01-221-2/+0
| | | | | | | | | | Allow certain performance-critical hypercall wrappers to register data buffers via a new interface which allows them to be 'bounced' into a pre-mlock'ed page-sized per-thread data area. This saves the cost of mlock/munlock on every such hypercall, which can be very expensive on modern kernels. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: create a domain_info_context structure to store guest_width and ↵Keir Fraser2009-12-011-7/+11
| | | | | | | | p2m_size for macros. Macro now refers to guest_width and p2m_size through a dinfo pointer. Signed-off-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
* libxc: remove redundant declaration of xc_copy_to_domain_page().Keir Fraser2008-07-111-3/+0
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* libxc: Move xg_memalign() into a proper source file, so that itKeir Fraser2008-04-091-17/+1
| | | | | | | | definitely does not leak out of tools/libxc. Return to the ioemu/osdep.c way of checking for posix_memalign() as this works on Solaris. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* libxc: Leave portability of xg_memalign() as in original patch, ratherKeir Fraser2008-04-091-1/+1
| | | | | | than following ioemu/osdep.c. This unbreaks build of readnotes. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* save/restore: Use page-aligned allocations for hypercall args that areKeir Fraser2008-04-091-0/+18
| | | | | | | mlock()ed across other hypercall invocations, to avoid aliasing with other hypercall arguments, causing spurious unlocking. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* Tools: fix save/restore of 32-bit PV guests with 64-bit toolsKeir Fraser2008-02-131-1/+3
| | | | | | | by removing some obvious typos, handling CR3 folding and hvirt_start based on guest word-size, and understanding 32-bit INVALID_MFN. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
* [TOOLS] Make xc_domain_{save, restore} understand compat guestsTim Deegan2007-09-191-12/+14
| | | | Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
* libxc portability fixes for NetBSD.kfraser@localhost.localdomain2007-09-191-1/+0
| | | | | | | | | | | - use MAP_ANON, that is what both (BSD-)Unix and Linux have - change last_error handling to use pthreads - round mlock() parameters to page alignment - cleanup: No need to include <xen/sys/privcmd.h> a second time in xg_private.h Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Some save/restore cleanups.Steven Hand2007-04-021-5/+4
| | | | Signed-off-by: Steven Hand <steven@xensource.com>
* Move some definitions from xg_save_resotre.h to xg_private.hKeir Fraser2007-02-241-0/+17
| | | | | | which are necessary for the new dump core implementation. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Lift physical address restriction in save/restore code.kfraser@localhost.localdomain2007-02-151-0/+7
| | | | | | Bump this to 44 bits for x86-32 and 52 bits for x86-64. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Remove old elf-parsing code from tools and from Xen.kfraser@localhost.localdomain2007-02-151-77/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* libxc header fixups.Emmanuel Ackaouy2007-01-251-49/+69
| | | | | | | | | | | | | | Make some arch-specific #defines for page table handling available unconditionally, add a suffix to avoid name clashes. The versions without suffix are defined depending on the architecture like they used to, so code using them continues to work. Signed-off-by: Gerd Hoffmann <kraxel@suse.de> --- tools/libxc/xg_private.h | 114 +++++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 47 deletions(-)
* Improve consistency of type-attribute usage (volatile/const).kfraser@localhost.localdomain2006-12-211-3/+3
| | | | | From: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Allow loading of ELF kernel images that support both PAE and non-PAE.kfraser@localhost.localdomain2006-12-141-0/+1
| | | | | | Also change the elf loader to not look for a strings section unless it is needed. Signed-off-by: Bruce Rogers <brogers@novell.com>
* [TOOLS] Uncompress and allocate memory for gzipped kernel and initrd images onIan Campbell2006-10-261-2/+0
| | | | | | | | | the fly. We cannot rely on the length contained in the gzip trailer to determine the length of the decompressed data because images have been observed which have trailing junk. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* [SOLARIS] Don't build ptrace code on Solaris.kfraser@localhost.localdomain2006-10-171-4/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Replace dom0_ops hypercall with three new hypercalls:kfraser@localhost.localdomain2006-08-251-9/+0
| | | | | | | | | | | | | | | | | | | | | | 1. platform_op -- used by dom0 kernel to perform actions on the hardware platform (e.g., MTRR access, microcode update, platform quirks, ...) 2. domctl -- used by management tools to control a specified domain 3. sysctl -- used by management tools for system-wide actions Benefits include more sensible factoring of actions to hypercalls. Also allows tool compatibility to be tracked separately from the dom0 kernel. The assumption is that it will be easier to replace libxenctrl, libxenguest and Xen as a matched set if the dom0 kernel does not need to be replaced too (e.g., because that would require vendor revalidation). From here on we hope to maintain dom0 kernel compatibility. This promise is not extended to tool compatibility beyond the existing guarantee that compatibility will not be broken within a three-level stable release [3.0.2, 3.0.3, etc.]. Signed-off-by: Keir Fraser <keir@xensource.com>
* [TOOLS] Cleanups to domU ELF loader.Ian Campbell2006-08-231-1/+1
| | | | | | | | - Remove debugging statements. - Cope better with archtectures where neither ELF notes or __xen_guest are needed or required. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* [TOOLS] Allow tools to load kernels which use an ELF notes segment.Ian Campbell2006-08-231-2/+26
| | | | | | Compatability with kernels using the __xen_guest section is retained. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
* Allow 32-bit libxc to load 64-bit ELF files.kaf24@firebug.cl.cam.ac.uk2006-06-301-6/+6
| | | | | | | | | | | - use 64-bit integral types for addresses in struct domain_start_info - use stroull() to parse 64-bit values - remove redundant _p(a) definition and add a comment - printf format changes for the new types Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* [TOOLS] Remove plan9 loader code. Latest plan9 port uses linux builder.kfraser@dhcp93.uk.xensource.com2006-06-271-4/+1
| | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* [LIBXC] Convert all printf/fprintf uses to use a macro instead.kaf24@firebug.cl.cam.ac.uk2006-06-071-17/+1
| | | | | | | Thus all can be disabled at compile time. It would be easy to make enabling/disabling a run-time option too. Signed-off-by: Keir Fraser <keir@xensource.com>
* Represent PFNs with their own type, rather than 'unsigned long'.kaf24@firebug.cl.cam.ac.uk2006-06-061-2/+2
| | | | | | ('long' changes size and alignment between 32- and 64-bit ABIs.) Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Create new vmassist type 'pae_extended_cr3'. Only advertisekaf24@firebug.cl.cam.ac.uk2006-06-051-0/+3
| | | | | | | | | pae_pgdir_above_4gb tp guests that have enabled this vmassist. Control tools ensure all PAE page directories are below 4GB unless the vmassist is enabled (triggered via an extended-cr3 option in guest Elf header). Signed-off-by: Keir Fraser <keir@xensource.com>
* Use a global build configuration file, and rework libxc Makefile for PPC.kfraser@dhcp93.uk.xensource.com2006-05-311-0/+8
| | | | | Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* [PTRACE] Fix ptrace for hvm guests.kaf24@firebug.cl.cam.ac.uk2006-05-241-0/+10
| | | | | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* Add support to domain builders for loading kernels with physical addresses ↵cl349@firebug.cl.cam.ac.uk2006-05-111-1/+4
| | | | | | | | | | | | | | | | | | | | in the elf paddr and entry fields. Add a new __xen_guest header field to distinguish between kernels with the previous use of the paddr field and the new use. Add a new __xen_guest header field to control the kernel entry point, since the elf header entry field now points to a physical address. This header field is also useful for supporting alternative entry points in kernel images which run both on xen and native. Also add a kernel config option to control whether the resulting kernel should include compatibility code to run on Xen 3.0.2 or whether such code such be left out, resulting in a kernel which will only run on newer Xen versions. Default to having compatibility enabled. Kernels built with the new use of the elf header fields would otherwise not work on Xen versions prior to this changeset. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Move Linux-specific privcmd code into private libxc implementations.kaf24@firebug.cl.cam.ac.uk2006-05-021-1/+1
| | | | | | | | | Make header path for kernel's privcmd/evtchn headers generic. Remove pointless xi_*() interface that was using private libxc interfaces. Signed-off-by: John Levon <john.levon@sun.com>
* Fix whitespace in libxc. Tabs are manually fixed.kaf24@firebug.cl.cam.ac.uk2006-04-151-5/+5
| | | | | | | | Trailing whitespace removed with: perl -p -i -e 's/\s+$/\n/g' tools/libxc/*.[ch] Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
* Clean up internal libxc functions to take 'const char *'kaf24@firebug.cl.cam.ac.uk2006-03-091-8/+12
| | | | | | | | parameters where possible, to avoid unnecessary casts. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add a parallel set of APIs to the domain builders to allow images andkaf24@firebug.cl.cam.ac.uk2006-03-091-8/+12
| | | | | | | | | | | | | | ramdisks to be passed via buffer, rather than via file. This allows usage of the underlying domain building routines in "file-challenged" enviroments. Specifically, xc_linux_build_mem is the buffer oriented version of the file-oriented xc_linux_build. Likewise, xc_hvm_build_mem is the buffer oriented analog of the file based xc_hvm_build. Signed-off-by: Ben Thomas (bthomas@virtualiron.com)
* Indirect hypercalls through a hypercall transfer page.kaf24@firebug.cl.cam.ac.uk2006-01-241-0/+3
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Add -Wdeclaration-after-statement to Xen and tools build.kaf24@firebug.cl.cam.ac.uk2005-11-221-1/+1
| | | | | | | | Fix the compile errors that result from this. Signed-off-by: Keir Fraser <keir@xensource.com>
* Make it possible to run valgrind on code linked with the libxc libraries.emellor@leeni.uk.xensource.com2005-11-221-0/+10
| | | | | | | | | | | | | | Valgrind cannot see when a hypercall has initialised entries in a data structure, so appropriate memsets have been placed before using dom0_op_t, privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this layer. This initialises the block so that valgrind considers it to be valid, but the data therein will be immediately overwritten by the hypercall, all being well. These changes are semantically neutral if -DVALGRIND is not set. Signed-off-by: Ewan Mellor <ewan@xensource.com>
* Many fixes for save/restore and related areas for PAE in particular. Nowsmh22@firebug.cl.cam.ac.uk2005-11-161-2/+0
| | | | | | | | should be able to save/restore successfully on machines with up to 16GB and any size of guest. Signed-off-by: Steven Hand <steven@xensource.com>
* Enable save/restore for PAE domains.smh22@firebug.cl.cam.ac.uk2005-11-081-0/+2
| | | | | | | | This includes quite a few cleanups / refactoring of the old code, some of which is intended to prepare for 64-bit save/restore. Signed-off-by: Steven Hand <steven@xensource.com>
* Fix Xen public interfaces and the tools to consistentlykaf24@firebug.cl.cam.ac.uk2005-10-121-8/+8
| | | | | | | | use stdint-format bitsize types (uint32_t and friends). Signed-off-by: Keir Fraser <keir@xensource.com>
* Make PAE defs in xg_private.h usable in both 32- andkaf24@firebug.cl.cam.ac.uk2005-09-231-15/+18
| | | | | | | | 64-bit builds. Signed-off-by: Keir Fraser <keir@xensource.com>
* Catchup with xen-unstable, add ia64 specifics to tools, and some VTI mergedjm@kirby.fc.hp.com2005-09-131-0/+1
| | | | | Signed-off-by Kevin Tian <Kevin.tian@intel.com>
* Break the building/save/restore code out into a separate library libxenguest.cl349@firebug.cl.cam.ac.uk2005-08-251-0/+170
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>