Commit Graph
214 Commits
Author SHA1 Message Date
Ian Jackson 70d597d0ef build system: Introduce nosharedlibs variable.
Introduce a new build variable "nosharedlibs".

In tools/libxc use it instead of $(stubdom).
In tools/xenstore honour it, and build static clients.

If shared libs are disabled, do not try to install or symlink them.

Set nosharedlibs when building for MiniOS or NetBSDRump.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>

---
v2: Clarify deliberate INSTALL_SHLIB and SYMLINK_SHLIB breakage.
2014-07-14 16:07:50 +01:00
Ian Jackson 0343a41c86 build system: Introduce INSTALL_SHLIB and SYMLINK_SHLIB
INSTALL_SHLIB is like INSTALL_PROG but used only for shared libraries.
SYMLINK_SHLIB is the ln -sf rune for shared library symlinks.

Use these in the appropriate places in tools/libxc and tools/xenstore.

No functional change right now.  In a forthcoming patch these
variables might take on different values.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-07-14 16:07:50 +01:00
Dario Faggioli d172e6b648 libxc/libxl: bump library SONAMEs
The following two patches break both libxc and libxl ABI and
API, so we better bump the MAJORs.

Of course, for libxl, proper measures are taken (in the
relevant patch) in order to guarantee API stability.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-06-27 13:38:32 +01:00
Roger Pau Monne d2ee2e3846 libxc: add support for FreeBSD
Add the FreeBSD implementation of the privcmd and evtchn devices
interface.

The evtchn device interface is the same as the Linux one, while the
privcmd map interface is simplified because FreeBSD only supports
IOCTL_PRIVCMD_MMAPBATCH.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-06-18 17:17:49 +01:00
Andrew Cooper 171c6d7ac1 tools/libxc: Add Valgrind client requests
Valgrind client requests can be used by code to provide extra debugging
information about memory ranges, or to request checks at specific points.

Reference:
  http://valgrind.org/docs/manual/mc-manual.html#mc-manual.clientreqs

Client requests are safe to compile into code for running outside of
valgrind.  Therefore, enable client requests whenever autoconf can find
memcheck.h and debug builds are enabled.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- reran autogen.sh ]
2014-06-12 10:04:44 +01:00
Andrew Cooper b1dfc531d8 tools/libxc: Remove valgrind conditional sections from libxc
The ifdef sections are not enabled at all in tree, and their justification is
out of date now that Xen hypercall support exists upstream in valgrind.

This also removes a commented-out tweak to CFLAGS in the libxc Makefile which
is not being used, and becomes stale given this patch.  In the unlikely event
that any developers were using the line, the results can be more easily
achieved by tweaking APPEND_CFLAGS in the environment.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-04-16 17:08:54 +01:00
Ian Jackson a06b425841 tools: Bump library SONAMEs for 4.4
There have been ABI/API changes in libxc.  Bump its MAJOR (which
affets libxenguest et al too.)

There have been ABI changes in libxl.  Bump its MAJOR.
(The API changes have been dealt with as we go along - there is
already a LIBXL_API_VERSION 0x040400.)

None of the other libraries have changed their interfaces.  I have
verified this by building the tools and searching the dist/install
tree for files matching *.so.*.  For each library that showed up, I
did this:
  git-diff RELEASE-4.3.0..staging -- `find tools/FOO/ -name \*.h`
where FOO is the corresponding source directory.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
2014-02-06 12:51:52 +00:00
David Vrabel 19f46b0927 libxc: add API for kexec hypercall
Add xc_kexec_exec(), xc_kexec_get_ranges(), xc_kexec_load(), and
xc_kexec_unload().  The load and unload calls require the v2 load and
unload ops.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Tested-by: Don Slutz <dslutz@verizon.com>
Acked-by: Keir Fraser <keir@xen.org>
2013-11-12 11:47:07 +01:00
Jan Beulich 84f04d8f0d libxc: add LZ4 decompression support
Since there's no shared or static library to link against, this simply
re-uses the hypervisor side code. However, I only audited the code
added here for possible security issues, not the referenced code in
the hypervisor tree.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-10-07 09:42:51 +02:00
Ian Jackson a004800f8f libelf: use only unsigned integers
Signed integers have undesirable undefined behaviours on overflow.
Malicious compilers can turn apparently-correct code into code with
security vulnerabilities etc.

So use only unsigned integers.  Exceptions are booleans (which we have
already changed) and error codes.

