Commit Graph
78 Commits
Author SHA1 Message Date
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
smh22@firebug.cl.cam.ac.uk 9d894bc217 Fix 64-bit build.
Signed-off-by: Steven Hand <steven@xensource.com>
2005-11-09 09:02:59 +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 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
emellor@ewan e92ad65f02 Append a newline to error messages, so that they are parsed by XendCheckpoint.py
correctly.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
2005-10-09 11:53:34 +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 e701d05c8a Re-indent libxc to avoid hard tabs. Also, fix the PAE
domain builder to correctly write PTEs that map pages
above 4GB.

Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-19 11:06:05 +00:00
kaf24@firebug.cl.cam.ac.uk 3886819443 Remove unsued domain_controller.h file.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-09-14 10:58:00 +00:00
iap10@firebug.cl.cam.ac.uk bf753c8c6b Extend save/restore interface to cope with domains >4GB by adding a level of indirection.
Signed-off-by: ian@xensource.com
2005-09-07 02:31:24 +00:00
cl349@firebug.cl.cam.ac.uk 2aace4b332 On suspend, canonicalize store and console mfns in the guest.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-09-05 15:32:14 +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
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
shand@ubuntu.eng.hq.xensource.com 1f1e576a4a Fix nasty tools race between barking xu_autoreap() and xpopen3.wait() -
save/restore now seems more robust from a tools pov at least. 

Signed-off-by: Steven Hand <steven@xensource.com>
2005-08-28 21:40:36 -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
kaf24@firebug.cl.cam.ac.uk 3184c77cda Memory leak in xc_linux_save, and uninitialised var
in secpol_tool.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
2005-08-11 22:12:11 +00:00
cl349@firebug.cl.cam.ac.uk 59f1e250c2 Fix checkpointing - add save/restore support to the xenbus driver.
- Add xenbus driver suspend/resume functions
- Change xenbus irq to not be shared
- Translate store mfn in suspend record to pfn and back
- Make tools re-introduce the domain to the store
Signed-off-by: Rusty Russel <rusty@rustcorp.com.au>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-08-02 17:12:36 +00:00
kaf24@firebug.cl.cam.ac.uk 8f7262f9a6 Recently some people complain that they cannot set the maxmem for
domU. The problem is that some code wrongly treat dom.max_memkb as in
byte unit, instead of KB unit. This patch fixs the problem.

Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
2005-07-15 08:30:22 +00:00
kaf24@firebug.cl.cam.ac.uk ed30037e48 bitkeeper revision 1.1751 (42bbe480z9Fp_L5Tc500W8c8CL3g9A)
Rationalise x86 CRn guest state into a ctrlreg array in the per-vcpu
context structure. Most noticeably this means the pt_base field has
gone away -- replaced by ctrlreg[3] (CR3). VCPU_guest_stts is also
gone -- it was never arch-independent anyway.
Signed-off-by: Keir Fraser <keir@xensource.com>
2005-06-24 10:46:24 +00:00
cl349@firebug.cl.cam.ac.uk 23999c8bc1 bitkeeper revision 1.1527.2.1 (429368a2F0SR4yrzuHsrRucuwriYqA)
Implement the parts of vm save which need interaction with xend
as part of xend, instead of using xfrd.
Execute xc_linux_save in a seperate process so that it can't
crash xend.  Also handle errors passed from xc_linux_save.
xen_domain.c:
  Disable save in xfrd.
xc_save.c:
  new file
Makefile:
  Add xc_save.
XendDomainInfo.py:
  Add suspended state and threading Condition with notification, allowing
  easy waiting for state changes.
XendDomain.py:
  Implement the parts of vm save which need interaction with xend
  as part of xend, instead of using xfrd.  Set state to "suspended"
  when detecting a suspended domain.
  Fix reading output from subprocesses.
  Fix ValueError in xen_domain().
xc.c:
  Remove python binding for xc_linux_save.
xc_linux_save.c:
  Implement the parts of vm save which need interaction with xend
  as part of xend, instead of using xfrd.  Also run xc_linux_save
  in a seperate process.
xc_linux_restore.c:
  Flush output so that xend picks it up timely.
  Also disable debug output again.
xc.h:
  Update xc_linux_save prototype and fix comments for xc_linux_{save,restore}.
ignore:
  Add tools/xcutils/xc_save.
xpopen.py:
  Exit with 127 if exec fails.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-24 17:47:14 +00:00
cl349@firebug.cl.cam.ac.uk f900ac3343 bitkeeper revision 1.1510 (4291adbf-g-WMA-w33q-SnHuwoX3BA)
XendDomain.py, xc_linux_save.c:
  Re-arrange layout of save/restore file.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
2005-05-23 10:17:35 +00:00
smh22@firebug.cl.cam.ac.uk 43c44b436d bitkeeper revision 1.1389.1.60 (4284eff8xPCiJXQdVwPYSYL7MEB5zA)
fix calls to xc_domain_getinfo()

Signed-off-by: Steven Hand <steven@xensource.com>
2005-05-13 18:20:40 +00:00