Commit Graph
98 Commits
Author SHA1 Message Date
kfraser@localhost.localdomain a6c89ee595 [LIBXC] Fix iteration over GDT in save/restore code.
Bug spotted by Tim Wood.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-20 10:06:33 +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 6c483f95f8 [XEN] Various selector and callback cleanups to simplify the tools
and assumptions about callback selector values on x86/32.
Original patch from Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-15 18:41:06 +00:00
kfraser@localhost.localdomain 429764f760 [LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
2006-10-25 15:25:13 +01:00
kfraser@localhost.localdomain a3fc4d842e [SOLARIS] Don't mlock() hypercall buffers.
On solaris mlock requires a page aligned address and mlock doesn't
ensure the pages won't minor page fault.

Signed-off-by: Mark Johnson <mark.johnson@sun.com>
2006-10-23 09:52:51 +01:00
kfraser@localhost.localdomain cf1aa17df0 Remove ERR() macro from libxc. Use ERROR/PERROR as appropriate.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-10-17 18:05:42 +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 121ec85fcf Clean up console fields in start_info structure. Add compat code for
older kernels so they can use the old start_info API.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-15 15:50:36 +01:00
kaf24@localhost.localdomain 3321c3c8e9 [XEN] Add a warning about changeable size of shared_info structure.
sizeof(shared_info_t) can change even in compatible hypervisor
versions.
Add a clear warning about this, and fix the few places relying on it.
In addition, add some padding to arch_shared_info, to allow future
additions to the structure without breaking known offsets of members
following it in the shared info.

Signed-off-by: John Levon <john.levon@sun.com>
2006-08-12 16:18:08 +01:00
kaf24@firebug.cl.cam.ac.uk c772fee485 [TOOLS] Fix pagetable-pinning loop in xc_linux_restore.
Previously it would not pin last PFN in physmap even if it was
a pagetable page.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-22 14:12:01 +01:00
kfraser@dhcp93.uk.xensource.com 00dc8b3bf1 [TOOLS] Fix PAE save/restore/migrate: we must flush
all pending 'mmu updates' before moving page directories
below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-13 17:30:30 +01:00
kaf24@firebug.cl.cam.ac.uk 2928514138 [LIBXC] Convert all printf/fprintf uses to use a macro instead.
Thus all can be disabled at compile time. It would be easy to
make enabling/disabling a run-time option too.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-07 14:07:36 +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 4f7f661224 [PAE] Fix tools to properly pack/unpack >4GB PAE CR3 values.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-02 14:16:43 +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
kaf24@firebug.cl.cam.ac.uk 54b4ddf0d1 Rename {SG}ET_XEN_GUEST_HANDLE to {sg}et_Xen_guest_handle, as they
are function macros rather than define/declare macros.

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-04-28 09:40:07 +01:00
kaf24@firebug.cl.cam.ac.uk 704e9ade0f Wrap all GUEST_HANDLEs in structures, and define SET/GET macros to access them
in Linux and libxc.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-04-27 13:58:50 +01:00
kaf24@firebug.cl.cam.ac.uk 44d4831475 Fix swapped calloc() arguments.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-04-19 18:39:36 +01:00
kaf24@firebug.cl.cam.ac.uk c702fb4c9d Fix whitespace in libxc. Tabs are manually fixed.
Trailing whitespace removed with:
 perl -p -i -e 's/\s+$/\n/g' tools/libxc/*.[ch]

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
2006-04-15 10:07:31 +01:00
smh22@firebug.cl.cam.ac.uk 5e1e26bd96 Make root page table sanity check on restore more generic.
Signed-off-by: Steven Hand <steven@xensource.com>
2006-04-06 17:34:54 +01:00
smh22@firebug.cl.cam.ac.uk 426f6b2e81 No longer call xc_vcpu_getcontext() on restore (required after cset 8610).
Signed-off-by: Steven Hand <steven@xensource.com>
2006-01-17 16:09:03 +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
emellor@leeni.uk.xensource.com df2ba9e15b Added the errno to the messages printed with the ERR macro. Tidy the use of
this macro where newlines have been appended -- the macro does this itself so
there is no need to add another one.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-30 18:38:14 +00:00
kaf24@firebug.cl.cam.ac.uk 9bd97f28fa Bundle vcpu_time and vcpu_info structures together into a single
structure that is 64 bytes on x86. This ensures that indexing into
the array is fast (power-of-two size) and that accesses are cache
friendly (cache line size is usually 32 or 64 bytes).

Rename vcpu_data to vcpu_info, vcpu_time to vcpu_info.time.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-28 19:48:54 +01:00
smh22@firebug.cl.cam.ac.uk 4d58b5d8ba Tolerate temporary inconsistency between type info and page contents on
(live) restore. This should now enable live migrate of fork-intensive (or
other page-table-intensive) workloads. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-25 17:53:41 +01:00
emellor@leeni.uk.xensource.com a22292f2bb Make it possible to run valgrind on code linked with the libxc libraries.
Valgrind cannot see when a hypercall has initialised entries in a data
structure, so appropriate memsets have been placed before using dom0_op_t,
privcmd_hypercall_t, and a couple of miscellaneous blocks passed into this
layer.  This initialises the block so that valgrind considers it to be valid,
but the data therein will be immediately overwritten by the hypercall, all
being well.

These changes are semantically neutral if -DVALGRIND is not set.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-11-22 16:31:16 +01:00
smh22@firebug.cl.cam.ac.uk a041c675c7 Fix pinning logic on restore.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-17 10:10:52 +01:00
smh22@firebug.cl.cam.ac.uk 4c908cf0e3 Many fixes for save/restore and related areas for PAE in particular. Now
should be able to save/restore successfully on machines with up to 16GB 
and any size of guest. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 17:45:03 +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 b99415e527 More fixes for save/restore; use configured memory for generating sxp.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-09 13:59:53 +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
emellor@leeni.uk.xensource.com 2b99d6e3a9 Take advantage of the new UUID (handle) stored for us in Xen to improve the
recreation semantics.

Remove the unpause at the end of xc_linux_restore, and move it to
XendDomainInfo.  This is necessary because xenstored now allocates the domain
path when the domain is introduced, which means that the new domain cannot
start running until that introduce is performed and the new devices
configured.

Give restore a separate completion phase in which domain details are stored.
This is required because the domain path is no longer available until after
the introduceDomain call.

TODO: Split the domain introduction into two so that the domain path is
available earlier.  At the moment, the domain <-> store channel details are
passed in to xenstored when the domain is introduced, but in the case of
restore it is necessary to wait until the restore is completed before the
channel MFN is available.

Change the interface between XendDomainInfo and XendCheckpoint/image to not
have hideous callbacks through setConsoleRef and setStoreRef.  Instead,
image.createImage explicitly returns those values, and XendCheckpoint passes
them through to completeRestore.

Move the purging of the domain path corresponding to a new domain from Xend
to xenstored, since xenstored is now in charge of this path.  With the domain
path creation moved to xenstored, Xend cannot remove the path, because watches
may have fired on it already.

Fix the printf statement in xenstored in verbose mode that details the
messages being written.  This statement was printing the buffer using %s, but
this buffer has an explicit length field, so we were seeing garbage after the
correct details.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-19 11:47:51 +01:00
kaf24@firebug.cl.cam.ac.uk ec82f54895 Clean up debug tracing in mm and mm audit code.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-10-16 17:25:15 +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 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 79434e94bd Get rid of anonymous unions in public header files.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 13:13:10 +00:00
kaf24@firebug.cl.cam.ac.uk 0cbc2f5eb4 Re-indent xc_linux_restore, and add code to force PAE
root pgdirs below 4GB on restore.

Signed-off-by: Ian Pratt <ian@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-12 12:48:33 +00: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
cl349@firebug.cl.cam.ac.uk 311f8312d8 Get rid of suspend record, start info holds all the info now.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-05 14:53:39 +00:00
cl349@firebug.cl.cam.ac.uk 3bc1edc4ab Update suspend/resume for new console code.
- translate console mfn to pfn
- unbind/bind console evtchn
- recover console mfn on restore
- trigger xenconsoled refresh after mfn is put in store
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-03 18:48:39 +00:00
kaf24@firebug.cl.cam.ac.uk 9dda6164e6 Fix memory_op domid parameter in dom0 tools.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-08-30 13:56:08 +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
shand@ubuntu.eng.hq.xensource.com d4e4e3abee Fix save/restore (for SMP guests in particularl); the blkfront suspend code
was failing to unbind its irq handler correctly which (on SMP) caused the 
guest to BUG() on resume when trying to request its callfunc_irq. Plus a 
few small cosmetic changes. 

Signed-off-by: Steven Hand <steven@xensource.com> 
/bin/bash: ❌ command not found
2005-08-29 19:20:55 -08: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
vh249@arcadians.cl.cam.ac.uk e08e53f151 make needlessly global functions static and use NULL instead of 0 for pointer
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-08-12 13:05:50 +00:00
vh249@arcadians.cl.cam.ac.uk 3abb5c2914 remove pointless NULL checks before free()
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
2005-08-12 10:48:42 +00:00