Commit Graph
41 Commits
Author SHA1 Message Date
kaf24@firebug.cl.cam.ac.uk 8a68ed87f8 The existing xc_domain_dumpcore is very specific to disk/file based
output.  Refactor the code slightly to allow more user-specified
control.  This is done by adding a parallel
xc_domain_dumpcore_via_callback, which allows the specification of a
callback routine and an opaque argument block.  The existing dumpcore
routine is modified to use the callback for all write operations and
to turn the single seek into a small write (it's for page alignment).

Signed-off-by: Ben Thomas <bthomas@virtualiron.com>
2006-03-13 11:47:56 +01:00
kaf24@firebug.cl.cam.ac.uk d2017c7b16 Clean up internal libxc functions to take 'const char *'
parameters where possible, to avoid unnecessary casts.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-09 14:35:36 +01:00
kaf24@firebug.cl.cam.ac.uk 9603c69e65 libxc: Verify Magic number when reading dump
The xen core files record a magic number, 
but when they are loaded it isn't checked.
This patch resolves this.

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-06 15:04:18 +01:00
kaf24@firebug.cl.cam.ac.uk e265d47bd6 Consolidate xc_ptrace and xc_ptrace_core
* xc_ptrace
  - Merge xc_ptrace_core into xc_ptrace
  - ATTACH now reads the data argument. If non-zero then
    a corefile is being debuged. Otherwise a thread has
    been attached to. This allows xc_waitdomain_core() or
    xc_waitdomain() to be called as appropriate in
    subsequent xc_ptrace() calls.
* xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace.c version) __xc_waitdomain
  - Rename xc_waitdomain (xc_ptrace_core.c version) xc_waitdomain_core
  - Create xc_waitdomain (in xc_ptrace.c), a wrapper for __xc_waitdomain
    and xc_waitdomain_core.
  Consolidation seemed difficult but ctxt needs to be
  passed into xc_waitdomain_core or made global.
  Alternatively, xc_waitdomain_core could be moved into xc_ptrace.c,
  but this seems messy.
* map_domain_va
  - Rename map_domain_va (xc_ptrace_core.c version) map_domain_va_core
  - Have it accept ctxt, like xc_waitdomain_core
* myptrace and myxcwait (linux-xen-low.c)
  Removed, call the now generic xc_ptrace() and xc_waitdomain() instead

When calling xc_ptrace ATTACH, if a corefile is in use, a fd will
be passed, otherwise a pid. The fd part is important, as this
is saved internally in xc_ptrace_core.c, and passed to xc_waitdomain_core()
as neccessary. Pereviously xc_waitdomain_core() received a pid and
thus could not open the corefile.

Signed-Off-By: Horms <horms@verge.net.au>
2006-03-06 12:06:55 +01:00
kaf24@firebug.cl.cam.ac.uk a582b2638b New memory_op subcall XENMEM_translate_gpfn_list.
Allows translation from GPFNs to MFNs for an auto-translated
guest.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-16 18:52:06 +01:00
kaf24@firebug.cl.cam.ac.uk b2572e0698 Fix some more pfn/mfn/gmfn/gpfn inconsistencies. Fix some direct
uses of max_page variable to use the mfn_valid() predicate.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-02-02 12:18:28 +01:00
kaf24@firebug.cl.cam.ac.uk 912d32ab97 Replace the MMUEXTOP 'pfn hole' commands with a new
arch-specific XENMEM_ operation.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-28 15:31:43 +01:00
sos22@douglas.cl.cam.ac.uk 5f97716503 Create a block of reserved PFNs in shadow translate mode guests, and
move the shared info and grant table pfns into that block.  This
allows us to remove the get_gnttablist dom0 op, and simplifies the
domain creation code slightly.  Having the reserved block managed by
Xen may also make it slightly easier to handle the case where the
grant table needs to be extended at run time.

