Commit Graph
96 Commits
Author SHA1 Message Date
Keir Fraser 3e2ea003c4 libxc: Fix the build with some versions of gcc.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-31 16:52:36 +01:00
Keir Fraser 7aeca46425 libxc: User-space grant table device.
Changes to libxc to enable easy access to the grant table device.

Signed-off-by: Derek Murray <Derek.Murray@cl.cam.ac.uk>
2007-03-31 14:03:17 +01:00
kfraser@localhost.localdomain e1bc13a960 xm: New command 'debug-keys' to inject debug-key events into Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-03-09 11:11:59 +00:00
Ewan Mellor 45e2bb215f Fix duplicate consts around xc_error declarations.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2007-03-08 22:33:47 +00:00
kfraser@localhost.localdomain e5d4e1285c Let xend choose to do hard or soft domain resumption depending on
whether the domain advertises support for soft resumption in its
elfnotes.

Signed-off-by: Brendan Cully <brendan@kublai.com>
2007-02-28 09:39:03 +00:00
Keir Fraser e3ce7ff90f Xen coredump format: ELF formatified with note section.
added PFN-GMFN table for non-auto translated physmap
added PFN table for auto translated physmap.
HVM domain support.
IA64 support

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

Use the guest's own p2m table instead of xc_get_pfn_list(), which
cannot handle PFNs with no MFN.
Dump a zeroed page for PFNs with no MFN.
Clearly deprecate xc_get_pfn_list().
Do not include a P2M table with HVM domains.
Refuse to dump HVM until we can map its pages with PFNs.

Signed-off-by: John Levon <john.levon@sun.com>
2007-02-24 14:31:42 +00:00
Keir Fraser da97fcd329 Support new xm command: xm trigger <Domain> <nmi|reset|init> [<VCPU>]
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
2007-02-24 14:10:27 +00:00
Tim Deegan 782821bcb0 [HVM] Save/restore: clean up the new hypercall interface
Pass a buffer and size through instead of fixed-size structure.

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-01-31 17:22:00 +00:00
Emmanuel Ackaouy 8db57dddd1 Add more xc_error_code values.
XC_INVALID_PARAM
  such as asking for features unsupported by either xen or guest kernel.
XC_OUT_OF_MEMORY
  no comment ;)

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/libxc/xc_private.c |    4 ++++
 tools/libxc/xenctrl.h    |    2 ++
 2 files changed, 6 insertions(+)
2007-01-25 22:16:52 +00:00
kfraser@localhost.localdomain 46c01e0595 Make domctl/sysctl interfaces 32-/64-bit invariant.
This kills off a fair amount of unpleasant CONFIG_COMPAT shimming and
avoids needing to keep the compat paths in sync as these interfaces
continue to develop.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-24 16:33:19 +00:00
kfraser@localhost.localdomain 4b3b0d5ce5 [LIBXC] Refactor xc_domain_resume() into its own source file.
The idea is that this file is where we will have two implementations
of 'suspend cancellation': one which the guest is aware of (and is
faster) and the other which does more work to avoid requiring guest
modifications.

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-19 18:32:28 +00:00
kfraser@localhost.localdomain 115209d91b [XEN] New event-channel reset operation.
Plumbed through libxenctrl to python.

From: Andrei Petrov <andrei.petrov@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-19 17:20:57 +00:00
kfraser@localhost.localdomain e105919b01 Add resumedomain domctl to resume a domain after checkpoint.
Export resumedomain domctl to libxc, xend.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2007-01-19 15:23:41 +00:00
Tim Deegan 294b0bdd8b [HVM] save restore: new hyper-call
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>

add a pair of hyper-call for hvm guest context
2007-01-18 16:48:04 +00:00
kfraser@localhost.localdomain 15e8ea54ac [TOOLS] Fix the build. Clearly demarcate PPC-specific stuff.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-13 10:23:53 +00:00
Hollis Blanchard 8cadd348b3 [POWERPC] Merge with xen-unstable.hg.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:58:42 -06:00
Hollis Blanchard bdd61e7052 [POWERPC] Merge in outstanding changes from xenppc-unstable.hg.
It's a long story, but basically a small divergence in xenppc-unstable meant a
large number of changesets couldn't be directly imported to xen-unstable, so
this changeset includes all of them.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-12-12 09:56:06 -06:00
kfraser@localhost.localdomain 43ff8f0aef [XEN] Implement XENMEM_set_memory_map, which specifies memory map to
be returned by XENMEM_memory_map. Hook this into the domain builder.