We _do_ change all the chars which aren't fixed constants from our own
text segment, but not the char*s.  This is because it is safe to
access an arbitrary byte through a char*, but not necessarily safe to
convert an arbitrary value to a char.

As a consequence we need to compile libelf with -Wno-pointer-sign.

It is OK to change all the signed integers to unsigned because all the
inequalities in libelf are in contexts where we don't "expect"
negative numbers.

In libelf-dominfo.c:elf_xen_parse we rename a variable "rc" to
"more_notes" as it actually contains a note count derived from the
input image.  The "error" return value from elf_xen_parse_notes is
changed from -1 to ~0U.

grepping shows only one occurrence of "PRId" or "%d" or "%ld" in
libelf and xc_dom_elfloader.c (a "%d" which becomes "%u").

This is part of the fix to a security issue, XSA-55.

For those concerned about unintentional functional changes, the
following rune produces a version of the patch which is much smaller
and eliminates only non-functional changes:

 GIT_EXTERNAL_DIFF=.../unsigned-differ git-diff <before>..<after>

where <before> and <after> are git refs for the code before and after
this patch, and unsigned-differ is this shell script:

    #!/bin/bash
    set -e

    seddery () {
            perl -pe 's/\b(?:elf_errorstatus|elf_negerrnoval)\b/int/g'
    }

    path="$1"
    in="$2"
    out="$5"

    set +e
    diff -pu --label "$path~" <(seddery <"$in") --label "$path" <(seddery <"$out")
    rc=$?
    set -e
    if [ $rc = 1 ]; then rc=0; fi
    exit $rc

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

v8: Use "?!?!" to express consternation instead of a ruder phrase.

v5: Introduce ELF_NOTE_INVALID, instead of using a literal ~0U.

v4: Fix regression in elf_round_up; use uint64_t here.

v3: Changes to booleans split off into separate patch.

v2: BUGFIX: Eliminate conversion to int of return from elf_xen_parse_notes.
    BUGFIX: Fix the one printf format thing which needs changing.
    Remove irrelevant change to constify note_desc.name in libelf-dominfo.c.
    In xc_dom_load_elf_symtab change one sizeof(int) to sizeof(unsigned).
    Do not change type of 2nd argument to memset.
    Provide seddery for easier review.
    Style fix.
2013-06-14 16:39:36 +01:00
Ian Jackson 14573b9748 libelf: abolish libelf-relocate.c
This file is not actually used.  It's not built in Xen's instance of
libelf; in libxc's it's built but nothing in it is called.  Do not
compile it in libxc, and delete it.

This reduces the amount of work we need to do in forthcoming patches
to libelf (particularly since as libelf-relocate.c is not used it is
probably full of bugs).

This is part of the fix to a security issue, XSA-55.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Chuck Anderson <chuck.anderson@oracle.com>
2013-06-14 16:39:34 +01:00
Ian Jackson dac66a5b2d tools: Bump some library sonames
libxc (libxenctrl, libxenguest):
   New claim_enabled field in struct xc_dom_image;
   New nr_outstanding_pages field in struct xc_dominfo;
   New fields in struct xc_hvm_build_args (xenguest.h).

libxl:
   new fields in dominfo domain_build_info device_vfb device_vkb
     device_disk etc. etc. etc.
   libxlu #includes libxl headers so needs to inherit its new soname
   Use Xen version for new sonames since we don't in fact guarantee
   ABI (as opposed to API) stability across releases.

xenstore (libxenstore):
   New flag XS_UNWATCH_FILTER, so bump minor version only.

This was the result of reviewing the output from:
  git-checkout staging
  cd tools
  git-diff RELEASE-4.2.2 `find -name \*.h`

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2013-05-07 13:37:56 +01:00
Bastian Blank 592d3ef961 libxc: Add unsafe decompressors
Add decompressors based on hypervisor code.  This are used in mini-os by
pv-grub.

This enables pv-grub to boot kernels compressed with e.g. xz, which are
becoming more common.

Signed-off-by: Bastian Blank <waldi@debian.org>

Adjusted to use terminology "unsafe" rather than "trusted" to indicate
that the user had better sanitise the data (or not care, as in stub
domains) as suggested by Tim Deegan. This was effectively a sed script.

