Commit Graph
101 Commits
Author SHA1 Message Date
Keir Fraser e0b421d242 Reduce impact of saving/restoring/dumping large domains on Dom0 memory
usage by means of fadvise64() to tell the OS to discard the cache
pages used for the save/dump file.

Signed-off-by: Simon Graham <Simon.Graham@stratus.com>
2007-02-24 14:48:17 +00:00
Keir Fraser 4062095bcb Move some definitions from xg_save_resotre.h to xg_private.h
which are necessary for the new dump core implementation.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2007-02-24 14:19:42 +00:00
Emmanuel Ackaouy 81665f8e30 [XEN] [TOOLS] 32on64 compat save/restore: unadjust L3E flags at save time
Get rid of USER|RW|ACCESSED L3 PTE flags which may be present
in a PAE guest when running on a 64bit hypervisor at save time.
This prevents the restore operation from getting confused by
these flags.
Reset disallowed L3E flags to match PAE case.

Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2007-02-23 12:58:20 +00:00
kfraser@localhost.localdomain cfafd88d92 Lift physical address restriction in save/restore code.
Bump this to 44 bits for x86-32 and 52 bits for x86-64.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
2007-02-15 14:28:01 +00:00
Ian Campbell 9c4ed974a4 [TOOLS] Remove a debug message which is spamming the logs during live
migration.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-01 10:21:42 +00:00
kaf24@localhost.localdomain 7883dce659 xc_linux_save was broken in 13594:30af6cfdb05c. Unbreak it.
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2007-01-30 13:39:37 +00:00
kfraser@localhost.localdomain bec755ea3c During suspend, return immediately with a failure if the domain will
never suspend, instead of pointlessly retrying.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-25 12:30:25 +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
john.levon@sun.com 95d3856e97 Close save-after-restore race.
Make xc_linux_save() wait for the frame_list_list MFN to be updated by the
domain before trying to use it. Make Linux set the top-level MFN /after/
updating the other MFN lists.

Signed-off-by: John Levon <john.levon@sun.com>
2007-01-23 19:06:31 -08:00
Steven Hand c5d238206d Remove bogus sanity check from xc_linux_save.
(a guest from another host (or an earlier time) can quite validly have
a max_mfn bigger the current max on this host)

Signed-off-by: Steven Hand <steven@xensource.com>
2007-01-15 18:09:16 +00:00
Emmanuel Ackaouy b1cf3deb81 Support for save and restore of compatibility guests
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2007-01-05 17:34:43 +00:00
Steven Hand c2bb666e08 Remove 'netbuf race' debug output - we get tons of these for ballooned
down domains, and there's no way for us to distinguish that from the
(transient) case of network buffers.

Also tidy up comment.

Signed-off-by: Steven Hand <steven@xensource.com>
2006-12-29 13:00:08 +00:00
kfraser@localhost.localdomain f9396bbfe8 Improve consistency of type-attribute usage (volatile/const).
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-21 13:58:51 +00:00
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
Ewan Mellor 8bdc427fa2 Print errno for each of the "Error when writing to state file" messages.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-11-01 18:32:45 +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 07f2bdb30d [SHADOW] Clean up the DOM0_SHADOW_OP interface.
Also bump the dom0 interface version for tools (but
not for dom0 kernel!).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-22 18:50:01 +01:00
tdeegan@york.uk.xensource.com 49f7c7364e Replace shadow pagetable code with shadow2. 2006-08-16 17:02:35 +01:00
shand@kneesaa.uk.xensource.com b687b766ae Fail save if we have an out-of-sync P2M/M2P (since otherwise the restore
will fail later). 

A better fix would be to tolerate temporary out-of-sync situations so we 
can make a nicer fix to the kunmap_atomic() iossue (c/f -unstable csets 
10529 & 10533) but this requires some more thought. 

Signed-off-by: Steven Hand <steven@xensource.com>
2006-06-29 11:31:10 +01:00
kaf24@firebug.cl.cam.ac.uk b9ad8f1e13 [TOOLS] Fix set_bit/clear bit for x86/64 in xc_linux_save
From: John Byrne <john.l.byrne@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-22 21:37:33 +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 2d0922d515 Move Linux-specific privcmd code into private libxc implementations.
Make header path for kernel's privcmd/evtchn headers generic.
Remove pointless xi_*() interface that was using private libxc
interfaces.

Signed-off-by: John Levon <john.levon@sun.com>
2006-05-02 15:12:06 +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 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
emellor@leeni.uk.xensource.com 3a7a9bda1b Extend the xc_linux_save interface to take a callback function for handling the
suspend, and push the printf("suspend") out of xc_linux_save and into xc_save.
This means that xc_linux_save can be used without the xc_save wrapper if
desired.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-01-10 14:23:56 +00:00
emellor@leeni.uk.xensource.com 1676162e17 Merged. 2006-01-09 11:22:17 +00:00
emellor@leeni.uk.xensource.com ee2057b34c Added missing munmap for live_p2m_frame_list_list.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
2006-01-09 11:19:55 +00: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
smh22@firebug.cl.cam.ac.uk 2b039aa937 Fix VBD recovery logic on SMP guests (+ a minor error reporting fix for save)
Signed-off-by: Steven Hand <steven@xensource.com>
2005-12-01 20:43:04 +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
smh22@firebug.cl.cam.ac.uk c7458fa52e Fix formatting.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-26 12:17:35 +01:00
smh22@firebug.cl.cam.ac.uk d8fa063ad2 Fix save/restore and migrate on x86_64.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-26 12:13:39 +01:00
kaf24@firebug.cl.cam.ac.uk 83120737f5 Implement new memory_op() XENMEM_machphys_mfn_list. Replaces old
privcmd Linux ioctl and includes an implementation for x86/64.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-25 18:43:35 +01:00
smh22@firebug.cl.cam.ac.uk 9661835101 Re-enable tools support for live migration on PAE.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-24 16:32:38 +01:00
sos22@douglas.cl.cam.ac.uk 05607bfc8f Make sure that accesses to the machine_to_phys table all go through
suitable macros.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
2005-11-23 13:34:25 +01:00
smh22@firebug.cl.cam.ac.uk 49e566a9aa Tidy up debugging output.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-22 18:21:22 +01:00
smh22@firebug.cl.cam.ac.uk 1b5fd028bf Better handle page type info becoming incoherent during live migrate.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-22 17:50:41 +01:00
kaf24@firebug.cl.cam.ac.uk d35dd33f4c Ignore live flag on PAE/64-bit migrations, rather than
failing the migration entirely.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-22 12:04:03 +01:00
smh22@firebug.cl.cam.ac.uk 7cdf0f6407 Fix 'belt + braces' check in xc_linux_save and improve error handling
for live migrate (this includes making shadow enable idempotent). 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-21 16:40:16 +01:00
kaf24@firebug.cl.cam.ac.uk e39174283d Disable live relocation for PAE and x86/64. Currently it can
seriously harm Xen's health. Better to just disable it in the
tools until the outstanding issues are resolved.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-11-18 13:51:20 +01:00
smh22@firebug.cl.cam.ac.uk 0f2781b12e One more try...
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 18:41:43 +01:00
smh22@firebug.cl.cam.ac.uk 5aebcfee2a Fix annoying error introduced during cleanup. Oops.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-16 18:28:09 +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