Commit Graph
113 Commits
Author SHA1 Message Date
Ian Campbell 6993e9f5ce # HG changeset patch
# 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>
2010-08-24 18:42:59 +01:00
Ian Jackson ddf97d4db8 libxc: Fix ia64 build for interface change
This patch fixes ia64 by the following method:
- rename xc_handle xch
- rename guest_xc xch
- add xc_interface *xch to arguments of some functions
- replace xc_dom_printf with macros
- Add *xch argument to corresponding x86 functions [iwj]

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-06-25 15:43:50 +01:00
Keir Fraser 20ad53b196 ia64: Fix xc_save error reporting
This is the patch for error reporting on ia64 that has a special
handling in comparison with i386/x86_64 platforms. This is pretty
straight-forward just to fail on "cannot map mfn page" message instead
of continue since the memory is not being correctly mapped using the
xc_map_foreign_range() function.

From: Michal Novotny <minovotn@redhat.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-06-18 14:08:57 +01:00
Keir Fraser a2b5973ee0 libxc: remove \n from strings passed to PERROR
Previously, the code was inconsistent: some calls to PERROR passed \n
and some did not.  With the new logging arrangements, passing \n is
definitely incorrect.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2010-05-28 09:38:18 +01:00
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
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>
2010-05-28 09:30:19 +01:00
Keir Fraser 22af01be29 [IA64] Remus: ia64 counter part of 07f6d9047af4
This patch adds callbacks to xc_domain_save().

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
2009-11-23 07:06:10 +00:00
Keir Fraser 0c98ffd10a Fix some issues for HVM log dirty:
* Add necessary logging dirty in qemu to avoid guest error with
intensive disk access when live migration
* Take place of shared memory between qemu and migration tools by new
added hypercall, which is clean and simple

