aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include
Commit message (Collapse)AuthorAgeFilesLines
* tools: foreign: add checks for compatible architecturesIan Campbell2013-08-202-2/+24
| | | | | | | | | That is architectures whose struct layout must be identical. Use this for arm32 and arm64. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xen: arm: include public/xen.h in foreign interface checkingIan Campbell2013-08-204-12/+18
| | | | | | | | | | | | | | | | | mkheader.py doesn't cope with struct foo { }; so add a newline. Define unsigned long and long to a non-existent type on ARM so as to catch their use. Teach mkheader.py to cope with structs which are ifdef'd. This cannot cope with #defines between the #ifdef and the struct definitions, so move MAX_GUEST_CMDLINE to be next to its only usage. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: foreign: ensure 64 bit values are properly aligned for armIan Campbell2013-02-261-4/+10
| | | | | | | | When building the foreign headers on x86_32 we use '#pragma pack(4)' and therefore need to explicitly align types which should be aligned to 8-byte boundaries. Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* xen: arm: separate guest user regs from internal guest state.Ian Campbell2013-02-223-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | struct cpu_user_regs is currently used as both internal state (specifically at the base of the stack) and a guest/toolstack visible API (via struct vcpu_guest_context used by XEN_DOMCTL_{g,s}etvcpucontext and VCPUOP_initialise). This causes problems when we want to make the API 64-bit clean since we don't really want to change the size of the on-stack struct. So split into vcpu_guest_core_regs which is the API facing struct and keep cpu_user_regs purely internal, translate between the two. In the user API arrange for both 64- and 32-bit registers to be included in a layout which does not differ depending on toolstack architecture. Also switch to using the more formal banked register names (e.g. with the _usr suffix) for clarity. This is an ABI change. Note that the kernel doesn't currently use this data structure so it affects the tools interface only. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Tim Deegan <tim@xen.org>
* xen: arm64: add to foreign struct checksIan Campbell2013-02-224-11/+28
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* xen: event channel arrays are xen_ulong_t and not unsigned longIan Campbell2013-02-221-1/+3
| | | | | | | | | | On ARM we want these to be the same size on 32- and 64-bit. This is an ABI change on ARM. X86 does not change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* tools: s/arm/arm32/ in foreign header checks.Ian Campbell2013-02-223-4/+8
| | | | | | | Also define __arm__ARM32 as required. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* tools: Synchronize privcmd header constantsAndres Lagar-Cavilla2012-11-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Since Linux's git commit ceb90fa0a8008059ecbbf9114cb89dc71a730bb6, the privcmd.h interface between Linux and libxc specifies two new constants, PRIVCMD_MMAPBATCH_MFN_ERROR and PRIVCMD_MMAPBATCH_PAGED_ERROR. These constants represent the error codes encoded in the top nibble of an mfn slot passed to the legacy MMAPBATCH ioctl. In particular, libxenctrl checks for the equivalent of the latter constant when dealing with paged out frames that might be the target of a foreign map. Previously, the relevant constant was defined in the domctl hypervisor interface header (XEN_DOMCTL_PFINFO_PAGEDTAB). Because this top-nibble encoding is a contract between the dom0 kernel and libxc, a domctl.h definition is misplaced. - Sync the privcmd.h header to that now available in upstream Linux - Update libxc appropriately - Remove the unnecessary constant in domctl.h Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Acked-by: Ian Campbell <ian.campbelL@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* arm: tools: add arm to foreign structs checkingIan Campbell2012-10-174-12/+27
| | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: drop ia64 only foreign structs from headersIan Campbell2012-09-172-13/+0
| | | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* tools: drop ia64 supportIan Campbell2012-09-124-38/+17
| | | | | | | | | | | | | | | | | Removed support from libxc and mini-os. This also took me under xen/include/public via various symlinks. Dropped tools/debugger/xenitp entirely, it was described upon commit as: "Xenitp is a low-level debugger for ia64" and doesn't appear to be linked into the build anywhere. 99 files changed, 14 insertions(+), 32361 deletions(-) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xenstored: Add stub domain builderDaniel De Graaf2012-02-091-0/+44
| | | | | | | Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* mini-os: use BSD sys/queue.h instead of Linux list.hIan Campbell2012-01-315-0/+1903
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latter is GPL which makes the whole of mini-os GPL rather than BSD as intended. In tree users are all GPL or GPL-compatible but we should fix this so that mini-os is BSD. Do so by using the same BSD sys/queue.h as we use in libxl. Tested with the builtin mini-os test app and qemu stubdomain, both of which appear to still function as expected. Move tools/libxl/external and the associated sed script to tools/include/xen-external to allow more sensible access from mini-os. Also add s/NULL/0/ in the sed script due to NULL not always being defined in stubdom code when mini-os/wait.h is included. As well as the obvious ABI changes there are a few API updates associated with the change: - struct rw_semaphore.wait_list is unused - remove_waiter needs to take the wait_queue_head The latter requires a qemu update, so there is also a QEMU_TAG update in this changeset. I sprinkled some extra-emacs local variables around the files I edited which didn't have them. I think this should be backported to the stable branches since external users of mini-os may have been mislead into thinking they could safely link mini-os against GPL-incompatible code. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
* libxc: add xc_gntshr_* functionsDaniel De Graaf2011-10-061-0/+82
| | | | | | | | | These functions and the xc_gntshr device (/dev/xen/gntalloc on linux) allow applications to create pages shared with other domains. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* libxc: add xc_gnttab_map_grant_ref_notifyDaniel De Graaf2011-10-061-1/+32
| | | | | | | | | | | | | | | Normally, when a userspace process mapping a grant crashes, the domain providing the reference receives no indication that its peer has crashed, possibly leading to unexpected freezes or timeouts. This function provides a notification of the unmap by signalling an event channel and/or clearing a specific byte in the page. This also unifies the 3 very similar grant-mapping osdep interfaces into a single function instead of introducing yet another minor variation. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-172-6/+6
| | | | | | | | 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>
* x86, libxc: Fix xc_translate_foreign_address() for PV guests ofKeir Fraser2011-03-031-0/+1
| | | | | | | 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: NetBSD: implement xc_evtchn_bind_unbound_port.Ian Campbell2010-12-021-3/+0
| | | | | | | | | | | | | | | Doesn't actually appear to be used anywhere but is defined for other OSes. The NetBSD evtchn.h contains comments "Return allocated port" for several ioctls which currently return the allocated port as a member of the argument structure and not as the ioctl return value (I think this is a cut and paste error). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Christoph Egger <Christoph.Egger@amd.com> committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
* # HG changeset patchIan Campbell2010-08-241-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | # 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: use new (replacement) mmap-batch ioctlKeir Fraser2010-01-131-0/+10
| | | | | | | | | | | | | | | | | | | | Replace all calls to xc_map_foreign_batch() where the caller doesn't look at the passed in array to check for errors by calls to xc_map_foreign_pages(). Replace all remaining calls by such to the newly introduced xc_map_foreign_bulk(). As a sideband modification (needed while writing the patch to ensure they're unused) eliminate unused parameters to uncanonicalize_pagetable() and xc_map_foreign_batch_single(). Also unmap live_p2m_frame_list earlier in map_and_save_p2m_table(), reducing the peak amount of virtual address space required. All supported OSes other than Linux continue to use the old ioctl for the time being. Also change libxc's MAJOR to 4.0 to reflect the API change. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* minios: switch to C99 integer typesKeir Fraser2009-07-151-3/+3
| | | | | | This is a necessary step to make minios build on NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: python -> $(PYTHON)Keir Fraser2009-07-091-4/+4
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* x86_64: allow more vCPU-s per guestKeir Fraser2009-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the shared info layout is fixed, guests are required to use VCPUOP_register_vcpu_info prior to booting any vCPU beyond the traditional limit of 32. MAX_VIRT_CPUS, being an implemetation detail of the hypervisor, is no longer being exposed in the public headers. The tools changes are clearly incomplete (and done only so things would build again), and the current state of the tools (using scalar variables all over the place to represent vCPU bitmaps) very likely doesn't permit booting DomU-s with more than the traditional number of vCPU-s. Testing of the extended functionality was done with Dom0 (96 vCPU-s, as well as 128 vCPU-s out of which the kernel elected - by way of a simple kernel side patch - to use only some, resulting in a sparse bitmap). ia64 changes only to make things build, and build-tested only (and the tools part only as far as the build would go without encountering unrelated problems in the blktap code). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Fix dependencies in tools/include/xen-foreign/MakefileKeir Fraser2009-06-161-4/+4
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* tools: clean up handling of xen config and scripts directories.Keir Fraser2009-05-191-1/+1
| | | | | | | For now hardcode /etc w/o a prefix as there are hardcoded config paths in the code which would break otherwise. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Move libelf headers out of xen public header dir.Keir Fraser2009-01-081-1/+2
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86-64: guest directed placement of initial p->m mapKeir Fraser2009-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By adding another ELF note, the kernel can now direct the hypervisor (for Dom0) and in the future also the tools (for DomU-s) to place the initial phys->mach translation table at other than an address immediately above the kernel/initrd images. This eliminates the size restriction imposed on this table by Linux (the kernel loads above the -2Gb boundary, and hence the entire initial mapping cannot reach or even exceed 2Gb). There are a few items in this patch I'm not particularly happy with, but couldn't think of a better solution: - there is a hidden assumption that pages allocated for the domain are put on the domain's page list sequentially - the way backward compatibility is maintained is placing requirements on the kernel side that make the code somewhat convoluted (because it needs to check where the map is actually placed in quite a few places) - code is there to use 1Gb mappings for the hypervisor created table, but lacking a machine with 512G+ memory for immediate testing I can't verify this works; I know that 2Mb mappings work, and hence imply that 1Gb ones would too (of course, if the kernel replaces the table - like Linux does -, it cannot use 2Mb/1Gb mappings or even try to re-use the page table entries, but I don't consider this a problem) Signed-off-by: Jan Beulich <jbeulich@novell.com>
* pv-grub: re-implement xc_map_foreign_rangesKeir Fraser2008-07-241-2/+0
| | | | | | | Also get rid of va and npages members of privcmd_mmap_entry since we do not need them any more. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* stubdom: make compilation independent of tools/ by building our own copy of ↵Keir Fraser2008-07-091-0/+18
| | | | | | the includes Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* libxc: Update for NetBSDKeir Fraser2008-06-101-0/+1
| | | | | | returns hypercall return value when ioctl was successful. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* [IA64] Install missing ia64 hvm public headers.Alex Williamson2008-04-141-0/+2
| | | | Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
* Revert all usages of gcc's __extension__ keyword, and instead assertKeir Fraser2008-03-312-5/+2
| | | | | | | | | | | that our headers are not built with __GNUC__ and __STRICT_ANSI__. __extension__ had some weird (and buggy) behaviours when nested which make it a risky proposition for general usage in our header files. Better to disallow -ansi, -std=c99, and similar gcc options when building against Xen headers. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Explicitly tag every anonymous aggregate in the public headers.Keir Fraser2008-03-262-1/+4
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Prefix unnamed union structure fields with __extension__ to make itKeir Fraser2008-03-251-1/+1
| | | | | | work properly even in e.g. C99 standard mode. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* libxc: Variable-size gntdev supportKeir Fraser2008-03-181-0/+14
| | | | | | | | This patch adds the ability to set the number of slots that may be used for mapping grant references, using the gntdev user-space grant reference mapping driver. Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
* Install missing hvm public headers.Keir Fraser2008-03-181-0/+2
| | | | Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
* Move remaining xen/include/public/foreign files to tools/include/xen-foreignKeir Fraser2008-01-275-9/+301
| | | | | | | | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com> --HG-- rename : xen/include/public/foreign/mkchecker.py => tools/include/xen-foreign/mkchecker.py rename : xen/include/public/foreign/mkheader.py => tools/include/xen-foreign/mkheader.py rename : xen/include/public/foreign/reference.size => tools/include/xen-foreign/reference.size rename : xen/include/public/foreign/structs.py => tools/include/xen-foreign/structs.py
* Fix ia64 public headers installation typo.Keir Fraser2008-01-271-1/+1
| | | | Signed-off-by: Alex Williamson <alex.williamson@hp.com>
* Do not special-case native architecture in mkchecker.py.Keir Fraser2008-01-271-6/+1
| | | | | From: Bastian Blank <waldi@debian.org> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move xen/foreign build out of tree setup.Keir Fraser2008-01-261-5/+7
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Use real source files for xen/foreign build.Keir Fraser2008-01-261-9/+9
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move xen/sys parts down to tools/include/xen-sys.Keir Fraser2008-01-269-1/+1
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Also install xen/sys into headers.Keir Fraser2008-01-261-0/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Remove commented-out dropping from previous changeset.Keir Fraser2008-01-261-1/+0
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-262-0/+85
| | | | | | | This patch merges the two versions of public header generation currently used in the build into one. Signed-off-by: Bastian Blank <waldi@debian.org>
* libxc: NetBSD-specific pieces.Keir Fraser2007-09-242-0/+194
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Include Solaris kernel headerskfraser@localhost.localdomain2007-06-113-0/+221
| | | | | | | | | | Add the Solaris kernel headers used be the userspace tools to the distribution. The same setup as used by Linux is taken. We modify the Linux kernel headers to also install in /usr/include/xen/sys/ - without a kernel-neutral path, it can make using the headers very difficult, and encourages errors. Signed-off-by: John Levon <john.levon@sun.com>
* Remove a few stray references to the sparse tree.Ian Campbell2007-06-043-0/+272
The only non-obvious change here is in tools/xenfb/Makefile. This now picks up the headers it requires via the copy in tools/libxc. Signed-off-by: Ian Campbell <ian.campbell@xensource.com>