Based on a patch by Glauber de Oliveira Costa <gcosta@redhat.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-08 11:30:30 +00:00
kfraser@localhost.localdomain b07ced9c1f [LIBXC] Add an error reporting API to the libxc library.
- An 'xc_error' struct is used to pass around error
   details. Currently contains two members 'code' an enumeration of
   error types, and 'message' a free text description of the specific
   problem.

 - The xc_get_last_error() method returns a const pointer to the
   internal instance of this struct manged by libxc. By returning a
   const pointer we can add extra members to the end of the struct at
   any time without worrying about ABI of callers. This will let us
   provide more fine-grained info if needed in the future.

 - The xc_error instance is statically defined inside libxc and marked
   __thread. This ensures that errors are recorded per-thread, and
   that when dealing with errors we never need to call malloc - all
   storage needed is statically allocated.

 - The xc_clear_last_error() method resets any currently recorded
   error details

 - The xc_error_code_to_desc() method converts the integer error code
   into a generic user facing messsage. eg "Invalid kernel". Together
   with the 'message' field from xc_error, this provides the user
   visible feedback. eg "Invalid kernel: Non PAE-kernel on PAE host."

 - A callback can be registered with xc_set_error_handler to receive
   notification whenever an error is recorded, rather than querying
   for error details after the fact with xc_get_last_error

 - If built with -DDEBUG set, a default error handler will be
   registered which calls fprintf(stderr), thus maintaining current
   behaviour of logging errors to stderr during developer builds.

 - The python binding for libxc is updated to use xc_get_last_error
   to pull out error details whenever appropriate, instead of
   returning info based on 'errno'

 - The xc_set_error method is private to libxc internals, and is used
   for setting error details

 - The ERROR and PERROR macros have been updated to call xc_set_error
   automatically specifying XC_INTERNAL_ERROR as the error code. This
   gives a generic error report for all current failure points

 - Some uses of the ERROR macro have been replaced with explicit
   calls to xc_set_error to enable finer grained error reporting. In
   particular the code dealing with invalid kernel types uses this
   to report about PAE/architecture/wordsize mismatches

The patch has been tested by calling xm create against a varietry of
config files defining invalid kernels of various kinds. It has also
been tested with libvirt talking to xend. In both cases the error
messages were propagated all the way back up the stack.