Signed-Off-By: Zhai, Edwin <edwin.zhai@intel.com>
2009-09-07 08:37:58 +01:00
Keir Fraser fb442e2171 x86_64: allow more vCPU-s per guest
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>
2009-06-18 10:14:16 +01:00
Keir Fraser b0a6b12293 [IA64] adjust ia64 xc_domain_restore() signature
This patch fixes the following error.
ia64/xc_ia64_linux_restore.c:546: error: conflicting types for
xc_domain_restore
./xenguest.h:49: error: previous declaration of xc_domain_restore was
here
make[4]: *** [ia64/xc_ia64_linux_restore.o] Error 1

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-27 12:00:51 +01:00
Isaku Yamahata 7e9a3beb1e [IA64] ia64 counter part of 5b44cfde9666.
This patch defines ia64 xc_hvm_build_target_mem() which
is referenced by xc.c.
Without this patch, xend doesn't boot complaining
that symbol, xc_hvm_build_target_mem, is missing.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-01-07 14:27:03 +09:00
Isaku Yamahata 658c654a05 [IA64] paravirtualize itc and support save/restore.
ia64 linux 2.6.18 only use ar.itc for local ticks so that
ar.itc didn't need paravirtualization and it can be work arounded
when save/restore.
However recent ia64 linux uses ar.itc for sched_clock() and
CONFIG_VIRT_CPU_ACCOUNTING and other issues. So ar.itc needs
paravirtualization. Although Most part is done in guest OS,
save/restore needs hypervisor support.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-01-05 12:24:58 +09:00
Isaku Yamahata 8b44bc08a3 [IA64] libxc: make xc_ia64_copy_memmap use DOM0VP_get_memmap.
Guest domain's memory map may be updated concurrently so that
it is protected sequence lock.
This patch makes xc_ia64_copy_memmap() use DOM0VP_get_memmap
hypercall to avoid the race.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-03 12:50:28 +09:00
Isaku Yamahata 0296f1839a [IA64] libxc clean up.
remove code duplication between xc_ia64_linux_save.c and xc_core_ia64.c
by introducing xc_ia64_copy_memmap().
Later xc_ia64_copy_memmap() will be enhanced.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-02 17:27:57 +09:00
Isaku Yamahata 0072510b97 [IA64] xc restore: fix domain restore.
Fix domain restore of version one format.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-02 17:27:57 +09:00
Isaku Yamahata ec19302761 [IA64] hvm builder: more precisely use of memory size.
So far, VGA io size is ignored and memory size which assigned to
domain is smaller than what user specified by VGA io size.
This patch take VGA io size into consideration when memory population.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-02 17:27:57 +09:00
Isaku Yamahata ae695f6725 [IA64] libxc: improve foreign p2m exposure.
make foreign p2m exposure _PAGE_IO_BIT aware for robustness.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-10-02 17:27:57 +09:00
Isaku Yamahata 9dc665723c [IA64] xc_domain_save: Do not poll-wait for guest to shutdown.
This patch is ia64 counter part of 18452:59904b180078.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-09-25 11:47:53 +09:00
Keir Fraser 112dcc7dd0 xc_save: Clean up (*suspend)() callback hook.
Sigend-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-08 11:13:03 +01:00
Isaku Yamahata 3819ac39eb merge with xen-unstable.hg 2008-07-02 11:30:37 +09:00
Keir Fraser 947835578c [IA64] compilation fix caused by 17880:d3a87899985d
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-20 12:26:23 +01:00
Keir Fraser d1318a44ad [IA64] compilation fix caused by 17814:9af7a535225f
ia64 compliation fix caused by 17814:9af7a535225f.
- generate_acpi_checksum() is replaced by acpi_tb_checksum()
- move dump_execution_state() definitions from asm-ia64/xenprocessor.h
  to asm-ia64/bug.h

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-12 15:42:09 +01:00
Isaku Yamahata d20f38afda merge with xen-unstable.hg 2008-06-19 12:46:26 +09:00
Isaku Yamahata 006dff9e04 [IA64] ia64 save/restore new formart. save part.
Introduce ia64 save/restore new formart. save part.
The formart twist is necessary for pv_ops linux support saving/restoring
all of the online vcpu context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-10 16:00:33 +09:00
Isaku Yamahata 55c5209d25 [IA64] ia64 save/restore new formart. restore part.
Introduce ia64 save/restore new formart. restore part.
The formart twist is necessary for pv_ops linux support saving/restoring
all of the online vcpu context.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2008-06-10 15:58:09 +09:00
Alex Williamson 152d0f4ee0 merge with xen-unstable.hg 2008-03-20 12:35:40 -06:00
Keir Fraser 8491525fc2 ia64: Fix ACPI header inclusion into libxc.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2008-03-18 21:05:47 +00:00
Alex Williamson d83888dbab [IA64] Remove bogus hypercall arg
privcmd_hypercall_t only has 5 args.  This causes a build failure
with gcc-4.3.  Fixes bugzilla #1186.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2008-03-10 11:55:40 -06:00
Alex Williamson 0385705bff [IA64] Initialize guest register to valid value
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
2008-03-10 11:52:25 -06:00
Alex Williamson 353849ca81 [IA64] Clear console page for sioemu
This fixes a bug: by using pfn 0 for console, the page was not cleared,
sometimes causing the domain to fail to boot.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2008-02-25 06:27:21 -07:00
Alex Williamson abb091258c [IA64] Self IO EMUlator - tools part
Signed-off-by: Tristan Gingold <tgingold@free.fr>
2008-02-19 08:12:28 -07:00
Alex Williamson e38c4f55fe merge with xen-unstable.hg 2008-02-14 09:34:27 -07:00
Alex Williamson 80e45574b2 [IA64] Cleanup in xc_ia64_linux_save.c
xc_ia64_shadow_control() is not needed any more
since xc_shadow_control() was xencommized.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-13 10:35:56 -07: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
Alex Williamson c5df471dc7 [IA64] Fix live migration
In live migration, a domain is paused and *entire* memory is copied
after pre-copy phase.
(i.e. live migration is not live)

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-07 09:19:53 -07:00
Alex Williamson 8b74529532 [IA64] Fix maximum_gpfn hypercall
HVM livemigation fails without this patch.

