Commit Graph
173 Commits
Author SHA1 Message Date
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
Keir Fraser 40be3d02f0 Interfaces to memshr domctls.
Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
2009-12-17 06:27:56 +00:00
Keir Fraser c0c8c01d67 libxc interface support for memory paging domctls.
Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>
2009-12-17 06:27:55 +00:00
Keir Fraser 5c0a90da40 imported patch mem_event_tools_domctls.patch 2009-12-17 06:27:55 +00:00
Keir Fraser 552cd79c66 libxc: More LZMA/BZIP fixes.
- Fix an error message in xc_try_bzip2_decode()
 - Check library installation on demand using a Makefile function,
   rather than generating a dependency file. Cleaner and avoids a race
   on generating the dep file.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-24 08:27:30 +01:00
Keir Fraser a8f634b0a3 Revert 20105:979fd420311b 2009-08-21 17:00:01 +01:00
Keir Fraser ee316d2f8c libxc: Remove minios-specific hack for generating .zlib.deps file
It's not needed if one relative path is replaced.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-21 11:10:49 +01:00
Keir Fraser 4a22a4ce1e libxenguest: Fix libbz2/liblzma dependency computation.
1. Create an empty dep file if neither lib is installed
 2. Forcibly disable support for libs if building minios

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-20 22:26:16 +01:00
Keir Fraser d7c9674faa domain builder: Implement bzip2 and LZMA loaders
Recent upstream kernels can be compressed using either gzip,
bzip2, or LZMA.  However, the PV kernel loader in Xen currently only
understands gzip, and will fail on the other two types.  The attached
patch implements kernel decompression for gzip, bzip2, and LZMA so
that kernels compressed with any of these methods can be launched.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2009-08-20 22:12:25 +01:00
Keir Fraser 310311cd88 libxc: fix link error on ia64
On ia64, xen-unstable 19698:f72d26c00002 cannot be built:
../../tools/libxc/libxenguest.so: undefined reference to
`xc_core_arch_map_p2m_writable'
../../tools/libxc/libxenguest.so: undefined reference to `xc_map_m2p'

Because xc_offline_page.c requires xc_map_m2p() in xc_domain_save.c,
xc_offline_page.c must be compiled only if CONFIG_MIGRATE=3Dy.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-06-04 10:36:36 +01:00
Keir Fraser 79cda3bac9 Export page offline hypercalls to user space tools.
Signed-off-by: Jiang, Yunhong <yunhong.jiang@intel.com>
2009-06-01 14:08:58 +01:00
Keir Fraser 6009f4ddb2 Transcendent memory ("tmem") for Xen.
Tmem, when called from a tmem-capable (paravirtualized) guest, makes
use of otherwise unutilized ("fallow") memory to create and manage
pools of pages that can be accessed from the guest either as
"ephemeral" pages or as "persistent" pages.  In either case, the pages
are not directly addressible by the guest, only copied to and fro via
the tmem interface.  Ephemeral pages are a nice place for a guest to
put recently evicted clean pages that it might need again; these pages
can be reclaimed synchronously by Xen for other guests or other uses.
Persistent pages are a nice place for a guest to put "swap" pages to
avoid sending them to disk.  These pages retain data as long as the
guest lives, but count against the guest memory allocation.

Tmem pages may optionally be compressed and, in certain cases, can be
shared between guests.  Tmem also handles concurrency nicely and
provides limited QoS settings to combat malicious DoS attempts.
Save/restore and live migration support is not yet provided.

Tmem is primarily targeted for an x86 64-bit hypervisor.  On a 32-bit
x86 hypervisor, it has limited functionality and testing due to
limitations of the xen heap.  Nearly all of tmem is
architecture-independent; three routines remain to be ported to ia64
and it should work on that architecture too.  It is also structured to
be portable to non-Xen environments.

Tmem defaults off (for now) and must be enabled with a "tmem" xen boot
option (and does nothing unless a tmem-capable guest is running).  The
"tmem_compress" boot option enables compression which takes about 10x
more CPU but approximately doubles the number of pages that can be
stored.

Tmem can be controlled via several "xm" commands and many interesting
tmem statistics can be obtained.  A README and internal specification
will follow, but lots of useful prose about tmem, as well as Linux
patches, can be found at http://oss.oracle.com/projects/tmem .

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-05-26 11:05:04 +01:00
Keir Fraser 92f5c346e7 libxc: fix link error of xc_save on ia64
The suspend event channel functions are arch independent code
which xc_save uses.
The changeset of 19382:a5f497f02e34 cause link error on ia64.
This patch moves the functions into arch common file from
x86 specific file xc_domain_save.c

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-03-24 06:55:29 +00:00
Keir Fraser 26181d3763 bump libxenctrl and libxenguest versions
In c/s 19009 an incompatible change was made to the ABI of libelf-*,
which are included in libxenctrl and libxenguest.  To avoid client
programs (such as python/lowlevel/xc/xc.so) picking up a wrong
version and perhaps crashing, the soname should be changed.

I have chosen the version number 3.4 as xen-unstable is currently the
pre-3.4 branch.  I assume we don't care about API/ABI stability within
an unstable branch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-23 11:51:43 +00:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser c134d74fda libxc: Wrapper functions for cpu online/offline
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
2008-09-22 16:10:25 +01:00
Keir Fraser 7e4196ee73 libxc: Use vpath rather than VPATH, to avoid linking with hypervisor .o files.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-06-09 13:25:35 +01:00
Keir Fraser 8543c562dd stubdom: complete libxc support
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-05-23 09:35:23 +01:00
Keir Fraser 2950bd57c1 Provide Px statistic data to user through libxc
Sampling and collecting dynamic Px statistic data, including
Px state value, Px count, Px residency time, Px transition
matrix, etc. Provide Px statistic data to user through libxc.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
2008-05-16 09:37:19 +01:00
Keir Fraser 1aa3c54a31 Remove defunct powerpc port.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-05-08 13:40:40 +01:00
Keir Fraser 5f14a87ceb x86, hvm: Guest CPUID configuration.
CPUID's replies are now pre-calculated in libxc and given to the
hypervisor via a new domctl.