Minimise the changes to hypervisor code by moving the "compat layer" into the
relevant libxc source files (which include the Xen ones).

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2013-04-22 12:46:30 +01:00
Ian Campbell 417597de75 libxc: add ARM support to xc_dom (PV domain building)
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>
2012-10-09 15:05:30 +01:00
Ian Campbell e567964a54 tools: drop ia64 support
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>
2012-09-12 17:55:27 +01:00
Stefano Stabellini 39a735b1e1 arm: compile libxenguest
Introduce an empty implementation of the arch specific ARM functions in
xc_dom_arm.c.
Provide empty implementations of xc_domain_save and xc_domain_restore
when CONFIG_MIGRATE is not set.
Move xc_hvm_build.c to xc_hvm_build_x86.c because the implementation is
x86 specific, introduce xc_hvm_build_arm.c with empty stubs.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
2012-05-30 08:57:47 +01:00
Ian Jackson 90b969c2ed tools: Correct PTHREAD options in config/StdGNU.mk
It is not correct to say -lpthread.  The correct option is -pthread,
which may have sundry other effects on code generation etc.  It needs
to be passed both to compilation and linking.

Fix the configure test to test -pthread, and plumb the resulting flag
through to PTHREAD_{CFLAGS,LDFLAGS} in Tools.mk; also substitute
PTHREAD_LIBS (although this will currently always be empty).
Remove PTHREAD_LIBS setting from StdGNU.mk.

Fix the one user (libxc) to use PTHREAD_{CFLAGS,LDFLAGS} too.

There are still some other users in tree which pass -pthread or
-lpthread by adding it as a literal to their own compiler options.
These will be fixed in a later patch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2012-04-11 14:14:11 +01:00
Roger Pau Monne de0f8c7cc2 autoconf: add missing compression checks for libxc
Move missing checks from tools/libxc/Makefile to configure script.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Jan Beulich <JBeulich@suse.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-14 14:20:58 +00:00
Stefano Stabellini daa314fe19 arm: compile libxc
Introduce an empty implementation of the arch specific ARM functions in
xc_core_arm.c and xc_core_arm.h; define barriers on ARM.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-03-01 17:37:03 +00:00
Shriram Rajagopalan f6b3d39f5d tools/libxc: Remus Checkpoint Compression
Instead of sending dirty pages of guest memory as-is, use a simple compression
algorithm that sends a RLE-encoded XOR of the page against its last sent copy.
A small LRU cache is used to hold recently dirtied pages. Pagetable pages are
sent as-is, as they are canonicalized at sender side and uncanonicalized at
receiver.

[ Fixed up a conflict in sg_save_restore.h.  I had to increase the
  ID values used from -11 and -12 to -12 and -13 because -11 had
  been taken by ..._HVM_VIRIDIAN in the meantime. -iwj ]

Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Brendan Cully <brendan@cs.ubc.ca>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-12-01 15:36:15 +00:00
Roger Pau Monne 9163062a39 tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}
Create two new variables called APPEND_ and PREPEND_ to add compile
flags at the beginning or at the end of the search path.

Added a new semantic for user defined compile flags, here is the list
of possible options:

PREPEND_LIB: add libraries to the search path before xen
             (before xen installation folders).
PREPEND_INCLUDES: add headers to the search path before xen
                  (before xen installation folders).
APPEND_LIB: add libraries to the search path at the end
            (after all xen installation folders have been added).
APPEND_INCLUDES: add libraries to the search path at the end
                 (after all xen installation folders have been added).

EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the
same effect as PREPEND_INCLUDES and PREPEND_LIB.

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-11-14 18:14:07 +00:00
Olaf Hering 2c36185d44 mem_event: use different ringbuffers for share, paging and access
Up to now a single ring buffer was used for mem_share, xenpaging and
xen-access.  Each helper would have to cooperate and pull only its own
requests from the ring.  Unfortunately this was not implemented. And
even if it was, it would make the whole concept fragile because a crash
or early exit of one helper would stall the others.

What happend up to now is that active xenpaging + memory_sharing would
push memsharing requests in the buffer. xenpaging is not prepared for
such requests.

