Commit Graph
61 Commits
Author SHA1 Message Date
Keir Fraser f2878b5bb1 xc_save/xc_restore: Fix wrong data type
xc_interface_open() may return -1, but if we define xc_fd as unsigned
int, then -1 will be > 0.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-17 14:16:02 +01:00
Keir Fraser 0705c231d9 xc_save: ignore the first suspend event channel notification
I've noticed that the suspend event channel becomes pending as soon as
it is bound. I'm not sure why or whether this is intentional, but it
means that the suspend function will return before the domain has
completed suspending unless the first notification is cleared. Without
this patch, xc_domain_save may find that the guest has not suspended
and sleep in 10ms chunks until it does. Typically this is several
milliseconds of wasted time.

From: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-08 11:16:23 +01: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
Keir Fraser a2567b2631 xc_save: Janitorial work.
Remove an unused variable.
Replace errx by warnx when cleanup code follows.

From: Brendan Cully <brendan@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-08 10:55:09 +01:00
Keir Fraser 406b8494bb lsevtchn: Improve this evtchn reporting tool.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-05 11:56:35 +01:00
Keir Fraser 52d9d32d02 Cleanups to suspend-event-channel patches.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-07-04 12:39:18 +01:00
Keir Fraser 17636f47a4 Teach xc_save to use event-channel-based domain suspend if available.
If the guest provides a suspend event channel through xenstore,
xc_save will use it in preference to the old xenstore-based method.

Xend is still informed when the domain has suspended so that it can
perform device migration in parallel with last-round migration.

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2008-07-04 12:00:38 +01:00
Keir Fraser 2434aa5074 lsevtchn: Simple tool to list event channel states for a domain.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2008-04-09 16:11:34 +01:00
Keir Fraser 079d3b064f Fix xc_save compile
Add missing <err.h> include.