There are two parts to this feature:
   - We can overwrite cpuid's replies.
   - We can check that a vm is compatible with a host's processor.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-04-25 13:44:45 +01:00
Keir Fraser f3bf1dc168 x86: Support loading Linux bzImage v2.08 and up.
The latest -mm kernel (2.6.25-rc3-mm1) contains v2.08 of the Linux
bzImage format which embeds an ELF file in place of the raw payload
allowing it to be extracted and used by the Xen domain builder.

It is expected that this functionality will be put forward for 2.6.26.

Signed-off-by : Ian Campbell <ijc@hellion.org.uk>
2008-04-01 10:09:33 +01:00
Keir Fraser 6e30359431 Make stubdom/Makefile override XEN_OS to MiniOS, and add
config/MiniOS.mk. Add PTHREAD_LIBS to configs (usually holding
-lpthread).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-12 15:03:07 +00:00
Keir Fraser 0243b256d6 Add stubdomain support. See stubdom/README for usage details.
- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
  arch_limits.h so as to permit getting them from there without
  pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
  library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
  disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
  tpm and other details.  A few hacks are needed:
  - Align ide and scsi buffers at least on sector size to permit
  direct transmission to the block backend. While we are at it, just
  page-align it to possibly save a segment. Also, limit the scsi
  buffer size because of limitations of the block paravirtualization
  protocol.
  - Allocate big tables dynamically rather that letting them go to
  bss: when Mini-OS gets installed in memory, bss is not lazily
  allocated, and doing so during Mini-OS is unnecessarily trick while
  we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
  Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-02-12 14:35:39 +00:00
Keir Fraser aa0833890b libxc: Push parallel build of libraries down to a new phony target, as
'build' is already loaded with library dependencies on ia64.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-01-27 17:03:35 +00:00
Keir Fraser 9f602ddea9 libxc: Remove duplicate zlib check.
It is already checked in tools/check/check_zlib.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:53:56 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
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>
2008-01-26 10:38:44 +00:00
Keir Fraser 111eac9793 Use VPATH instead of symlinks for libelf inclusion into libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:15:38 +00:00
Keir Fraser 2faf0fc95c Add INCLUDEDIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:30:21 +00:00
Keir Fraser c8107e1564 Apply PREFIX directly to LIBDIR.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:29:11 +00:00
Keir Fraser 891143e321 tools: Some fixes for 'make clean'.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
2007-12-14 10:16:52 +00:00
Keir Fraser af3ade42b9 Revert 16560:822d4ec5cfb1.
Preference seems to be to update library versions only when the ABI
changes. Only libxenctrl/libxenguest have their version number changed
to 3.2.0, as a reminder that they change on pretty much every major
release.

libfsimage/libxenstore/libblktap have not changed substantially
recently, hence the ABI has not changed, and version number stays the
same as in Xen 3.1 (and before).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2007-12-08 17:32:01 +00:00
Keir Fraser 7f9e1cf31e tools: Rationalise library soname versions.
* Arrange for the sonames of libxenstore, libxc, libfsimage and
   libblktap to be set from a single place in Config.mk.
 * Bumps the soname major version number to 3.2 in preparation for
   3.2 rc1 after which we do not expect to have ABI changes.

I have not done anything about libaio and libflask.  The former is
imported from elsewhere and if we're lucky will have sane versioning
upstream.

libflask has a very small interface and I'm hoping that the XSM
authors have been keeping some ABI discipline.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2007-12-07 14:44:13 +00:00
Keir Fraser 32ba0b79ea libxc: Interface has changed a bit since Xen 3.1, so bump the major
number.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2007-12-06 15:36:07 +00:00
Keir Fraser cefbbff3f5 tools: Remove bogus external uses of xc_private.h. Clean up libflask.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-18 15:12:03 +01:00
Keir Fraser 3a0667d17e libxc: NetBSD-specific pieces.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 13:45:57 +01:00
Keir Fraser 43aa5ed8c0 Specify -fno-strict-aliasing in root build config file.
Fixes correctness issues with xenstored and gcc-4.2.

Original patch by Charles Coffing <ccoffing@novell.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-07 10:31:15 +01:00
Tim Deegan d11bec8a19 [HVM] Save/restore: merge xc_linux_save and xc_hvm_save
into xc_domain_save, like we did for xc_domain_restore
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>

--HG--
rename : tools/libxc/xc_linux_save.c => tools/libxc/xc_domain_save.c
2007-04-11 14:45:14 +01:00
Tim Deegan 538a65bcc3 [HVM] Save/restore: merge xc_linux_restore and xc_hvm_restore
into one function (and one file) since they share a lot of code
Signed-off-by: Tim Deegan <Tim.Deegan@øensource.com>

--HG--
rename : tools/libxc/xc_linux_restore.c => tools/libxc/xc_domain_restore.c
2007-04-05 15:11:22 +01:00
Hollis Blanchard 001e8c5cd8 Merge with xen-unstable.hg.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2007-03-21 18:08:31 -05:00
Hollis Blanchard a7706a8de0 [LIBXC][POWERPC] Use new domain builder.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2007-03-21 17:03:00 -05:00
Hollis Blanchard 06aaae8408 [LIBXC] Move domain builder hooks into arch-specific files and remove ifdefs.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2007-03-21 17:02:59 -05:00