This patch creates an independet ring buffer for mem_share, xenpaging
and xen-access and adds also new functions to enable xenpaging and
xen-access. The xc_mem_event_enable/xc_mem_event_disable functions will
be removed. The various XEN_DOMCTL_MEM_EVENT_* macros were cleaned up.
Due to the removal the API changed, so the SONAME will be changed too.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Tim Deegan <tim@xen.org>
2011-09-16 12:19:26 +01:00
Ian Campbell 61d0fe74c6 tools: Remove $(CFLAGS) from links lines.
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>
2011-03-31 19:32:18 +01:00
Keir Fraser 6102cace93 Remove unmaintained Access Control Module (ACM) from hypervisor.
Signed-off-by: Keir Fraser <keir@xen.org>
2011-03-25 21:47:57 +00:00
Ian Campbell ca366c33f3 tools: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.
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>
2011-03-21 18:05:49 +00:00
Ian Campbell 3531dea6fd tools: consistently use $(CFLAGS_xeninclude) instead of open coding.
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>
2011-03-21 18:04:59 +00:00
Ian Campbell 26f4cfd64e tools: remove unnecessary uses of -L.
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>
2011-03-21 17:58:23 +00:00
Ian Campbell 3135307760 tools: Drop use of $(INCLUDES)
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>
2011-03-21 17:45:50 +00:00
Ian Campbell dc9c2d4e31 libxc: remove dependency on xenstore headers.
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>
2011-03-21 17:39:41 +00:00
Ian Campbell 0394b57cda tools: support building with --as-needed
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>
2011-03-17 19:15:42 +00:00
Keir Fraser 547cb1849c build: Make XEN_ROOT an absolute path.
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>
2011-03-17 10:36:25 +00:00
Joe Epstein 81f8af44ba mem_access: HVMOPs for setting mem access
* 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>
2011-01-07 11:54:45 +00:00
Christoph Egger f1223b4eec libxc: portability fixes for NetBSD
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>
2011-01-06 17:26:26 +00:00
Keir Fraser 39810ac59b libxc: Use .opic to build xenctrl_osdep_ENOSYS.so
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>
2010-12-24 10:17:49 +00:00
Ian Campbell d2c71cadc5 libxc: refactor Linux OS interface into a separate file.
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>
2010-12-03 09:36:47 +00:00
Ian Campbell c89c726db9 libxc: add abitility to dynamically load osdep.
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>
2010-12-03 09:36:47 +00:00
Ian Campbell f32797d331 libxc: osdep: convert xc_map_foreign_{batch,bulk}
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:47 +00:00
Ian Campbell 02e4f47747 libxc: osdep: add framework for abstracting access to dom0 OS hypervisor interfaces.
This patch introduces the basic infrastructure and uses it for open
and close operations on privcmd, evtchn and gnttab devices.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
2010-12-03 09:36:46 +00:00
Ian Campbell 252cb308e3 libxc: some xc_gnttab_* functions are not Linux specific
They simply make hypercalls and perform other operations via the
abstract interface. Create xc_gnttab.c and move those functions there.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-12-23 15:08:21 +00:00
Keir Fraser 22787f2e10 ARINC 653 scheduler
From: Josh Holtrop <Josh.Holtrop@dornerworks.com>
Signed-off-by: Keir Fraser <keir@xen.org>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-12-01 21:20:14 +00:00
Ian Campbell b545e27bc6 libxc: infrastructure for hypercall safe data buffers.
(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>
2010-10-26 12:11:37 +01:00
Ian Campbell d14db9f863 libxc: remove xc_ptrace
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>
2010-08-24 18:34:46 +01:00
Ian Campbell fa2244104b libxc: disable xc_ptrace on x86 Linux
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>
2010-08-13 14:25:56 +01:00
Stefano Stabellini ba26a1e197 split LDLIBS from LDFLAGS to fix link errors in recent toolchains
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>
2010-08-11 18:02:32 +01:00
Olaf Hering 2369c11953 libxenguest: correct order of zlib linker options to avoid link errors
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>
2010-07-26 11:24:51 +01:00
Keir Fraser c2c4e65d96 Allow LZO compressed bzImage to be used as DomU kernel
... since recently Linux added this as another kernel compression
method.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2010-06-15 13:20:11 +01:00
Keir Fraser 7f9a888af4 xtl: New xentoollog mini-library.
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>
2010-05-28 09:29:15 +01:00
Keir Fraser a5f70e8d92 cpupools [2/6]: libxc changes
Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
2010-04-21 12:49:00 +01:00
Keir Fraser 3ac51fc221 credit2: Add toolstack options to control credit2 scheduler parameters
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
2010-04-14 12:10:19 +01:00
Keir Fraser 9fececad98 libxc: use new (replacement) mmap-batch ioctl
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>
2010-01-13 08:12:56 +00:00