There is only one place where I need to do further work. The suspend
& restore APIs in Xend invoke external helper programs rather than
calling libxc directly. This means that error details are essentially
lost. Since there is already code in XenD which scans STDERR from
these programs I will investigate adapting this to extract actual
error messages from these helpers.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2006-12-07 11:36:26 +00:00
kfraser@localhost.localdomain fcad36eb80 [LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
Add a comment clarifying how this function differs from
xc_evtchn_alloc_unbound().
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-01 14:25:36 +00:00
kfraser@localhost.localdomain b63e5446b8 [XEN] Cleanups to phys/mach address handling.
1. Balloon driver does not need to set M2P entry.
    This is done by the populate_physmap hypercall.

 2. Xen now translates foreign mappings from GMFN->MFN.
    Tools are simplified because of this.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-27 14:20:44 +00:00
kfraser@localhost.localdomain d46c9ce0d7 [HVM] Reworked interrupt distribution logic.
TODO:
 1. Fix IO-APIC ID to not conflict with LAPIC IDS.
 2. Fix i8259 device model (seems to work already though!).
 3. Add INTSRC overrides in MPBIOS and ACPI tables so
    that PCI legacy IRQ routing always ends up at an
    IO-APIC input with level trigger. Restricting link
    routing to {5,6,10,11} and setting overrides for all
    four of those would work.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-21 19:22:25 +00:00
kfraser@localhost.localdomain cc60b785f6 [LIBXC] Replace API uses of size_t with ulong.
Avoids possibility of different FILE_OFFSET_BITS defn.
across the interface.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-17 14:00:45 +00:00
kfraser@localhost.localdomain 25f5b0ff15 [HVM] Replace shared-memory PIC state with a set-irq-level hypercall.
This simplifies the IRQ logic significantly and avoids the bogus
hvm_pic_assist() on domain resume path.

There is more work to be done here. At least:
 1. set-irq-level should really be set-interrupt-wire-level. Wire
    state needs to be distinguished from PIC (in particular, PIC IRR)
    state.
 2. Hypercalls can be batched in qemu and pushed down in one
    multicall.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-07 13:13:52 +00:00
kfraser@localhost.localdomain 39b46b711f [BLKTAP] ia64 support
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2006-11-07 11:17:39 +00:00
kfraser@localhost.localdomain 457ee10d4c [XEN] Remove VGCF_hvm_guest, replace with XEN_DOMINF_hvm_guest.
Rename DOMFLAGS_* to XEN_DOMINF_*.
Clean up tools to deal with flags changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-03 10:52:29 +00:00
kfraser@localhost.localdomain 3f4c0e0087 [HVM] HVM is now a flag parameter to domain-creation hypercall.
This cleans up HVM start-of-day in Xen and means that the
HVM status of a domain is maintained from cradle to grave.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-01 16:08:19 +00:00
awilliam@xenbuild.aw 6d58273da8 [LIBXC][IA64] fix build warning
With warnings becoming errors, this fixes the libxc build on ia64

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-10-25 15:29:00 -06:00
kfraser@localhost.localdomain 68666c06e8 xc core structures are not Linux specific.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-18 11:38:59 +01:00
kfraser@localhost.localdomain 2373f1b10e Remove non-existent xc_ptrace_core() from xenctrl.h.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-17 18:00:51 +01:00
kfraser@localhost.localdomain c0fd920e98 [SOLARIS] Don't build ptrace code on Solaris.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-17 17:59:32 +01:00
kfraser@localhost.localdomain ada55182d2 [LINUX] Make evtchn device use a dynamic minor number.
Also update the code in tools to create the device node if udev fails.
The tools now read the sysfs system to find the minor number needed.

Original patch from  Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-09-29 14:20:52 +01:00
kaf24@firebug.cl.cam.ac.uk 39cda1cf3f [TOOLS] xenctrl.h defines __XEN_TOOLS__ if it's not already.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-31 18:54:50 +01:00
kfraser@localhost.localdomain 1df421476a Replace dom0_ops hypercall with three new hypercalls:
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>
2006-08-25 18:39:10 +01:00
kfraser@localhost.localdomain db51cd09d3 Remove all traces of the obsolete BVT scheduler.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 17:14:38 +01:00
kfraser@localhost.localdomain ae95fdf65a [TOOLS] Remove the 'cpuperf' misc tool. Xenoprof is the
correct tool to use for hardware perfctr monitoring now.
Also remove unused xc_msr MSR accessor functions from libxenctrl.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-23 15:02:55 +01:00
tdeegan@york.uk.xensource.com 49f7c7364e Replace shadow pagetable code with shadow2. 2006-08-16 17:02:35 +01:00
kfraser@localhost.localdomain b76fbc3cc5 [LIBXC] Remove unused xc_evtchn_status().
Signed-off-by: John Levon <john.levon@sun.com>
2006-08-14 16:39:35 +01:00
kaf24@firebug.cl.cam.ac.uk a6e8b7effa Change DOM0_PERFCCONTROL: remove array limit.
Descriptors and values are passed by two distinct buffers.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
2006-08-07 15:53:06 +01:00
awilliam@xenbuild.aw 31423d8a91 merge with xen-unstable.hg 2006-07-25 12:19:05 -06:00
kaf24@firebug.cl.cam.ac.uk 7eb542e462 [powerpc] add PowerPC support to libxc
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-07-14 10:37:12 +01:00
awilliam@xenbuild.aw feb1dc3116 [IA64] Creates tools/libxc/ia64 directory.
Split and move xc_ia64_stubs.c into ia64/xc_ia64_hvm_build.c and
ia64/xc_ia64_stubs.c
Creates ia64/Makefile.
Clean up (static in const) in xc_ia64_hvm_build.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
[whitespace cleanups in new files]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
2006-07-11 11:29:25 -06:00
kaf24@firebug.cl.cam.ac.uk 42fae7ae02 [XEN] localtime support for paravirtualized guests
It is quite minimal
in its approach, satisfying the purposes of the paravirtualized
NetWare operating system as well as any others that expect the time
base to be provided in localtime.

Signed-off-by: Bruce Rogers <brogers@novell.com>
2006-06-21 17:09:14 +01:00
kaf24@firebug.cl.cam.ac.uk 76f880fe7d [TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.
No longer open the device as non-blocking: all reads immediately follow
a select() on the device indicating it's ready to read.

Signed-off-by: John Levon <john.levon@sun.com>
2006-06-15 13:11:31 +01:00
kaf24@firebug.cl.cam.ac.uk ab8096f27d Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-06-06 09:48:17 +01:00
kaf24@firebug.cl.cam.ac.uk ad2de84676 Create new vmassist type 'pae_extended_cr3'. Only advertise
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>
2006-06-05 10:42:40 +01:00
kaf24@firebug.cl.cam.ac.uk 3903e920a1 Rename csched -> sched_credit/sched-credit in control plane.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-27 10:13:27 +01:00
kaf24@firebug.cl.cam.ac.uk c263397874 [PAE] Allow pgdirs above 4GB for paravirt guests.
**NOTE**: This obviates the need for lowmem_emergency_pool.
Unpriv guests no longer need to be able to allocate memory
below 4GB for PAE PDPTs.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-05-26 17:22:30 +01:00
ack@kneesa.uk.xensource.com 46ecd27056 New weighted fair-share CPU scheduler w/ automatic SMP load balancing
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2006-05-26 11:14:36 +01:00
kaf24@firebug.cl.cam.ac.uk 630ad4e0ad [ACM] Replace the union structure parameter of the ACM hypercalls
with command-specific request structures. It aligns the ACM
hypercalls with the way parameters are passed in the event channel
hypercalls.

Advantages include backward-compatibility regarding old guests when
new calls are added and clarity of the code.

Signed-off by: Reiner Sailer <sailer@us.ibm.com>
2006-05-21 19:05:31 +01:00