Signed-off-by: John Levon <john.levon@sun.com>
2008-03-18 10:59:46 +00:00
Keir Fraser 3faece79e4 Define CFLAGS and LDFLAGS for libxenstore.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:58:15 +00:00
Keir Fraser 7308e97492 Define CFLAGS and LDFLAGS for libxenguest.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:58:02 +00:00
Keir Fraser ad44c013ec Define CFLAGS and LDFLAGS for libxenctrl.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-27 12:57:14 +00:00
Keir Fraser 73de243b92 Add PRIVATE_BINDIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 14:42:03 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:38:44 +00:00
Keir Fraser c8107e1564 Apply PREFIX directly to LIBDIR.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:29:11 +00:00
Keir Fraser d2477385df tools: LDFLAGS in link lines
LDFLAGS is not honoured by a couple of link lines in tools/*, but
should be.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2008-01-17 15:17:22 +00:00
Tim Deegan 2abe070373 [HVM] Save/restore: don't leak shared-memory segments after HVM live-migrate.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-26 12:00:32 +01:00
Tim Deegan 3e3989b612 [HVM] Live-migration fixups after 15639:c585f993385c
Use the same xenstore area for log-dirty commands as for save/continue,
and avoid a race condition by acking the save command after the save.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-07-24 15:47:36 +01:00
Keir Fraser 43aa5ed8c0 Specify -fno-strict-aliasing in root build config file.
Fixes correctness issues with xenstored and gcc-4.2.

Original patch by Charles Coffing <ccoffing@novell.com>

Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-07 10:31:15 +01:00
Tim Deegan d11bec8a19 [HVM] Save/restore: merge xc_linux_save and xc_hvm_save
into xc_domain_save, like we did for xc_domain_restore
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>

--HG--
rename : tools/libxc/xc_linux_save.c => tools/libxc/xc_domain_save.c
2007-04-11 14:45:14 +01:00
Tim Deegan 538a65bcc3 [HVM] Save/restore: merge xc_linux_restore and xc_hvm_restore
into one function (and one file) since they share a lot of code
Signed-off-by: Tim Deegan <Tim.Deegan@øensource.com>

--HG--
rename : tools/libxc/xc_linux_restore.c => tools/libxc/xc_domain_restore.c
2007-04-05 15:11:22 +01:00
kfraser@localhost.localdomain d5f5ff766f Clean up save/restore state record handling. No need for Python to
read out the 'p2m size' field. Also that field is not needed at all
for HVM guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-04 16:34:56 +01:00
kfraser@localhost.localdomain 087d43326a hvm: Lazy memory allocation during HVM restore. General cleanup and
reduce gross assumptions about memory-map layout.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-04-04 16:18:28 +01:00
Steven Hand e2a44bc7a4 Some save/restore cleanups.
Signed-off-by: Steven Hand <steven@xensource.com>
2007-04-02 16:46:52 +01:00
Tim Deegan e0638f7e62 [HVM] Save/restore: don't get guest size from "memory_static_min"
since it doesn't mean that any more.  This is a sticking-plaster
to get HVM S/R working until the proper memory-map handling patch
is ready.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-03-29 15:27:18 +00:00
Tim Deegan da12f80b3e [HVM][QEMU] Save/restore: enable HVM live migration
by getting page-dirtying bitmaps from qemu-dm as well as from xen.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-03-16 11:39:50 +00:00
kfraser@localhost.localdomain 7954a48c41 Add suspend_cancel flag to linux elf notes.
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
2007-02-28 09:41:02 +00:00
Ian Campbell 0a650f1a63 [TOOLS] Add support for XEN_ELFNOTE_L1_MFN_VALID to readnotes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-27 15:39:08 +00:00
Ian Campbell 6f1113b5c5 [LIBELF] Prefer PT_NOTE segments to SHT_NOTE sections for ELF notes.
It's always an error to try to use sections on an executable; the
segments in the phdr are definitive.

Unfortunately we cannot drop SHT_NOTE support completely due to a
binutils bug which causes kernels to have the offset field of the
PT_NOTE phdr set to zero:

	http://sourceware.org/bugzilla/show_bug.cgi?id=594

This bug is present in binutils 2.17 although some distros have
backported the fix.

Therefore we simply prefer a PT_NOTE segment if we find one otherwise
we still use the SHT_NOTE section (and then the old __xen_guest
section).

Based on a patch from Jeremy Fitzhardinge.

Also added XEN_ELFNOTE_HV_START_LOW to readnotes.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2007-02-19 12:21:41 +00:00
Tim Deegan e0bc4531df [HVM] Save/restore: disentangle max_pfn from nr_pages.
These have been used interchangeably, which is OK for PV domains but
not for HVM.  This fixes an over-allocation by 256MB when restoring
HVM guests that have more than 4GB of RAM.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-02-09 10:48:41 +00:00
Tim Deegan de602931ef [HVM] Save/restore: don't try to set the console ring MFN
in a HVM restore.  In particular, don't print an uninitialized stack
variable, which causes XMLRPC exceptions in xend.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
2007-02-08 15:00:33 +00:00
Emmanuel Ackaouy e42527954e [TOOLS] Fix typos which breaks readnotes transparent gunzipping ...
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
2007-01-31 15:23:51 +00:00
Emmanuel Ackaouy 62e3530a35 Support transparant gunzipping in the readnotes utility.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
2007-01-25 22:16:52 +00:00
Emmanuel Ackaouy 0d2b8607e3 libelf: use for readnotes utility.
This patch makes the readnotes utility use libelf.

Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
 tools/xcutils/readnotes.c |  277 +++++++---------------------------------------
 1 file changed, 45 insertions(+), 232 deletions(-)
2007-01-25 22:16:52 +00:00
kfraser@localhost.localdomain 9e20e8426f [TOOLS] Avoid void* arithmetic when parsing elf notes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-19 15:05:20 +00:00
Tim Deegan 4a13cf1b70 [HVM] save restore: frame work
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>

frame work for HVM save restore in Control Panel
2007-01-18 16:48:03 +00:00
kfraser@localhost.localdomain 5dfa416d52 Don't use $(LINK.o), as it doesn't pick up -m32/-m64 from $(CFLAGS).
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-19 15:13:09 +01:00
kfraser@localhost.localdomain 2d0b60a90f [SOLARIS] A couple of simple compile fixes for tools/ on Solaris.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:15:59 +01:00
kfraser@localhost.localdomain 6311dc03da Clean up duplication of 'install' macros in the Makefiles.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 15:57:05 +01:00
Ian Campbell e76cb15dce [TOOLS] Use ELFSIZE to pick the ELF structures to use in readnotes.c
We can remove Elf_Ehdr since it is only used for e_ident which is an
unsigned char array.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-25 10:39:24 +01:00
Ian Campbell dfeb46aa49 [TOOLS] Add a simple tool to display the Xen specific ELF notes.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
2006-08-23 14:43:48 +01:00
kfraser@localhost.localdomain d0ed0b289c [XEND] xc_save/xc_restore open the libxc interface independently
of their parent. This is required now that the interface fd is
marked for close-on-exec.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-15 19:04:43 +01:00
kaf24@firebug.cl.cam.ac.uk b5fa90ac8e build: Clean up use of .PHONY
* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms@verge.net.au>
2006-04-10 17:02:49 +01:00
kaf24@firebug.cl.cam.ac.uk d27fbb0061 Move 'debug' build option into the outermost Config.mk file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-03-09 22:31:45 +01:00
kaf24@firebug.cl.cam.ac.uk 326450f67e Clean up the usage of CFLAGS. This is nice for packagers, who would
like to control the base compilation flags from a central place.

Signed-off-by: Charles Coffing <ccoffing@novell.com>
2006-03-09 21:17:45 +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@ewan af1b5637f4 Allow parallel 32- and 64-bit Xen installations. Move xc_save, xc_restore,
and xenconsole out of /usr/libexec/xen and into one of /usr/lib/xen/bin or
/usr/lib64/xen/bin.  Remove all the PATH hacking inside Xend, and rely upon
the PATH being set correctly from outside.  Added an auxbin module for
handling the hacky stuff.

Replace the few /usr/bin/python bang paths with /usr/bin/env python.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-11 14:55:12 +01: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
shand@ubuntu.eng.hq.xensource.com 01d0370a52 Enable 'live' migration from a tools pov; prior to this the 'live' flag was
being ignored by xend/xc_linux_save.

Signed-off-by: Steven Hand <steven@xensource.com>
2005-09-02 17:36:29 -08:00
kaf24@firebug.cl.cam.ac.uk 16504669c5 Cross-compilation fixes.
Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
2005-08-30 13:15:20 +00:00