according to x86 side:
http://xenbits.xensource.com/xen-unstable.hg?rev/55d0a5c70986

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
2008-02-05 09:36:48 -07:00
Alex Williamson 0c19c89bc0 [IA64] Remove is_vti arch flag
arch.is_vti is a duplicate of is_hvm.

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-12-14 12:53:03 -07:00
Alex Williamson 1ea2ab2fe8 [IA64] Implement guest_os_type for ia64
This makes use of the domain config option guest_os_type for
ia64 and removes the backing for the previous ACPI based
mechanism used previously.  A user wanting optimal performance
for a specific type of OS guest running in an HVM domain should
make use of this new option.  See updated xmexmaple.vti for
available options.  All supported OSes should always work using
the default option or leaving the option unspecified.  Originally
based on patch from Zhang Xin.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2007-11-29 12:15:43 -07:00
Alex Williamson 8d604f8b23 [IA64] vcpu_setcontext: only set cr_irr if VGCF_SET_CR_IRR flag is set.
cr_irr can be modified even when a vcpu is blocked (by itv handler).
Unconditionally setting cr_irr can trouble debugger as it may clear a bit
of cr_irr and thus miss an interrupt.  This can be very annoying if the
interrupt is itv and the vcpu is inside PAL_HALT_LIGHT (the vcpu stays
blocked forever).

Signed-off-by: Tristan Gingold <tgingold@free.fr>
2007-11-28 12:32:28 -07:00
Keir Fraser c316590403 libxc: Consolidate read()/write() syscall wrappers to read/write an
exact number of bytes. The consolidated versions are more watertight
than the various versions previously distributed around the library
source code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-11-11 18:22:33 +00:00
Alex Williamson f0ed01dec3 [IA64] vti save-restore: ia64 hvm builder clean up with respect to hvm params.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-11-07 10:34:09 -07:00
Alex Williamson 44d78108bf [IA64] vti domain save/restore: libxc: implement vti domain save/restore
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-21 14:57:13 -06:00
Alex Williamson 13a6f43276 [IA64] hvm domain builder clean up. use xc_vcpu_setcontext().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-12 14:17:00 -06:00
Alex Williamson 8c580e172b [IA64] Remove duplicate xc_get/set_hvm_param() definitions
Remove duplicated xc_get/set_hvm_param definition in xc_ia64_hvm_build.c
They are also defined in xc_domain.c.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-10-12 13:50:09 -06:00
Alex Williamson 37eb10eb59 [IA64] Use xc_map_foreign_pages() in copy_from_GFW_to_nvram()
use xc_map_foreign_pages() where possible

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-10 13:56:34 -06:00
Alex Williamson e122097794 [IA64] Foreign p2m: make xc_ia64_get_pfn_list() static
Now xc_ia64_get_pfn_list() isn't used anymore.  Make it static.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:04:07 -06:00
Alex Williamson 567b053811 [IA64] Foreign p2m: rewrite save/restore with foreign p2m
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 15:36:13 -06:00
Alex Williamson 04284d57f2 [IA64] Foreign p2m: libxc side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 14:37:50 -06:00
Alex Williamson 6a9db78fbf [IA64] Foreign p2m: Fix vti domain builder.
It should set arch_domain::convmem_end.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-09-06 13:48:43 -06:00
Alex Williamson 200472a35b [IA64] Move nvram from /usr to /var
Presently nvram is stored in /usr/lib/xen/boot/nvram_<domain> next to the guest
firmware.  This violates the FHS because /usr might be mounted read-only.  This
patch moves the nvram storage to /var/lib/xen/nvram/nvram_<domain>

Also clean up:
- references to stat_buf assumed that stat() had succeeded; use access()
  instead since it's easier and doesn't require stat_buf at all
- nvram_path[PATH_MAX] instead of nvram_path[100]
- strncpy(..., strlen(src)) is meaningless, re-order length tests to work
  correctly

Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:25:37 -06:00
Alex Williamson 4634c6b2d5 [IA64] Fix parallel build; directory must exist before making symlink
Signed-off-by: Aron Griffis <aron@hp.com>
2007-08-28 12:24:27 -06:00