ia64/xen-unstable

changeset 1213:8ca409420fb5

bitkeeper revision 1.824 (40601cf9uRnKyyagj6umr4Oaf_-gWQ)

Many files:
xeno -> xen renames.
xen_proc.c:
Rename: xenolinux-2.4.25-sparse/arch/xen/lib/xeno_proc.c -> xenolinux-2.4.25-sparse/arch/xen/lib/xen_proc.c
xen_proc.h:
Rename: xenolinux-2.4.25-sparse/include/asm-xen/xeno_proc.h -> xenolinux-2.4.25-sparse/include/asm-xen/xen_proc.h
Xen-HOWTO.txt:
Rename: docs/Xeno-HOWTO.txt -> docs/Xen-HOWTO.txt
author kaf24@scramble.cl.cam.ac.uk
date Tue Mar 23 11:18:17 2004 +0000 (2004-03-23)
parents b57df4362261
children 33b04523c4ab
files .rootkeys Makefile README README.CD docs/Makefile docs/Xen-HOWTO.txt docs/Xeno-HOWTO.txt docs/interface.tex docs/pdb.txt extras/mini-os/h/types.h extras/mini-os/kernel.c tools/misc/xen-clone tools/xc/lib/xc_linux_restore.c tools/xc/lib/xc_linux_save.c tools/xc/lib/xc_private.h xenolinux-2.4.25-sparse/Makefile xenolinux-2.4.25-sparse/arch/xen/drivers/console/console.c xenolinux-2.4.25-sparse/arch/xen/lib/xen_proc.c xenolinux-2.4.25-sparse/arch/xen/lib/xeno_proc.c xenolinux-2.4.25-sparse/include/asm-xen/xen_proc.h xenolinux-2.4.25-sparse/include/asm-xen/xeno_proc.h
line diff
     1.1 --- a/.rootkeys	Tue Mar 23 10:40:28 2004 +0000
     1.2 +++ b/.rootkeys	Tue Mar 23 11:18:17 2004 +0000
     1.3 @@ -9,7 +9,7 @@ 3f69d8abYB1vMyD_QVDvzxy5Zscf1A TODO
     1.4  405ef604hIZH5pGi2uwlrlSvUMrutw docs/Console-HOWTO.txt
     1.5  3f9e7d53iC47UnlfORp9iC1vai6kWw docs/Makefile
     1.6  40083bb4LVQzRqA3ABz0__pPhGNwtA docs/VBD-HOWTO.txt
     1.7 -4021053fmeFrEyPHcT8JFiDpLNgtHQ docs/Xeno-HOWTO.txt
     1.8 +4021053fmeFrEyPHcT8JFiDpLNgtHQ docs/Xen-HOWTO.txt
     1.9  3f9e7d60PWZJeVh5xdnk0nLUdxlqEA docs/eps/xenlogo.eps
    1.10  3f9e7d63lTwQbp2fnx7yY93epWS-eQ docs/figs/dummy
    1.11  3f9e7d564bWFB-Czjv1qdmE6o0GqNg docs/interface.tex
    1.12 @@ -647,7 +647,7 @@ 3e5a4e66N__lUXNwzQ-eADRzK9LXuQ xenolinux
    1.13  3e5a4e66aHCbQ_F5QZ8VeyikLmuRZQ xenolinux-2.4.25-sparse/arch/xen/kernel/traps.c
    1.14  3e5a4e66-9_NczrVMbuQkoSLyXckIw xenolinux-2.4.25-sparse/arch/xen/lib/Makefile
    1.15  3e5a4e6637ZDk0BvFEC-aFQs599-ng xenolinux-2.4.25-sparse/arch/xen/lib/delay.c
    1.16 -3f68905cF5i8-NYpIhGjKmh0y8Gu5g xenolinux-2.4.25-sparse/arch/xen/lib/xeno_proc.c
    1.17 +3f68905cF5i8-NYpIhGjKmh0y8Gu5g xenolinux-2.4.25-sparse/arch/xen/lib/xen_proc.c
    1.18  3e5a4e66croVgpcJyJuF2ycQw0HuJw xenolinux-2.4.25-sparse/arch/xen/mm/Makefile
    1.19  3e5a4e66l8Q5Tv-6B3lQIRmaVbFPzg xenolinux-2.4.25-sparse/arch/xen/mm/fault.c
    1.20  3e5a4e668SE9rixq4ahho9rNhLUUFQ xenolinux-2.4.25-sparse/arch/xen/mm/hypervisor.c
    1.21 @@ -684,7 +684,7 @@ 3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA xenolinux
    1.22  3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ xenolinux-2.4.25-sparse/include/asm-xen/suspend.h
    1.23  3e5a4e68mTr0zcp9SXDbnd-XLrrfxw xenolinux-2.4.25-sparse/include/asm-xen/system.h
    1.24  3f1056a9L_kqHcFheV00KbKBzv9j5w xenolinux-2.4.25-sparse/include/asm-xen/vga.h
    1.25 -3f689063nhrIRsMMZjZxMFk7iEINqQ xenolinux-2.4.25-sparse/include/asm-xen/xeno_proc.h
    1.26 +3f689063nhrIRsMMZjZxMFk7iEINqQ xenolinux-2.4.25-sparse/include/asm-xen/xen_proc.h
    1.27  3f056927gMHl7mWB89rb73JahbhQIA xenolinux-2.4.25-sparse/include/linux/blk.h
    1.28  3e5a4e68WLX3B8owTvktP3HHOtznPQ xenolinux-2.4.25-sparse/include/linux/major.h
    1.29  401c0590D_kwJDU59X8NyvqSv_Cl2A xenolinux-2.4.25-sparse/include/linux/sched.h
     2.1 --- a/Makefile	Tue Mar 23 10:40:28 2004 +0000
     2.2 +++ b/Makefile	Tue Mar 23 11:18:17 2004 +0000
     2.3 @@ -5,9 +5,9 @@
     2.4  #  cd xenolinux-<version>-sparse
     2.5  #  ./mkbuildtree <build dir>
     2.6  #  cd <build dir>
     2.7 -#  ARCH=xeno make oldconfig
     2.8 -#  ARCH=xeno make dep
     2.9 -#  ARCH=xeno make bzImage
    2.10 +#  ARCH=xen make oldconfig
    2.11 +#  ARCH=xen make dep
    2.12 +#  ARCH=xen make bzImage
    2.13  #  (<build dir> should be a vanilla linux tree with matching version)
    2.14  
    2.15  all:	
     3.1 --- a/README	Tue Mar 23 10:40:28 2004 +0000
     3.2 +++ b/README	Tue Mar 23 11:18:17 2004 +0000
     3.3 @@ -62,8 +62,7 @@ regularly use it to host complex applica
     3.4  Apache, BK servers etc. It runs every user-space applications we've
     3.5  tried.  We refer to our version of Linux ported to run on Xen as
     3.6  "XenoLinux", although really it's just standard Linux ported to a new
     3.7 -virtual CPU architecture that we call xeno-x86 (abbreviated to just
     3.8 -"xeno").
     3.9 +virtual CPU architecture that we call xen-x86.
    3.10  
    3.11  NetBSD has been ported to Xen by Christian Limpach, and will hopefully
    3.12  soon become part of the standard release. Work on a FreeBSD port has
    3.13 @@ -147,7 +146,7 @@ can be used to clone the repository and 
    3.14  
    3.15  The build procedure for xenolinux is slightly complicated as its done
    3.16  by running the 'mkbuildtree' script over a pristine Linux tree to turn
    3.17 -it into a xenolinux tree by adding the 'xeno' architecture.
    3.18 +it into a xenolinux tree by adding the 'xen' architecture.
    3.19  
    3.20  There's also a recent pre-built source tree on the project downloads
    3.21  page: http://www.cl.cam.ac.uk/netos/xen/downloads/xeno-1.2.tar.gz
    3.22 @@ -160,6 +159,6 @@ README.CD contains some example invocati
    3.23  
    3.24  See example Python scripts in tools/examples/ and the associated README.
    3.25  
    3.26 -Further documentation is in docs/ (e.g., docs/Xeno-HOWTO), and also in
    3.27 +Further documentation is in docs/ (e.g., docs/Xen-HOWTO), and also in
    3.28  
    3.29  
     4.1 --- a/README.CD	Tue Mar 23 10:40:28 2004 +0000
     4.2 +++ b/README.CD	Tue Mar 23 11:18:17 2004 +0000
     4.3 @@ -577,7 +577,7 @@ like normal linux kernels. Modules shoul
     4.4  If there's some kernel feature that hasn't been built into our default
     4.5  kernel, there's a pretty good change that if its a non-hardware
     4.6  related option you'll just be able to enable it and rebuild.  If its
     4.7 -not on the xconfig menu, hack the arch/xeno/config.in to put the menu
     4.8 +not on the xconfig menu, hack the arch/xen/config.in to put the menu
     4.9  back in.
    4.10  
    4.11  If you're going to use the link local 169.254.1.x addresses to
     5.1 --- a/docs/Makefile	Tue Mar 23 10:40:28 2004 +0000
     5.2 +++ b/docs/Makefile	Tue Mar 23 11:18:17 2004 +0000
     5.3 @@ -21,7 +21,7 @@ clean:
     5.4  
     5.5  install: $(DOCUMENTS)
     5.6  	mkdir -p $(prefix)/usr/share/doc/xen
     5.7 -	cp -a $(DOCUMENTS) VBD-HOWTO.txt Xeno-1.2-HOWTO.txt $(prefix)/usr/share/doc/xen
     5.8 +	cp -a $(DOCUMENTS) VBD-HOWTO.txt Xen-HOWTO.txt $(prefix)/usr/share/doc/xen
     5.9  
    5.10  %.pdf: %.ps
    5.11  	ps2pdf $< $@
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/docs/Xen-HOWTO.txt	Tue Mar 23 11:18:17 2004 +0000
     6.3 @@ -0,0 +1,362 @@
     6.4 +###########################################
     6.5 +Xen HOWTO
     6.6 +
     6.7 +University of Cambridge Computer Laboratory
     6.8 +
     6.9 +http://www.cl.cam.ac.uk/netos/xen
    6.10 +#############################
    6.11 +
    6.12 +
    6.13 +Get Xen Source Code
    6.14 +=============================
    6.15 +
    6.16 +The public master BK repository for the 1.2 release lives at:
    6.17 +'bk://xen.bkbits.net/xeno-1.2.bk'
    6.18 +
    6.19 +To fetch a local copy, first download the BitKeeper tools at:
    6.20 +http://www.bitmover.com/download with username 'bitkeeper' and
    6.21 +password 'get bitkeeper'.
    6.22 +
    6.23 +Then install the tools and then run:
    6.24 +# bk clone bk://xen.bkbits.net/xeno-1.2.bk
    6.25 +
    6.26 +Under your current directory, a new directory named 'xeno-1.2.bk' has
    6.27 +been created, which contains all the necessary source codes for the
    6.28 +Xen hypervisor and Linux guest OSes.
    6.29 +
    6.30 +To get newest changes to the repository, run
    6.31 +# cd xeno-1.2.bk
    6.32 +# bk pull
    6.33 +
    6.34 +
    6.35 +Build Xen
    6.36 +=============================
    6.37 +
    6.38 +Hint: To see how to build Xen and all the control tools, inspect the
    6.39 +tools/misc/xen-clone script in the BK repository. This script can be
    6.40 +used to clone the repository and perform a full build.
    6.41 +
    6.42 +To build Xen manually:
    6.43 +
    6.44 +# cd xeno-1.2.bk/xen
    6.45 +# make clean
    6.46 +# make
    6.47 +
    6.48 +This will (should) produce a file called 'xen' in the current
    6.49 +directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    6.50 +can also find a gzip version, named 'xen.gz'.
    6.51 +
    6.52 +To install the built files on your server under /usr, type 'make
    6.53 +install' at the root of the BK repository. You will need to be root to
    6.54 +do this!
    6.55 +
    6.56 +Hint: There is also a 'make dist' rule which copies built files to an
    6.57 +install directory just outside the BK repo; if this suits your setup,
    6.58 +go for it.
    6.59 +
    6.60 +
    6.61 +Build Linux as a Xen guest OS
    6.62 +==============================
    6.63 +
    6.64 +This is a little more involved since the repository only contains a
    6.65 +"sparse" tree -- this is essentially an 'overlay' on a standard linux
    6.66 +kernel source tree. It contains only those files currently 'in play'
    6.67 +which are either modified versions of files in the vanilla linux tree,
    6.68 +or brand new files specific to the Xen port.
    6.69 +
    6.70 +So, first you need a vanilla linux-2.4.24 tree, which is located at:
    6.71 +http://www.kernel.org/pub/linux/kernel/v2.4
    6.72 +
    6.73 +Then:
    6.74 +  # mv linux-2.4.24.tar.gz /xeno-1.2.bk
    6.75 +  # cd /xeno-1.2.bk
    6.76 +  # tar -zxvf linux-2.4.24.tar.gz
    6.77 +
    6.78 +You'll find a new directory 'linux-2.4.24' which contains all
    6.79 +the vanilla Linux 2.4.24 kernel source codes.
    6.80 +
    6.81 +Hint: You should choose the vanilla linux kernel tree that has the
    6.82 +same version as the "sparse" tree.
    6.83 +
    6.84 +Next, you need to 'overlay' this sparse tree on the full vanilla Linux
    6.85 +kernel tree:
    6.86 +
    6.87 +  # cd /xeno-1.2.bk/xenolinux-2.4.24-sparse
    6.88 +  # ./mkbuildtree ../linux-2.4.24
    6.89 +
    6.90 +Finally, rename the buildtree since it is now a 'xenolinux' buildtree. 
    6.91 +
    6.92 +  # cd /xeno-1.2.bk
    6.93 +  # mv linux-2.4.24 xenolinux-2.4.24
    6.94 +
    6.95 +Now that the buildtree is there, you can build the xenolinux kernel.
    6.96 +The default configuration should work fine for most people (use 'make
    6.97 +oldconfig') but you can customise using one of the other config tools
    6.98 +if you want.
    6.99 +
   6.100 +  # cd /xeno-1.2.bk/xenolinux-2.4.24
   6.101 +  # ARCH=xen make oldconfig   { or menuconfig, or xconfig, or config }  
   6.102 +  # ARCH=xen make dep
   6.103 +  # ARCH=xen make bzImage
   6.104 +
   6.105 +Assuming the build works, you'll end up with
   6.106 +/xeno-1.2.bk/xenolinux-2.4.24/arch/xen/boot/xenolinux.gz. This is the
   6.107 +gzip version of XenoLinux kernel image.
   6.108 +
   6.109 +
   6.110 +Build the Domain Control Tools
   6.111 +==============================
   6.112 +
   6.113 +Under '/xeno-1.2.bk/tools', there are three sub-directories:
   6.114 +'balloon', 'xc' and 'misc', each containing
   6.115 +a group of tools. You can enter any of the four sub-directories
   6.116 +and type 'make' to compile the corresponding group of tools.
   6.117 +Or you can type 'make' under '/xeno-1.2.bk/tools' to compile
   6.118 +all the tools.
   6.119 +
   6.120 +In order to compile the control-interface library in 'xc' you must
   6.121 +have zlib and development headers installed. Also you will need at
   6.122 +least Python v2.2. 
   6.123 +
   6.124 +'make install' in the tools directory will place executables and
   6.125 +libraries in /usr/bin and /usr/lib. You will need to be root to do this!
   6.126 +
   6.127 +As noted earlier, 'make dist' installs files to a local 'install'
   6.128 +directory just outside the BK repository. These files will then need
   6.129 +to be installed manually onto the server.
   6.130 +
   6.131 +The Example Scripts
   6.132 +===================
   6.133 +
   6.134 +The scripts in tools/examples/ are generally useful for
   6.135 +administering a Xen-based system.  You can install them by running
   6.136 +'make install' in that directory.
   6.137 +
   6.138 +The python scripts (*.py) are the main tools for controlling
   6.139 +Xen domains.
   6.140 +
   6.141 +'defaults' and 'democd' are example configuration files for starting
   6.142 +new domains.
   6.143 +
   6.144 +'xendomains' is a Sys-V style init script for starting and stopping
   6.145 +Xen domains when the system boots / shuts down.
   6.146 +
   6.147 +These will be discussed below in more detail.
   6.148 +
   6.149 +
   6.150 +Installation
   6.151 +==============================
   6.152 +
   6.153 +First:
   6.154 +# cp /xen-1.2.bk/xen/xen.gz /boot/xen.gz
   6.155 +# cp /xen-1.2.bk/xenolinux-2.4.24/arch/xen/boot/xenolinux.gz /boot/xenolinux.gz
   6.156 +
   6.157 +Second, you must have 'GNU Grub' installed. Then you need to edit
   6.158 +the Grub configuration file '/boot/grub/menu.lst'.
   6.159 +
   6.160 +A typical Grub menu option might look like:
   6.161 +
   6.162 +title Xen 1.2 / XenoLinux 2.4.24
   6.163 +        kernel /boot/xen.gz dom0_mem=131072 com1=115200,8n1 noht
   6.164 +        module /boot/xenolinux.gz root=/dev/sda4 ro console=tty0
   6.165 +
   6.166 +The first line specifies which Xen image to use, and what command line
   6.167 +arguments to pass to Xen. In this case we set the maximum amount of
   6.168 +memory to allocate to domain0, and enable serial I/O at 115200 baud.
   6.169 +We could also disable smp support (nosmp) or disable hyper-threading
   6.170 +support (noht). If you have multiple network interface you can use
   6.171 +ifname=ethXX to select which one to use. If your network card is
   6.172 +unsupported, use ifname=dummy
   6.173 +
   6.174 +The second line specifies which XenoLinux image to use, and the
   6.175 +standard linux command line arguments to pass to the kernel. In this
   6.176 +case, we're configuring the root partition and stating that it should
   6.177 +(initially) be mounted read-only (normal practice). 
   6.178 +
   6.179 +The following is a list of command line arguments to pass to Xen:
   6.180 +
   6.181 + ignorebiostables Disable parsing of BIOS-supplied tables. This may
   6.182 +                  help with some chipsets that aren't fully supported
   6.183 +                  by Xen. If you specify this option then ACPI tables are
   6.184 +                  also ignored, and SMP support is disabled.
   6.185 +
   6.186 + noreboot         Don't reboot the machine automatically on errors.
   6.187 +                  This is useful to catch debug output if you aren't
   6.188 +                  catching console messages via the serial line.
   6.189 +
   6.190 + nosmp            Disable SMP support.
   6.191 +                  This option is implied by 'ignorebiostables'.
   6.192 +
   6.193 + noacpi           Disable ACPI tables, which confuse Xen on some chipsets.
   6.194 +                  This option is implied by 'ignorebiostables'.
   6.195 +
   6.196 + watchdog         Enable NMI watchdog which can report certain failures.
   6.197 +
   6.198 + noht             Disable Hyperthreading.
   6.199 +
   6.200 + ifname=ethXX     Select which Ethernet interface to use.
   6.201 +
   6.202 + ifname=dummy     Don't use any network interface.
   6.203 +
   6.204 + com1=<baud>,DPS[,<io_base>,<irq>]
   6.205 + com2=<baud>,DPS[,<io_base>,<irq>]
   6.206 +                  Xen supports up to two 16550-compatible serial ports.
   6.207 +                  For example: 'com1=9600,8n1,0x408,5' maps COM1 to a
   6.208 +                  9600-baud port, 8 data bits, no parity, 1 stop bit,
   6.209 +                  I/O port base 0x408, IRQ 5.
   6.210 +                  If the I/O base and IRQ are standard (com1:0x3f8,4;
   6.211 +                  com2:0x2f8,3) then they need not be specified.
   6.212 +
   6.213 + console=<specifier list>
   6.214 +                  Specify the destination for Xen console I/O.
   6.215 +                  This is a comma-separated list of, for example:
   6.216 +                   vga:  use VGA console and allow keyboard input
   6.217 +                   com1: use serial port com1
   6.218 +                   com2H: use serial port com2. Transmitted chars will
   6.219 +                          have the MSB set. Received chars must have
   6.220 +                          MSB set.
   6.221 +                   com2L: use serial port com2. Transmitted chars will
   6.222 +                          have the MSB cleared. Received chars must
   6.223 +                          have MSB cleared.
   6.224 +                  The latter two examples allow a single port to be
   6.225 +                  shared by two subsystems (eg. console and
   6.226 +                  debugger). Sharing is controlled by MSB of each
   6.227 +                  transmitted/received character.
   6.228 + [NB. Default for this option is 'com1,tty']
   6.229 +
   6.230 + dom0_mem=xxx     Set the maximum amount of memory for domain0.
   6.231 +
   6.232 + tbuf_size=xxx    Set the size of the per-cpu trace buffers, in pages
   6.233 +                  (default 1).  Note that the trace buffers are only
   6.234 +                  enabled in debug builds.  Most users can ignore
   6.235 +                  this feature completely.
   6.236 +
   6.237 +Boot into Domain 0
   6.238 +==============================
   6.239 +
   6.240 +Reboot your computer; After selecting the kernel to boot, stand back
   6.241 +and watch Xen boot, closely followed by "domain 0" running the
   6.242 +XenoLinux kernel.  Depending on which root partition you have assigned
   6.243 +to XenoLinux kernel in Grub configuration file, you can use the
   6.244 +corresponding username / password to log in.
   6.245 +
   6.246 +Once logged in, it should look just like any regular linux box. All
   6.247 +the usual tools and commands should work as per usual.
   6.248 +
   6.249 +
   6.250 +Start New Domains
   6.251 +==============================
   6.252 +
   6.253 +You must be 'root' to start new domains.
   6.254 +
   6.255 +Make sure you have successfully configured at least one
   6.256 +physical network interface. Then:
   6.257 +
   6.258 +# xen_nat_enable
   6.259 +
   6.260 +The xc_dom_create.py program is useful for starting Xen domains.
   6.261 +You can specify configuration files using the -f switch on the command
   6.262 +line.  The default configuration is in /etc/xc/defaults.  You can
   6.263 +create custom versions of this to suit your local configuration.
   6.264 +
   6.265 +You can override the settings in a configuration file using command
   6.266 +line arguments to xc_dom_create.py.  However, you may find it simplest
   6.267 +to create a separate configuration file for each domain you start.
   6.268 +
   6.269 +xc_dom_create.py will print the local TCP port to which you should
   6.270 +connect to perform console I/O. A suitable console client is provided
   6.271 +by the Python module xenctl.console_client: running this module from
   6.272 +the command line with <host> and <port> parameters will start a
   6.273 +terminal session. This module is also installed as /usr/bin/xencons,
   6.274 +from a copy in tools/misc/xencons.  An alternative to manually running
   6.275 +a terminal client is to specify '-c' to xc_dom_create.py, or add
   6.276 +'auto_console=True' to the defaults file. This will cause
   6.277 +xc_dom_create.py to automatically become teh console terminal after
   6.278 +starting the domain.
   6.279 +
   6.280 +Boot-time output can be directed to this 'virtual console' by
   6.281 +specifying 'console=xencons0' as a boot parameter. It is also possible
   6.282 +to log in via the virtual console. To do this, you must run a mingetty
   6.283 +on the virtual console, which you can achieve as follows:
   6.284 + # mkdir -p /dev/xen
   6.285 + # mknod /dev/xen/cons c 4 123
   6.286 + # echo "c:2345:respawn:/sbin/mingetty --noclear xen/cons" >>/etc/inittab
   6.287 +If you wish to permit root logins via the virtual console then you must
   6.288 +also add 'xen/cons' to the list of trusted ttys in /etc/securetty.
   6.289 +
   6.290 +
   6.291 +Manage Running Domains
   6.292 +==============================
   6.293 +
   6.294 +You can see a list of existing domains with:
   6.295 +# xc_dom_control.py list
   6.296 +
   6.297 +In order to stop a domain, you use:
   6.298 +# xc_dom_control.py stop <domain_id>
   6.299 +
   6.300 +To shutdown a domain cleanly use:
   6.301 +# xc_dom_control.py shutdown <domain_id>
   6.302 +
   6.303 +To destroy a domain immediately:
   6.304 +# xc_dom_control.py destroy <domain_id>
   6.305 +
   6.306 +There are other more advanced options, including pinning domains to
   6.307 +specific CPUs and saving / resuming domains to / from disk files.  To
   6.308 +get more information, run the tool without any arguments:
   6.309 +# xc_dom_control.py
   6.310 +
   6.311 +There is more information available in the Xen README files, the
   6.312 +VBD-HOWTO and the contributed FAQ / HOWTO documents on the web.
   6.313 +
   6.314 +
   6.315 +Other Control Tasks using Python
   6.316 +================================
   6.317 +
   6.318 +A Python module 'Xc' is installed as part of the tools-install
   6.319 +process. This can be imported, and an 'xc object' instantiated, to
   6.320 +provide access to privileged command operations:
   6.321 +
   6.322 +# import Xc
   6.323 +# xc = Xc.new()
   6.324 +# dir(xc)
   6.325 +# help(xc.domain_create)
   6.326 +
   6.327 +In this way you can see that the class 'xc' contains useful
   6.328 +documentation for you to consult.
   6.329 +
   6.330 +A further package of useful routines (xenctl) is also installed:
   6.331 +
   6.332 +# import xenctl.utils
   6.333 +# help(xenctl.utils)
   6.334 +
   6.335 +You can use these modules to write your own custom scripts or you can
   6.336 +customise the scripts supplied in the Xen distribution.
   6.337 +
   6.338 +
   6.339 +Automatically start / stop domains at boot / shutdown
   6.340 +=====================================================
   6.341 +
   6.342 +A Sys-V style init script for RedHat systems is provided in
   6.343 +tools/examples/xendomains.  When you run 'make install' in that
   6.344 +directory, it should be automatically copied to /etc/init.d/.  You can
   6.345 +then enable it using the chkconfig command, e.g.:
   6.346 +
   6.347 +# chkconfig --add xendomains
   6.348 +
   6.349 +By default, this will start the boot-time domains in runlevels 3, 4
   6.350 +and 5.  To specify a domain is to start at boot-time, place its
   6.351 +configuration file (or a link to it) under /etc/xc/auto/.
   6.352 +
   6.353 +The script will also stop ALL domains when the system is shut down,
   6.354 +even domains that it did not start originally.
   6.355 +
   6.356 +You can also use the "service" command (part of the RedHat standard
   6.357 +distribution) to run this script manually, e.g:
   6.358 +
   6.359 +# service xendomains start
   6.360 +
   6.361 +Starts all the domains with config files under /etc/xc/auto/.
   6.362 +
   6.363 +# service xendomains stop
   6.364 +
   6.365 +Shuts down ALL running Xen domains.
     7.1 --- a/docs/Xeno-HOWTO.txt	Tue Mar 23 10:40:28 2004 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,362 +0,0 @@
     7.4 -###########################################
     7.5 -Xeno HOWTO
     7.6 -
     7.7 -University of Cambridge Computer Laboratory
     7.8 -
     7.9 -http://www.cl.cam.ac.uk/netos/xen
    7.10 -#############################
    7.11 -
    7.12 -
    7.13 -Get Xeno Source Codes
    7.14 -==========================
    7.15 -
    7.16 -The public master BK repository for the 1.2 release lives at:
    7.17 -'bk://xen.bkbits.net/xeno-1.2.bk'
    7.18 -
    7.19 -To fetch a local copy, first download the BitKeeper tools at:
    7.20 -http://www.bitmover.com/download with username 'bitkeeper' and
    7.21 -password 'get bitkeeper'.
    7.22 -
    7.23 -Then install the tools and then run:
    7.24 -# bk clone bk://xen.bkbits.net/xeno-1.2.bk
    7.25 -
    7.26 -Under your current directory, a new directory named 'xeno-1.2.bk' has
    7.27 -been created, which contains all the source codes for Xen and
    7.28 -XenoLinux. 
    7.29 -
    7.30 -To get newest changes to the repository, run
    7.31 -# cd xeno-1.2.bk
    7.32 -# bk pull
    7.33 -
    7.34 -
    7.35 -Build Xen
    7.36 -=============================
    7.37 -
    7.38 -Hint: To see how to build Xen and all the control tools, inspect the
    7.39 -tools/misc/xen-clone script in the BK repository. This script can be
    7.40 -used to clone the repository and perform a full build.
    7.41 -
    7.42 -To build Xen manually:
    7.43 -
    7.44 -# cd xeno-1.2.bk/xen
    7.45 -# make clean
    7.46 -# make
    7.47 -
    7.48 -This will (should) produce a file called 'xen' in the current
    7.49 -directory.  This is the ELF 32-bit LSB executable file of Xen.  You
    7.50 -can also find a gzip version, named 'xen.gz'.
    7.51 -
    7.52 -To install the built files on your Xenoserver under /usr, type 'make
    7.53 -install' at the root of the BK repository. You will need to be root to
    7.54 -do this!
    7.55 -
    7.56 -Hint: There is also a 'make dist' rule which copies built files to an
    7.57 -install directory just outside the BK repo; if this suits your setup,
    7.58 -go for it.
    7.59 -
    7.60 -
    7.61 -Build XenoLinux
    7.62 -==============================
    7.63 -
    7.64 -This is a little more involved since the repository only contains a
    7.65 -"sparse" tree -- this is essentially an 'overlay' on a standard linux
    7.66 -kernel source tree. It contains only those files currently 'in play'
    7.67 -which are either modified versions of files in the vanilla linux tree,
    7.68 -or brand new files specific to XenoLinux.
    7.69 -
    7.70 -So, first you need a vanilla linux-2.4.24 tree, which is located at:
    7.71 -http://www.kernel.org/pub/linux/kernel/v2.4
    7.72 -
    7.73 -Then:
    7.74 -  # mv linux-2.4.24.tar.gz /xeno-1.2.bk
    7.75 -  # cd /xeno-1.2.bk
    7.76 -  # tar -zxvf linux-2.4.24.tar.gz
    7.77 -
    7.78 -You'll find a new directory 'linux-2.4.24' which contains all
    7.79 -the vanilla Linux 2.4.24 kernel source codes.
    7.80 -
    7.81 -Hint: You should choose the vanilla linux kernel tree that has the
    7.82 -same version as the "sparse" tree.
    7.83 -
    7.84 -Next, you need to 'overlay' this sparse tree on the full vanilla Linux
    7.85 -kernel tree:
    7.86 -
    7.87 -  # cd /xeno-1.2.bk/xenolinux-2.4.24-sparse
    7.88 -  # ./mkbuildtree ../linux-2.4.24
    7.89 -
    7.90 -Finally, rename the buildtree since it is now a xenolinux buildtree. 
    7.91 -
    7.92 -  # cd /xeno-1.2.bk
    7.93 -  # mv linux-2.4.24 xenolinux-2.4.24
    7.94 -
    7.95 -Now that the buildtree is there, you can build the xenolinux kernel.
    7.96 -The default configuration should work fine for most people (use 'make
    7.97 -oldconfig') but you can customise using one of the other config tools
    7.98 -if you want.
    7.99 -
   7.100 -  # cd /xeno-1.2.bk/xenolinux-2.4.24
   7.101 -  # ARCH=xeno make oldconfig   { or menuconfig, or xconfig, or config }  
   7.102 -  # ARCH=xeno make dep
   7.103 -  # ARCH=xeno make bzImage
   7.104 -
   7.105 -Assuming the build works, you'll end up with
   7.106 -/xeno-1.2.bk/xenolinux-2.4.24/arch/xeno/boot/xenolinux.gz. This is the
   7.107 -gzip version of XenoLinux kernel image.
   7.108 -
   7.109 -
   7.110 -Build the Domain Control Tools
   7.111 -==============================
   7.112 -
   7.113 -Under '/xeno-1.2.bk/tools', there are three sub-directories:
   7.114 -'balloon', 'xc' and 'misc', each containing
   7.115 -a group of tools. You can enter any of the four sub-directories
   7.116 -and type 'make' to compile the corresponding group of tools.
   7.117 -Or you can type 'make' under '/xeno-1.2.bk/tools' to compile
   7.118 -all the tools.
   7.119 -
   7.120 -In order to compile the control-interface library in 'xc' you must
   7.121 -have zlib and development headers installed. Also you will need at
   7.122 -least Python v2.2. 
   7.123 -
   7.124 -'make install' in the tools directory will place executables and
   7.125 -libraries in /usr/bin and /usr/lib. You will need to be root to do this!
   7.126 -
   7.127 -As noted earlier, 'make dist' installs files to a local 'install'
   7.128 -directory just outside the BK repository. These files will then need
   7.129 -to be installed manually onto the Xenoserver.
   7.130 -
   7.131 -The Example Scripts
   7.132 -===================
   7.133 -
   7.134 -The scripts in tools/examples/ are generally useful for
   7.135 -administering a Xen-based system.  You can install them by running
   7.136 -'make install' in that directory.
   7.137 -
   7.138 -The python scripts (*.py) are the main tools for controlling
   7.139 -Xen domains.
   7.140 -
   7.141 -'defaults' and 'democd' are example configuration files for starting
   7.142 -new domains.
   7.143 -
   7.144 -'xendomains' is a Sys-V style init script for starting and stopping
   7.145 -Xen domains when the system boots / shuts down.
   7.146 -
   7.147 -These will be discussed below in more detail.
   7.148 -
   7.149 -
   7.150 -Installation
   7.151 -==============================
   7.152 -
   7.153 -First:
   7.154 -# cp /xen-1.2.bk/xen/xen.gz /boot/xen.gz
   7.155 -# cp /xen-1.2.bk/xenolinux-2.4.24/arch/xeno/boot/xenolinux.gz /boot/xenolinux.gz
   7.156 -
   7.157 -Second, you must have 'GNU Grub' installed. Then you need to edit
   7.158 -the Grub configuration file '/boot/grub/menu.lst'.
   7.159 -
   7.160 -A typical Grub menu option might look like:
   7.161 -
   7.162 -title Xen 1.2 / XenoLinux 2.4.24
   7.163 -        kernel /boot/xen.gz dom0_mem=131072 com1=115200,8n1 noht
   7.164 -        module /boot/xenolinux.gz root=/dev/sda4 ro console=tty0
   7.165 -
   7.166 -The first line specifies which Xen image to use, and what command line
   7.167 -arguments to pass to Xen. In this case we set the maximum amount of
   7.168 -memory to allocate to domain0, and enable serial I/O at 115200 baud.
   7.169 -We could also disable smp support (nosmp) or disable hyper-threading
   7.170 -support (noht). If you have multiple network interface you can use
   7.171 -ifname=ethXX to select which one to use. If your network card is
   7.172 -unsupported, use ifname=dummy
   7.173 -
   7.174 -The second line specifies which XenoLinux image to use, and the
   7.175 -standard linux command line arguments to pass to the kernel. In this
   7.176 -case, we're configuring the root partition and stating that it should
   7.177 -(initially) be mounted read-only (normal practice). 
   7.178 -
   7.179 -The following is a list of command line arguments to pass to Xen:
   7.180 -
   7.181 - ignorebiostables Disable parsing of BIOS-supplied tables. This may
   7.182 -                  help with some chipsets that aren't fully supported
   7.183 -                  by Xen. If you specify this option then ACPI tables are
   7.184 -                  also ignored, and SMP support is disabled.
   7.185 -
   7.186 - noreboot         Don't reboot the machine automatically on errors.
   7.187 -                  This is useful to catch debug output if you aren't
   7.188 -                  catching console messages via the serial line.
   7.189 -
   7.190 - nosmp            Disable SMP support.
   7.191 -                  This option is implied by 'ignorebiostables'.
   7.192 -
   7.193 - noacpi           Disable ACPI tables, which confuse Xen on some chipsets.
   7.194 -                  This option is implied by 'ignorebiostables'.
   7.195 -
   7.196 - watchdog         Enable NMI watchdog which can report certain failures.
   7.197 -
   7.198 - noht             Disable Hyperthreading.
   7.199 -
   7.200 - ifname=ethXX     Select which Ethernet interface to use.
   7.201 -
   7.202 - ifname=dummy     Don't use any network interface.
   7.203 -
   7.204 - com1=<baud>,DPS[,<io_base>,<irq>]
   7.205 - com2=<baud>,DPS[,<io_base>,<irq>]
   7.206 -                  Xen supports up to two 16550-compatible serial ports.
   7.207 -                  For example: 'com1=9600,8n1,0x408,5' maps COM1 to a
   7.208 -                  9600-baud port, 8 data bits, no parity, 1 stop bit,
   7.209 -                  I/O port base 0x408, IRQ 5.
   7.210 -                  If the I/O base and IRQ are standard (com1:0x3f8,4;
   7.211 -                  com2:0x2f8,3) then they need not be specified.
   7.212 -
   7.213 - console=<specifier list>
   7.214 -                  Specify the destination for Xen console I/O.
   7.215 -                  This is a comma-separated list of, for example:
   7.216 -                   vga:  use VGA console and allow keyboard input
   7.217 -                   com1: use serial port com1
   7.218 -                   com2H: use serial port com2. Transmitted chars will
   7.219 -                          have the MSB set. Received chars must have
   7.220 -                          MSB set.
   7.221 -                   com2L: use serial port com2. Transmitted chars will
   7.222 -                          have the MSB cleared. Received chars must
   7.223 -                          have MSB cleared.
   7.224 -                  The latter two examples allow a single port to be
   7.225 -                  shared by two subsystems (eg. console and
   7.226 -                  debugger). Sharing is controlled by MSB of each
   7.227 -                  transmitted/received character.
   7.228 - [NB. Default for this option is 'com1,tty']
   7.229 -
   7.230 - dom0_mem=xxx     Set the maximum amount of memory for domain0.
   7.231 -
   7.232 - tbuf_size=xxx    Set the size of the per-cpu trace buffers, in pages
   7.233 -                  (default 1).  Note that the trace buffers are only
   7.234 -                  enabled in debug builds.  Most users can ignore
   7.235 -                  this feature completely.
   7.236 -
   7.237 -Boot into Domain 0
   7.238 -==============================
   7.239 -
   7.240 -Reboot your computer; After selecting the kernel to boot, stand back
   7.241 -and watch Xen boot, closely followed by "domain 0" running the
   7.242 -XenoLinux kernel.  Depending on which root partition you have assigned
   7.243 -to XenoLinux kernel in Grub configuration file, you can use the
   7.244 -corresponding username / password to log in.
   7.245 -
   7.246 -Once logged in, it should look just like any regular linux box. All
   7.247 -the usual tools and commands should work as per usual.
   7.248 -
   7.249 -
   7.250 -Start New Domains
   7.251 -==============================
   7.252 -
   7.253 -You must be 'root' to start new domains.
   7.254 -
   7.255 -Make sure you have successfully configured at least one
   7.256 -physical network interface. Then:
   7.257 -
   7.258 -# xen_nat_enable
   7.259 -
   7.260 -The xc_dom_create.py program is useful for starting Xen domains.
   7.261 -You can specify configuration files using the -f switch on the command
   7.262 -line.  The default configuration is in /etc/xc/defaults.  You can
   7.263 -create custom versions of this to suit your local configuration.
   7.264 -
   7.265 -You can override the settings in a configuration file using command
   7.266 -line arguments to xc_dom_create.py.  However, you may find it simplest
   7.267 -to create a separate configuration file for each domain you start.
   7.268 -
   7.269 -xc_dom_create.py will print the local TCP port to which you should
   7.270 -connect to perform console I/O. A suitable console client is provided
   7.271 -by the Python module xenctl.console_client: running this module from
   7.272 -the command line with <host> and <port> parameters will start a
   7.273 -terminal session. This module is also installed as /usr/bin/xencons,
   7.274 -from a copy in tools/misc/xencons.  An alternative to manually running
   7.275 -a terminal client is to specify '-c' to xc_dom_create.py, or add
   7.276 -'auto_console=True' to the defaults file. This will cause
   7.277 -xc_dom_create.py to automatically become teh console terminal after
   7.278 -starting the domain.
   7.279 -
   7.280 -Boot-time output can be directed to this 'virtual console' by
   7.281 -specifying 'console=xencons0' as a boot parameter. It is also possible
   7.282 -to log in via the virtual console. To do this, you must run a mingetty
   7.283 -on the virtual console, which you can achieve as follows:
   7.284 - # mkdir -p /dev/xen
   7.285 - # mknod /dev/xen/cons c 4 123
   7.286 - # echo "c:2345:respawn:/sbin/mingetty --noclear xen/cons" >>/etc/inittab
   7.287 -If you wish to permit root logins via the virtual console then you must
   7.288 -also add 'xen/cons' to the list of trusted ttys in /etc/securetty.
   7.289 -
   7.290 -
   7.291 -Manage Running Domains
   7.292 -==============================
   7.293 -
   7.294 -You can see a list of existing domains with:
   7.295 -# xc_dom_control.py list
   7.296 -
   7.297 -In order to stop a domain, you use:
   7.298 -# xc_dom_control.py stop <domain_id>
   7.299 -
   7.300 -To shutdown a domain cleanly use:
   7.301 -# xc_dom_control.py shutdown <domain_id>
   7.302 -
   7.303 -To destroy a domain immediately:
   7.304 -# xc_dom_control.py destroy <domain_id>
   7.305 -
   7.306 -There are other more advanced options, including pinning domains to
   7.307 -specific CPUs and saving / resuming domains to / from disk files.  To
   7.308 -get more information, run the tool without any arguments:
   7.309 -# xc_dom_control.py
   7.310 -
   7.311 -There is more information available in the Xen README files, the
   7.312 -VBD-HOWTO and the contributed FAQ / HOWTO documents on the web.
   7.313 -
   7.314 -
   7.315 -Other Control Tasks using Python
   7.316 -================================
   7.317 -
   7.318 -A Python module 'Xc' is installed as part of the tools-install
   7.319 -process. This can be imported, and an 'xc object' instantiated, to
   7.320 -provide access to privileged command operations:
   7.321 -
   7.322 -# import Xc
   7.323 -# xc = Xc.new()
   7.324 -# dir(xc)
   7.325 -# help(xc.domain_create)
   7.326 -
   7.327 -In this way you can see that the class 'xc' contains useful
   7.328 -documentation for you to consult.
   7.329 -
   7.330 -A further package of useful routines (xenctl) is also installed:
   7.331 -
   7.332 -# import xenctl.utils
   7.333 -# help(xenctl.utils)
   7.334 -
   7.335 -You can use these modules to write your own custom scripts or you can
   7.336 -customise the scripts supplied in the Xen distribution.
   7.337 -
   7.338 -
   7.339 -Automatically start / stop domains at boot / shutdown
   7.340 -=====================================================
   7.341 -
   7.342 -A Sys-V style init script for RedHat systems is provided in
   7.343 -tools/examples/xendomains.  When you run 'make install' in that
   7.344 -directory, it should be automatically copied to /etc/init.d/.  You can
   7.345 -then enable it using the chkconfig command, e.g.:
   7.346 -
   7.347 -# chkconfig --add xendomains
   7.348 -
   7.349 -By default, this will start the boot-time domains in runlevels 3, 4
   7.350 -and 5.  To specify a domain is to start at boot-time, place its
   7.351 -configuration file (or a link to it) under /etc/xc/auto/.
   7.352 -
   7.353 -The script will also stop ALL domains when the system is shut down,
   7.354 -even domains that it did not start originally.
   7.355 -
   7.356 -You can also use the "service" command (part of the RedHat standard
   7.357 -distribution) to run this script manually, e.g:
   7.358 -
   7.359 -# service xendomains start
   7.360 -
   7.361 -Starts all the domains with config files under /etc/xc/auto/.
   7.362 -
   7.363 -# service xendomains stop
   7.364 -
   7.365 -Shuts down ALL running Xen domains.
     8.1 --- a/docs/interface.tex	Tue Mar 23 10:40:28 2004 +0000
     8.2 +++ b/docs/interface.tex	Tue Mar 23 11:18:17 2004 +0000
     8.3 @@ -705,7 +705,7 @@ behaviours.
     8.4  \subsection{Internal API}
     8.5  
     8.6  To use the trace buffer functionality from within Xen, you must {\tt \#include
     8.7 -<xeno/trace.h>}, which contains definitions related to the trace buffer.  Trace
     8.8 +<xen/trace.h>}, which contains definitions related to the trace buffer.  Trace
     8.9  events are inserted into the buffer using the {\tt TRACE\_xD} ({\tt x} = 0, 1,
    8.10  2, 3, 4 or 5) macros.  These all take an event number, plus {\tt x} additional
    8.11  (32-bit) data as their arguments.  For trace buffer-enabled builds of Xen these
    8.12 @@ -718,7 +718,7 @@ overheads.
    8.13  
    8.14  By default, the trace buffer is enabled only in debug builds (i.e. {\tt NDEBUG}
    8.15  is not defined).  It can be enabled separately by defining {\tt TRACE\_BUFFER},
    8.16 -either in {\tt <xeno/config.h>} or on the gcc command line.
    8.17 +either in {\tt <xen/config.h>} or on the gcc command line.
    8.18  
    8.19  \subsection{Dumping trace data}
    8.20  
     9.1 --- a/docs/pdb.txt	Tue Mar 23 10:40:28 2004 +0000
     9.2 +++ b/docs/pdb.txt	Tue Mar 23 11:18:17 2004 +0000
     9.3 @@ -57,8 +57,8 @@ Xen Configuration
     9.4    Symbolic debugging infomration is quite helpful too:
     9.5    xeno.bk/xen/arch/i386/Rules.mk
     9.6      add -g to CFLAGS to compile Xen with symbols
     9.7 -  xeno.bk/xenolinux-2.4.24-sparse/arch/xeno/Makefile
     9.8 -    add -g to CFLAGS to compile XenoLinux with symbols
     9.9 +  xeno.bk/xenolinux-2.4.24-sparse/arch/xen/Makefile
    9.10 +    add -g to CFLAGS to compile Linux with symbols
    9.11  
    9.12    You may also want to consider dedicating a register to the
    9.13    frame pointer (disable the -fomit-frame-pointer compile flag).
    9.14 @@ -97,7 +97,7 @@ GDB 6.0
    9.15  Usage
    9.16  -----
    9.17  
    9.18 -1. Boot Xen and XenoLinux
    9.19 +1. Boot Xen and Linux
    9.20  2. Interrupt Xen by pressing 'D' at the console
    9.21     You should see the console message: 
    9.22     pdb_handle_exception [0x88][0xfc5c9d88]
    10.1 --- a/extras/mini-os/h/types.h	Tue Mar 23 10:40:28 2004 +0000
    10.2 +++ b/extras/mini-os/h/types.h	Tue Mar 23 11:18:17 2004 +0000
    10.3 @@ -9,7 +9,7 @@
    10.4   *              
    10.5   *        Date: May 2003
    10.6   * 
    10.7 - * Environment: Xeno Minimal OS
    10.8 + * Environment: Xen Minimal OS
    10.9   * Description: a random collection of type definitions
   10.10   *
   10.11   ****************************************************************************
    11.1 --- a/extras/mini-os/kernel.c	Tue Mar 23 10:40:28 2004 +0000
    11.2 +++ b/extras/mini-os/kernel.c	Tue Mar 23 11:18:17 2004 +0000
    11.3 @@ -96,7 +96,7 @@ void start_kernel(start_info_t *si)
    11.4      __sti();
    11.5      
    11.6      /* print out some useful information  */
    11.7 -    printk("Xeno Minimal OS!\n");
    11.8 +    printk("Xen Minimal OS!\n");
    11.9      printk("start_info:   %p\n",  si);
   11.10      printk("  nr_pages:   %lu",     si->nr_pages);
   11.11      printk("  shared_inf: %08lx\n", si->shared_info);
    12.1 --- a/tools/misc/xen-clone	Tue Mar 23 10:40:28 2004 +0000
    12.2 +++ b/tools/misc/xen-clone	Tue Mar 23 11:18:17 2004 +0000
    12.3 @@ -86,11 +86,11 @@ cd ../..
    12.4  mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
    12.5  cd xenolinux-${LINUX_VER}
    12.6  
    12.7 -ARCH=xeno make oldconfig
    12.8 -ARCH=xeno make dep
    12.9 -ARCH=xeno make bzImage
   12.10 -ARCH=xeno make dist || ARCH=xeno make install
   12.11 -ARCH=xeno make modules
   12.12 -ARCH=xeno make INSTALL_MOD_PATH=${TOP}/install modules_install
   12.13 +ARCH=xen make oldconfig
   12.14 +ARCH=xen make dep
   12.15 +ARCH=xen make bzImage
   12.16 +ARCH=xen make dist || ARCH=xen make install
   12.17 +ARCH=xen make modules
   12.18 +ARCH=xen make INSTALL_MOD_PATH=${TOP}/install modules_install
   12.19  cd ..
   12.20  
    13.1 --- a/tools/xc/lib/xc_linux_restore.c	Tue Mar 23 10:40:28 2004 +0000
    13.2 +++ b/tools/xc/lib/xc_linux_restore.c	Tue Mar 23 11:18:17 2004 +0000
    13.3 @@ -1,13 +1,13 @@
    13.4  /******************************************************************************
    13.5   * xc_linux_restore.c
    13.6   * 
    13.7 - * Restore the state of a Xenolinux session.
    13.8 + * Restore the state of a Linux session.
    13.9   * 
   13.10   * Copyright (c) 2003, K A Fraser.
   13.11   */
   13.12  
   13.13  #include "xc_private.h"
   13.14 -#include <asm-xeno/suspend.h>
   13.15 +#include <asm-xen/suspend.h>
   13.16  #include <zlib.h>
   13.17  
   13.18  /* This may allow us to create a 'quiet' command-line option, if necessary. */
    14.1 --- a/tools/xc/lib/xc_linux_save.c	Tue Mar 23 10:40:28 2004 +0000
    14.2 +++ b/tools/xc/lib/xc_linux_save.c	Tue Mar 23 11:18:17 2004 +0000
    14.3 @@ -1,13 +1,13 @@
    14.4  /******************************************************************************
    14.5   * xc_linux_save.c
    14.6   * 
    14.7 - * Save the state of a running Xenolinux session.
    14.8 + * Save the state of a running Linux session.
    14.9   * 
   14.10   * Copyright (c) 2003, K A Fraser.
   14.11   */
   14.12  
   14.13  #include "xc_private.h"
   14.14 -#include <asm-xeno/suspend.h>
   14.15 +#include <asm-xen/suspend.h>
   14.16  #include <zlib.h>
   14.17  
   14.18  /* This may allow us to create a 'quiet' command-line option, if necessary. */
    15.1 --- a/tools/xc/lib/xc_private.h	Tue Mar 23 10:40:28 2004 +0000
    15.2 +++ b/tools/xc/lib/xc_private.h	Tue Mar 23 11:18:17 2004 +0000
    15.3 @@ -16,7 +16,7 @@
    15.4  
    15.5  #include "xc.h"
    15.6  
    15.7 -#include <asm-xeno/proc_cmd.h>
    15.8 +#include <asm-xen/proc_cmd.h>
    15.9  
   15.10  /* from xen/include/hypervisor-ifs */
   15.11  #include <hypervisor-if.h>
    16.1 --- a/xenolinux-2.4.25-sparse/Makefile	Tue Mar 23 10:40:28 2004 +0000
    16.2 +++ b/xenolinux-2.4.25-sparse/Makefile	Tue Mar 23 11:18:17 2004 +0000
    16.3 @@ -10,7 +10,12 @@ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$
    16.4  # This will be overriden for Xen and UML builds.
    16.5  SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    16.6  ARCH ?= $(SUBARCH)
    16.7 -ARCH := $(ARCH:xeno=xen) ## Temporary hack while users adjust to new archname
    16.8 +
    16.9 +## XXX The following hack can be discarded after users have adjusted to the
   16.10 +## architectural name change 'xeno' -> 'xen'.
   16.11 +ifeq ($(ARCH),xeno)
   16.12 +  ARCH := xen
   16.13 +endif
   16.14  
   16.15  KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
   16.16  
    17.1 --- a/xenolinux-2.4.25-sparse/arch/xen/drivers/console/console.c	Tue Mar 23 10:40:28 2004 +0000
    17.2 +++ b/xenolinux-2.4.25-sparse/arch/xen/drivers/console/console.c	Tue Mar 23 11:18:17 2004 +0000
    17.3 @@ -87,8 +87,8 @@ static void priv_conwrite(const char *s,
    17.4      }
    17.5  }
    17.6  
    17.7 -static void xen_console_write(struct console *co, const char *s, 
    17.8 -                              unsigned int count)
    17.9 +static void kcons_write(struct console *co, const char *s, 
   17.10 +                        unsigned int count)
   17.11  {
   17.12      unsigned long flags;
   17.13      spin_lock_irqsave(&xen_console_lock, flags);
   17.14 @@ -99,7 +99,7 @@ static void xen_console_write(struct con
   17.15      spin_unlock_irqrestore(&xen_console_lock, flags);
   17.16  }
   17.17  
   17.18 -static kdev_t xen_console_device(struct console *c)
   17.19 +static kdev_t kcons_device(struct console *c)
   17.20  {
   17.21      /*
   17.22       * This is the magic that binds our "struct console" to our
   17.23 @@ -108,19 +108,17 @@ static kdev_t xen_console_device(struct 
   17.24      return MKDEV(TTY_MAJOR, XEN_TTY_MINOR);
   17.25  }
   17.26  
   17.27 -static struct console xen_console_info = {
   17.28 -    name:		"xencons", /* Used to be xen_console, but we're only
   17.29 -				      actually allowed 8 charcters including
   17.30 -				      the terminator... */
   17.31 -    write:		xen_console_write,
   17.32 -    device:             xen_console_device,
   17.33 -    flags:		CON_PRINTBUFFER,
   17.34 -    index:		-1,
   17.35 +static struct console kcons_info = {
   17.36 +    name:    "xencons",
   17.37 +    write:   kcons_write,
   17.38 +    device:  kcons_device,
   17.39 +    flags:   CON_PRINTBUFFER,
   17.40 +    index:   -1,
   17.41  };
   17.42  
   17.43  void xen_console_init(void)
   17.44  {
   17.45 -    register_console(&xen_console_info);
   17.46 +    register_console(&kcons_info);
   17.47  }
   17.48  
   17.49  
   17.50 @@ -137,7 +135,7 @@ asmlinkage int xprintk(const char *fmt, 
   17.51      va_end(args);
   17.52      
   17.53      /* Send the processed output directly to Xen. */
   17.54 -    xen_console_write(NULL, printk_buf, printk_len);
   17.55 +    kcons_write(NULL, printk_buf, printk_len);
   17.56  
   17.57      return 0;
   17.58  }
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/xenolinux-2.4.25-sparse/arch/xen/lib/xen_proc.c	Tue Mar 23 11:18:17 2004 +0000
    18.3 @@ -0,0 +1,18 @@
    18.4 +
    18.5 +#include <linux/config.h>
    18.6 +#include <linux/proc_fs.h>
    18.7 +
    18.8 +static struct proc_dir_entry *xen_base;
    18.9 +
   18.10 +struct proc_dir_entry *create_xen_proc_entry(const char *name, mode_t mode)
   18.11 +{
   18.12 +    if ( xen_base == NULL )
   18.13 +        if ( (xen_base = proc_mkdir("xen", &proc_root)) == NULL )
   18.14 +            panic("Couldn't create /proc/xen");
   18.15 +    return create_proc_entry(name, mode, xen_base);
   18.16 +}
   18.17 +
   18.18 +void remove_xen_proc_entry(const char *name)
   18.19 +{
   18.20 +    remove_proc_entry(name, xen_base);
   18.21 +}
    19.1 --- a/xenolinux-2.4.25-sparse/arch/xen/lib/xeno_proc.c	Tue Mar 23 10:40:28 2004 +0000
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,18 +0,0 @@
    19.4 -
    19.5 -#include <linux/config.h>
    19.6 -#include <linux/proc_fs.h>
    19.7 -
    19.8 -static struct proc_dir_entry *xen_base;
    19.9 -
   19.10 -struct proc_dir_entry *create_xen_proc_entry(const char *name, mode_t mode)
   19.11 -{
   19.12 -    if ( xen_base == NULL )
   19.13 -        if ( (xen_base = proc_mkdir("xen", &proc_root)) == NULL )
   19.14 -            panic("Couldn't create /proc/xen");
   19.15 -    return create_proc_entry(name, mode, xen_base);
   19.16 -}
   19.17 -
   19.18 -void remove_xen_proc_entry(const char *name)
   19.19 -{
   19.20 -    remove_proc_entry(name, xen_base);
   19.21 -}
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/xenolinux-2.4.25-sparse/include/asm-xen/xen_proc.h	Tue Mar 23 11:18:17 2004 +0000
    20.3 @@ -0,0 +1,13 @@
    20.4 +
    20.5 +#ifndef __ASM_XEN_PROC_H__
    20.6 +#define __ASM_XEN_PROC_H__
    20.7 +
    20.8 +#include <linux/config.h>
    20.9 +#include <linux/proc_fs.h>
   20.10 +
   20.11 +extern struct proc_dir_entry *create_xen_proc_entry(
   20.12 +    const char *name, mode_t mode);
   20.13 +extern void remove_xen_proc_entry(
   20.14 +    const char *name);
   20.15 +
   20.16 +#endif /* __ASM_XEN_PROC_H__ */
    21.1 --- a/xenolinux-2.4.25-sparse/include/asm-xen/xeno_proc.h	Tue Mar 23 10:40:28 2004 +0000
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,13 +0,0 @@
    21.4 -
    21.5 -#ifndef __ASM_XEN_PROC_H__
    21.6 -#define __ASM_XEN_PROC_H__
    21.7 -
    21.8 -#include <linux/config.h>
    21.9 -#include <linux/proc_fs.h>
   21.10 -
   21.11 -extern struct proc_dir_entry *create_xen_proc_entry(
   21.12 -    const char *name, mode_t mode);
   21.13 -extern void remove_xen_proc_entry(
   21.14 -    const char *name);
   21.15 -
   21.16 -#endif /* __ASM_XEN_PROC_H__ */