Suggested-by: kaf24
Signed-off-by: Steven Smith, sos22@cam.ac.uk
2006-01-26 19:40:13 +01:00
kaf24@firebug.cl.cam.ac.uk 0e6b53535f Remove unneeded /proc/xen/grant and its libxc wrapper.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-26 00:17:06 +01:00
kaf24@firebug.cl.cam.ac.uk 5becda0913 Fix a couple of bogus dom0_op names:
setdomaininfo -> setvcpucontext
  pincpudomain  -> setvcpuaffinity

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-01-06 12:53:19 +01:00
kaf24@firebug.cl.cam.ac.uk 7e127cd35f Allow non-privileged domains restricted access to
I/O memory and physical interrupts, under control
of domain0. Capabilities are maintained as rangesets
in Xen.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-12-31 14:15:22 +01:00
Ian.Campbell@xensource.com 40924689a9 Add support to xenctx for printing stack traces on x86_32 and x86_64.
To support this add xc_translate_foreign_address to libxc. This function
walks page tables and translates virtual addresses using a given domain
and vcpu page table.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
2005-12-22 14:33:19 +00:00
kaf24@firebug.cl.cam.ac.uk 1f5fb04e43 Add MP debug support to gdbserver.
Signed-off-by: Kip Macy <kip.macy@gmail.com>
2005-12-15 21:02:21 +01:00
kaf24@firebug.cl.cam.ac.uk 96428d33d9 Define explicit evtchn_port_t type (32 bits) and plumb up
to user space thru /dev/xen/evtchn.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-12-01 15:22:22 +01:00
kaf24@firebug.cl.cam.ac.uk ba3f55e57a GNTTABOP_map_grant_ref returns error status and handle as
separate fields. Update callers for new interface. Also
use int16_t as standard error code type on all public
interfaces.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-30 17:24:27 +01:00
kaf24@firebug.cl.cam.ac.uk 26ed038491 Clean up xenstore/console shared page initialisation, which is
now handled solely by the domain builder.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:36:42 +01:00
kaf24@firebug.cl.cam.ac.uk 3947efa1c2 Revert accidentally applied changes from changeset
7783:5aad7e145e501fbfb346954950a33b042a963633.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-14 11:35:50 +01:00
kaf24@firebug.cl.cam.ac.uk e7b975b0b6 If /sbin/ isn't in the path, udev rules will erroneously not get
installed.

Signed-off-by: Nivedita Singhvi <niv@us.ibm.com>
2005-11-14 11:05:34 +01:00
smh22@firebug.cl.cam.ac.uk 7962b47d8b Enable save/restore for PAE domains.
This includes quite a few cleanups / refactoring of the old code, some
of which is intended to prepare for 64-bit save/restore. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-08 18:42:07 +01:00
kaf24@firebug.cl.cam.ac.uk 41df4047b1 Added xc_domain_ioport_permission to libxc, which wraps the dom0 op
Signed-off-by: Jody Belka <knew (at) pimb (dot) org>
2005-11-06 16:39:55 +01:00
kaf24@firebug.cl.cam.ac.uk 2442eccf6d Sanitise the trace-buffer hypervisor<->user interface.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-31 10:45:31 +01:00
kaf24@firebug.cl.cam.ac.uk f6556b0d17 This is a set of changes which allow the tracebuffer functionality to
be enabled and disabled dynamically while the system is running. The
existing DOM0_TBUFCONTROL hypercall is used, and three new operations
have been added: enable, disable, and set_size. This is to address
concerns that use of the trace buffers impacts system performance.

The initial value of opt_tbuf_size is set to zero, so that trace
buffers remain disabled by default. They can be enabled as they used
to be, by adding tbuf_size= to the xen command line at boot time. They
can also be turned on and off any time when the system is running. The
size of the trace buffer allocation can also be changed dynamically
while the system is running. The trace buffers may be completely
deallocated by setting the size to zero. No change in buffer size can
be done while tracing is enabled;

Other Changes made:
 - Update the constants in tools/xentrace/formats to match those in 
public/trace.h
 - libxc functions for enable/disable, get/set size
Still left to do:
 - remove all ifdef's for trace buffers and the 'trace' build option
 - xm command to do enable/disable trace buffers and get/set size
 
Signed-off-by: Rob Gardner  <rob.gardner@hp.com>
2005-10-30 22:31:45 +01:00
djm@kirby.fc.hp.com 8620f56614 Necessary change to support ia64/vti domain build in common code.
Signed-off-by Ke Yu <ke.yu@intel.com>
Signed-off-by Anthony Xu <anthony.xu@intel.com>
Signed-off-by Kevin Tian <kevin.tian@intel.com>
2005-10-24 20:57:47 -06:00
emellor@leeni.uk.xensource.com 706fcdf4de Have xenstored initialise its connections, meaning that xend can be out of
that loop completely -- the xc_init_store, initDomainStore calls can all go.

Have xenstored understand where the local domain information goes.  Xend no
longer has to generate a path and pass it to xenstored through
xs_introduce_domain -- we just allow xenstored to generate the path, and then
call GetDomainPath later.  There is still some work required to tidy this up.

Change the uuid module to generate uuids as lists of bytes, not in the
stringified form.  Added a unit test for that module.

Change the semantics of Xend restart, relying on these changes to the
xenstored semantics and earlier changes to add an opaque handle to the
hypervisor's domain-specific data block.  The semantics are now clearer, as
Xend can validate whether the details in the store match the current live
domain.

Added a usage statement to xenstored.

Some of this code is by Steven Hand.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-17 16:22:05 +01:00
kaf24@firebug.cl.cam.ac.uk 981d9b117d Plumb GETVCPUINFO dom0_op through to Python. Remove
n_vcpu field from GETDOMAININFO: replaced with
nr_online_vcpus and max_vcpu_id (both plumbed through to
Python).

TODO: Remove 'vcpus' entry in getdomaininfo Python
      dictionary.

TODO: Don't represent 'cpumap' as a bitmap in Python.
      It would be more sensible to represent as a list
      of integer CPU numbers.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-17 11:36:36 +01:00
kaf24@firebug.cl.cam.ac.uk 349d3745d3 In addition to setting opaque handle during domain
creation, allow it to be changed after creation via
DOM0_SETDOMAINHANDLE operation (and libxc
xc_domain_sethandle, and via Pyhton wrapper fn).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 16:01:11 +01:00
kaf24@firebug.cl.cam.ac.uk 30ce2a9295 Store an opaque handle (tools uuid) in the domain structure
within Xen. Refactor GETVCPUCONTEXT into an op of the same
name plus a new op GETVCPUINFO. Move the cpumap and cpu info
arrays from GETDOMAININFO and move into new GETVCPUINFO.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-14 15:40:48 +01:00
kaf24@firebug.cl.cam.ac.uk 523636b3b7 New dom0_op to set max vcpus for a domain.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 16:34:49 +01:00
kaf24@firebug.cl.cam.ac.uk d8263e8dba Fix Xen public interfaces and the tools to consistently
use stdint-format bitsize types (uint32_t and friends).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-12 11:07:37 +01:00
kaf24@firebug.cl.cam.ac.uk 07a233ac7c User tools send evtchn notifications via /dev/xen/evtchn
rather than using hypercall directly.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-06 17:02:38 +01:00
kaf24@firebug.cl.cam.ac.uk 0f742e92ea EVTCHNOP_alloc_unbound can allocate a port in an arbitrary
domain (only if the caller is sufficiently privileged).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-05 19:14:13 +01:00
kaf24@firebug.cl.cam.ac.uk 1872f40d78 Clean up sched_op() hypercall interface. One particular
change to watch out for is that the suspend record, on
save/restore, is now passed via register %edx not %esi
(both i386 and x86/64).

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-04 15:34:02 +01:00
kaf24@firebug.cl.cam.ac.uk b54b5b2b14 Fix xc_ptrace (live debug, not coredump debug) for 32-bit pae.
Clean up interfaces and add simple documentation for using
the domU debug interfaces.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-19 15:21:09 +00:00
djm@kirby.fc.hp.com 13bad8113d Catchup with xen-unstable, add ia64 specifics to tools, and some VTI merge
Signed-off-by Kevin Tian <Kevin.tian@intel.com>
2005-09-13 13:42:33 -06:00
iap10@freefall.cl.cam.ac.uk cab0ef71c3 Improved "PGDs must be under 4GB" handling for PAE.
Signed-off-by: ian@xensource.com
2005-09-08 17:36:23 +00:00
iap10@freefall.cl.cam.ac.uk 8b1b30d3cb Give each domain some memory below 4GB. This solves the "PGD's must be below 4GB" for the initial page tables. I'm not sure we'll stick with this approach, but this is good enough for the time being.
PAE should be a *lot* more robust on systems that actually have more than 4GB thanks to all the various patches that went in today. I find it astounding that it ever appeared to work at all!

Signed-off-by: ian@xensource.com
2005-09-08 01:07:15 +00:00
iap10@freefall.cl.cam.ac.uk 558b5c7a89 More tools PAE fixes to avoid loosing high-order pte bits.
Signed-off-by: ian@xensource.com
2005-09-07 23:11:44 +00:00
vh249@arcadians.cl.cam.ac.uk 251e6d181b extends xm info with xen version and various others information.
exports version hypercall to userspace

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-08-31 10:39:53 +00:00
kaf24@firebug.cl.cam.ac.uk e4dfe0cdba Replace dom_mem_op hypercall with memory_op hypercall with
better interface. Fix "mem=" parameter on x86/64 boot.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-08-30 11:53:47 +00:00
cl349@firebug.cl.cam.ac.uk acc63faffa Break the building/save/restore code out into a separate library libxenguest.
Also update the tools accordingly.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-25 00:51:20 +00:00
cl349@firebug.cl.cam.ac.uk 60eb663513 Rename libxc => libxenctrl and xc.h => xen/xenctrl.h
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>


--HG--
rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
2005-08-24 23:07:29 +00:00