[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Merge.



# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 9cdfcecf4968fb4fd9b2db6795442b1cdc7aec42
# Parent  5ffe3f16aa52a817e5656c24e9bea9a7033b3737
# Parent  4321438e92a7bc87d9d9d6c6be4624acb0280883
Merge.

Signed-off-by: Steven Smith, sos22@xxxxxxxxx

diff -r 5ffe3f16aa52 -r 9cdfcecf4968 .hgignore
--- a/.hgignore Tue Nov  1 12:38:20 2005
+++ b/.hgignore Wed Nov  2 16:29:32 2005
@@ -28,6 +28,8 @@
 ^docs/interface/interface\.css$
 ^docs/interface/interface\.html$
 ^docs/interface/labels\.pl$
+^docs/man1/
+^docs/man5/
 ^docs/pdf/.*$
 ^docs/ps/.*$
 ^docs/user/WARNINGS$
@@ -162,6 +164,8 @@
 ^tools/xenstore/xs_test$
 ^tools/xenstore/xs_watch_stress$
 ^tools/xenstore/xsls$
+^tools/xentrace/setsize$
+^tools/xentrace/tbctl$
 ^tools/xentrace/xenctx$
 ^tools/xentrace/xentrace$
 ^xen/BLOG$
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 docs/check_pkgs
--- a/docs/check_pkgs   Tue Nov  1 12:38:20 2005
+++ b/docs/check_pkgs   Wed Nov  2 16:29:32 2005
@@ -1,14 +1,14 @@
 
 silent_which ()
 {
-        if ! `which $1 1>/dev/null 2>/dev/null`; then
+        which $1 1>/dev/null 2>/dev/null || {
                 echo "*************************************************"
                 echo "*************************************************"
                 echo "* WARNING: Package '$1' is required"
                 echo "*          to build Xen documentation"
                 echo "*************************************************"
                 echo "*************************************************"
-        fi
+        }
         which $1 1>/dev/null 2>/dev/null
 }
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 docs/man/xmdomain.cfg.pod.5
--- a/docs/man/xmdomain.cfg.pod.5       Tue Nov  1 12:38:20 2005
+++ b/docs/man/xmdomain.cfg.pod.5       Wed Nov  2 16:29:32 2005
@@ -72,6 +72,57 @@
 
 =item I<builder>
 
+=back 
+
+=head1 DOMAIN SHUTDOWN OPTIONS
+
+There are 3 options which control domain shutdown (both planned and
+unplanned) under certain events.  The 3 events currently captured are:
+
+=over 4
+
+=item I<shutdown>
+
+Triggered on either an I<xm shutdown> or graceful shutdown from inside
+the DomU.
+
+=item I<reboot>
+
+Triggered on either an I<xm reboot> or graceful reboot from inside the
+DomU.
+
+=item I<crash>
+
+Triggered when a DomU goes to the crashed state for any reason.
+
+=back
+
+All of them take one of 4 valid states listed below.  
+
+=over 4
+
+=item I<destroy>
+
+The domain will be cleaned up completely.  No attempt at respawning
+will occur.  This is what a typical shutdown would look like.
+
+=item I<restart>
+
+The domain will be restarted with the same name as the old domain.
+This is what a typical reboot would look like.
+
+=item I<preserve>
+
+The domain will not be cleaned up at all.  This is often useful for
+crash state domains which ensures that enough evidence is to debug the
+real issue.
+
+=item I<rename-restart>
+
+The old domain will not be cleaned up, but will be renamed so a new
+domain can be restarted in it's place.  (TODO: what does this mean for
+resources?  What is the renamed name?)
+
 =back
 
 =head1 SEE ALSO
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 docs/src/user/control_software.tex
--- a/docs/src/user/control_software.tex        Tue Nov  1 12:38:20 2005
+++ b/docs/src/user/control_software.tex        Wed Nov  2 16:29:32 2005
@@ -60,7 +60,7 @@
 The available commands are as follows:
 
 \begin{description}
-\item[set-mem] Request a domain to adjust its memory footprint.
+\item[mem-set] Request a domain to adjust its memory footprint.
 \item[create] Create a new domain.
 \item[destroy] Kill a domain immediately.
 \item[list] List running domains.
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 docs/src/user/domain_mgmt.tex
--- a/docs/src/user/domain_mgmt.tex     Tue Nov  1 12:38:20 2005
+++ b/docs/src/user/domain_mgmt.tex     Wed Nov  2 16:29:32 2005
@@ -160,12 +160,12 @@
 \subsection{Setting memory footprints from dom0}
 
 The machine administrator can request that a domain alter its memory
-footprint using the \path{xm set-mem} command.  For instance, we can
+footprint using the \path{xm mem-set} command.  For instance, we can
 request that our example ttylinux domain reduce its memory footprint
 to 32 megabytes.
 
 \begin{verbatim}
-# xm set-mem ttylinux 32
+# xm mem-set ttylinux 32
 \end{verbatim}
 
 We can now see the result of this in the output of \path{xm list}:
@@ -181,7 +181,7 @@
 can restore the domain to its original size using the command line:
 
 \begin{verbatim}
-# xm set-mem ttylinux 64
+# xm mem-set ttylinux 64
 \end{verbatim}
 
 \subsection{Setting memory footprints from within a domain}
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 
linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c    Tue Nov  1 
12:38:20 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/cpu/common.c    Wed Nov  2 
16:29:32 2005
@@ -520,7 +520,7 @@
                printk("\n");
 }
 
-cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
+cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
 /* This is hacky. :)
  * We're emulating future behavior.
@@ -562,7 +562,7 @@
 #endif
 }
 
-void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
+void __cpuinit cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
 {
        unsigned long frames[16];
        unsigned long va;
@@ -585,7 +585,7 @@
  * and IDT. We reload them nevertheless, this function acts as a
  * 'CPU state barrier', nothing should get across.
  */
-void __init cpu_init (void)
+void __cpuinit cpu_init (void)
 {
        int cpu = smp_processor_id();
        struct tss_struct * t = &per_cpu(init_tss, cpu);
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 
linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Tue Nov  1 12:38:20 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/smpboot.c    Wed Nov  2 16:29:32 2005
@@ -191,10 +191,17 @@
        int cpu, rc;
        struct task_struct *idle;
 
-       if (max_cpus == 0)
-               return;
-
-       xen_smp_intr_init(0);
+       cpu_data[0] = boot_cpu_data;
+
+       cpu_2_logical_apicid[0] = 0;
+       x86_cpu_to_apicid[0] = 0;
+
+       current_thread_info()->cpu = 0;
+       cpu_sibling_map[0] = cpumask_of_cpu(0);
+       cpu_core_map[0]    = cpumask_of_cpu(0);
+
+       if (max_cpus != 0)
+               xen_smp_intr_init(0);
 
        for (cpu = 1; cpu < max_cpus; cpu++) {
                rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, cpu, NULL);
@@ -229,16 +236,20 @@
                make_page_readonly((void *)cpu_gdt_descr[cpu].address);
 
                cpu_set(cpu, cpu_possible_map);
+#ifdef CONFIG_HOTPLUG_CPU
                if (xen_start_info->flags & SIF_INITDOMAIN)
                        cpu_set(cpu, cpu_present_map);
+#else
+               cpu_set(cpu, cpu_present_map);
+#endif
 
                vcpu_prepare(cpu);
        }
 
        /* Currently, Xen gives no dynamic NUMA/HT info. */
-       for (cpu = 0; cpu < NR_CPUS; cpu++) {
-               cpus_clear(cpu_sibling_map[cpu]);
-               cpus_clear(cpu_core_map[cpu]);
+       for (cpu = 1; cpu < NR_CPUS; cpu++) {
+               cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
+               cpu_core_map[cpu]    = cpumask_of_cpu(cpu);
        }
 
 #ifdef CONFIG_X86_IO_APIC
@@ -256,18 +267,9 @@
        cpu_possible_map = cpumask_of_cpu(0);
        cpu_present_map  = cpumask_of_cpu(0);
        cpu_online_map   = cpumask_of_cpu(0);
-
-       cpu_data[0] = boot_cpu_data;
-       cpu_2_logical_apicid[0] = 0;
-       x86_cpu_to_apicid[0] = 0;
-
-       current_thread_info()->cpu = 0;
-       cpus_clear(cpu_sibling_map[0]);
-       cpu_set(0, cpu_sibling_map[0]);
-
-       cpus_clear(cpu_core_map[0]);
-       cpu_set(0, cpu_core_map[0]);
-}
+}
+
+#ifdef CONFIG_HOTPLUG_CPU
 
 static void vcpu_hotplug(unsigned int cpu)
 {
@@ -288,11 +290,7 @@
                cpu_set(cpu, cpu_present_map);
                (void)cpu_up(cpu);
        } else if (strcmp(state, "offline") == 0) {
-#ifdef CONFIG_HOTPLUG_CPU
                (void)cpu_down(cpu);
-#else
-               printk(KERN_INFO "Ignoring CPU%d hotplug request\n", cpu);
-#endif
        } else {
                printk(KERN_ERR "XENBUS: unknown state(%s) on CPU%d\n",
                       state, cpu);
@@ -341,8 +339,6 @@
 }
 
 subsys_initcall(setup_vcpu_hotplug_event);
-
-#ifdef CONFIG_HOTPLUG_CPU
 
 int __cpu_disable(void)
 {
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c     Tue Nov  1 
12:38:20 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup64.c     Wed Nov  2 
16:29:32 2005
@@ -35,7 +35,7 @@
 #endif
 char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
 
-cpumask_t cpu_initialized __initdata = CPU_MASK_NONE;
+cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
 struct x8664_pda cpu_pda[NR_CPUS] __cacheline_aligned; 
 
@@ -130,7 +130,7 @@
         xen_new_user_pt(__pa(init_level4_user_pgt));
 }
 
-void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
+void __cpuinit cpu_gdt_init(struct desc_ptr *gdt_descr)
 {
        unsigned long frames[16];
        unsigned long va;
@@ -227,7 +227,7 @@
 #endif
 }
 
-void __init check_efer(void)
+void __cpuinit check_efer(void)
 {
        unsigned long efer;
 
@@ -244,7 +244,7 @@
  * 'CPU state barrier', nothing should get across.
  * A lot of state is already set up in PDA init.
  */
-void __init cpu_init (void)
+void __cpuinit cpu_init (void)
 {
 #ifdef CONFIG_SMP
        int cpu = stack_smp_processor_id();
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Tue Nov  1 
12:38:20 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Nov  2 
16:29:32 2005
@@ -458,7 +458,7 @@
        node += strlen(watch->node);
 
        /* FIXME: clean up when error on the other end. */
-       if (info->connected == BLKIF_STATE_CONNECTED)
+       if ((info->connected == BLKIF_STATE_CONNECTED) || info->mi)
                return;
 
        err = xenbus_gather(NULL, watch->node,
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Tue Nov  1 12:38:20 2005
+++ b/tools/console/daemon/io.c Wed Nov  2 16:29:32 2005
@@ -380,12 +380,21 @@
        if (!buffer_empty(&d->buffer))
                return;
 
-       if (d->buffer.data)
+       if (d->buffer.data) {
                free(d->buffer.data);
-       d->buffer.data = NULL;
-       if (d->tty_fd != -1)
+               d->buffer.data = NULL;
+       }
+
+       if (d->tty_fd != -1) {
                close(d->tty_fd);
-       d->tty_fd = -1;
+               d->tty_fd = -1;
+       }
+
+       if (d->conspath) {
+               free(d->conspath);
+               d->conspath = NULL;
+       }
+
        remove_domain(d);
 }
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/console/daemon/main.c
--- a/tools/console/daemon/main.c       Tue Nov  1 12:38:20 2005
+++ b/tools/console/daemon/main.c       Wed Nov  2 16:29:32 2005
@@ -30,10 +30,14 @@
 #include "utils.h"
 #include "io.h"
 
-void usage(char *prg)
+static void usage(char *name)
 {
-       fprintf(stderr, 
-               "usage: %s [-h] [-V] [-v] [-i]\n", prg);
+       printf("Usage: %s [-h] [-V] [-v] [-i]\n", name);
+}
+
+static void version(char *name)
+{
+       printf("Xen Console Daemon 3.0\n");
 }
 
 int main(int argc, char **argv)
@@ -58,7 +62,7 @@
                        usage(argv[0]);
                        exit(0);
                case 'V':
-                       //version(argv[0]);
+                       version(argv[0]);
                        exit(0);
                case 'v':
                        syslog_option |= LOG_PERROR;
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/block-common.sh
--- a/tools/examples/block-common.sh    Tue Nov  1 12:38:20 2005
+++ b/tools/examples/block-common.sh    Wed Nov  2 16:29:32 2005
@@ -42,10 +42,17 @@
   local major
   local minor
   local pdev
-       
+  
   major=$(stat -L -c %t "$1")
   minor=$(stat -L -c %T "$1")
+ 
+  if [ -z $major  -o -z $minor ]; then
+    fatal "Backend device does not exist"
+  fi
+ 
   pdev=$(printf "0x%02x%02x" "0x$major" "0x$minor")
   xenstore_write "$XENBUS_PATH"/physical-device "$pdev" \
                  "$XENBUS_PATH"/node "$1"
+
+  success
 }
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/vif-bridge
--- a/tools/examples/vif-bridge Tue Nov  1 12:38:20 2005
+++ b/tools/examples/vif-bridge Wed Nov  2 16:29:32 2005
@@ -58,6 +58,7 @@
           fatal "brctl addif $bridge $vif failed"
 
         ifconfig "$vif" up || fatal "ifconfig $vif up failed"
+        success
         ;;
     down)
         # vifs are auto-removed from bridge.
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/vif-nat
--- a/tools/examples/vif-nat    Tue Nov  1 12:38:20 2005
+++ b/tools/examples/vif-nat    Wed Nov  2 16:29:32 2005
@@ -54,3 +54,5 @@
 ip r ${ipcmd} ${ip} dev ${vif} src ${main_ip}
 
 handle_iptable()
+
+success
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/vif-route
--- a/tools/examples/vif-route  Tue Nov  1 12:38:20 2005
+++ b/tools/examples/vif-route  Wed Nov  2 16:29:32 2005
@@ -46,3 +46,5 @@
 fi
 
 handle_iptable()
+
+success
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/xen-hotplug-common.sh
--- a/tools/examples/xen-hotplug-common.sh      Tue Nov  1 12:38:20 2005
+++ b/tools/examples/xen-hotplug-common.sh      Wed Nov  2 16:29:32 2005
@@ -30,8 +30,14 @@
 }
 
 fatal() {
+  xenstore_write "$XENBUS_PATH"/hotplug-status error
   log err "$@"
   exit 1
+}
+
+success() {
+  # Tell DevController that backend is "connected"
+  xenstore_write "$XENBUS_PATH"/hotplug-status connected
 }
 
 ##
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/examples/xend-config.sxp
--- a/tools/examples/xend-config.sxp    Tue Nov  1 12:38:20 2005
+++ b/tools/examples/xend-config.sxp    Wed Nov  2 16:29:32 2005
@@ -24,9 +24,6 @@
 
 # Port xend should use for the HTTP interface, if xend-http-server is set.
 #(xend-port            8000)
-
-# Port xend should use for the event interface.  This interface is deprecated.
-#(xend-event-port      8001)
 
 # Port xend should use for the relocation interface, if xend-relocation-server
 # is set.
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Nov  1 12:38:20 2005
+++ b/tools/firmware/rombios/rombios.c  Wed Nov  2 16:29:32 2005
@@ -149,7 +149,7 @@
 #define BX_SUPPORT_FLOPPY 1
 #define BX_FLOPPY_ON_CNT 37   /* 2 seconds */
 #define BX_PCIBIOS       1
-#define BX_APM           1
+#define BX_APM           0
 
 #define BX_USE_ATADRV    1
 #define BX_ELTORITO_BOOT 1
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/web/connection.py
--- a/tools/python/xen/web/connection.py        Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/web/connection.py        Wed Nov  2 16:29:32 2005
@@ -380,9 +380,6 @@
         self.state = "disconnected"
         self.transport = None
 
-    def getDestination(self):
-        raise NotImplementedError()
-
     def connectTransport(self):
         raise NotImplementedError()
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/web/tcp.py
--- a/tools/python/xen/web/tcp.py       Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/web/tcp.py       Wed Nov  2 16:29:32 2005
@@ -85,9 +85,6 @@
                 raise IOError("unknown service: " + ex)
         return port
 
-    def getDestination(self):
-        return (self.host, self.port)
-
     def connectTransport(self):
         self.transport = TCPClientConnection(
             self.host, self.port, self.bindAddress, self)
@@ -97,9 +94,6 @@
     l = TCPListener(port, factory, interface=interface, backlog=backlog)
     l.startListening()
     return l
-
-def SetCloExec(SocketListener):
-    SocketListener.setCloExec()
 
 def connectTCP(host, port, factory, timeout=None, bindAddress=None):
     c = TCPConnector(host, port, factory, timeout=timeout, 
bindAddress=bindAddress)
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/web/unix.py
--- a/tools/python/xen/web/unix.py      Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/web/unix.py      Wed Nov  2 16:29:32 2005
@@ -67,9 +67,6 @@
         self.addr = path
         self.timeout = timeout
 
-    def getDestination(self):
-        return self.addr
-
     def connectTransport(self):
         self.transport = UnixClientConnection(self.addr, self)
         self.transport.connect(self.timeout)
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xend/XendCheckpoint.py   Wed Nov  2 16:29:32 2005
@@ -7,9 +7,9 @@
 
 import os
 import re
-import select
 import string
 import sxp
+import threading
 from struct import pack, unpack, calcsize
 
 from xen.util.xpopen import xPopen3
@@ -81,6 +81,7 @@
                 log.info("Domain %d suspended.", dominfo.getDomid())
                 tochild.write("done\n")
                 tochild.flush()
+                log.debug('Written done')
 
         forkHelper(cmd, fd, saveInputHandler, False)
 
@@ -176,43 +177,42 @@
     if closeToChild:
         child.tochild.close()
 
-    lasterr = "error unknown"
+    thread = threading.Thread(target = slurp, args = (child.childerr))
+    thread.start()
+
     try:
-        fds = [child.fromchild.fileno(),
-               child.childerr.fileno()]
-        p = select.poll()
-        map(p.register, fds)
-        while len(fds) > 0:
-            r = p.poll()
-            for (fd, event) in r:
-                if event & select.POLLIN:
-                    if fd == child.childerr.fileno():
-                        lasterr = child.childerr.readline().rstrip()
-                        log.error('%s', lasterr)
-                    else:
-                        l = child.fromchild.readline().rstrip()
-                        while l:
-                            log.debug('%s', l)
-                            inputHandler(l, child.tochild)
-                            try:
-                                l = child.fromchild.readline().rstrip()
-                            except:
-                                l = None
-
-                if event & select.POLLERR:
-                    raise XendError('Error reading from child process for %s',
-                                    cmd)
-
-                if event & select.POLLHUP:
-                    fds.remove(fd)
-                    p.unregister(fd)
+        try:
+            while 1:
+                line = child.fromchild.readline()
+                if line == "":
+                    break
+                else:
+                    line = line.rstrip()
+                    log.debug('%s', line)
+                    inputHandler(line, child.tochild)
+
+            thread.join()
+
+        except IOError, exn:
+            raise XendError('Error reading from child process for %s: %s' %
+                            (cmd, exn))
     finally:
         child.fromchild.close()
         child.childerr.close()
         if not closeToChild:
             child.tochild.close()
 
-    if child.wait() >> 8 == 127:
-        lasterr = "popen failed"
-    if child.wait() != 0:
-        raise XendError("%s failed: %s" % (string.join(cmd), lasterr))
+    status = child.wait()
+    if status >> 8 == 127:
+        raise XendError("%s failed: popen failed" % string.join(cmd))
+    elif status != 0:
+        raise XendError("%s failed" % string.join(cmd))
+
+
+def slurp(file):
+    while 1:
+        line = file.readline()
+        if line == "":
+            break
+        else:
+            log.error('%s', line)
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xend/XendRoot.py
--- a/tools/python/xen/xend/XendRoot.py Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xend/XendRoot.py Wed Nov  2 16:29:32 2005
@@ -17,7 +17,7 @@
 #============================================================================
 
 """Xend root class.
-Creates the event server and handles configuration.
+Creates the servers and handles configuration.
 
 Other classes get config variables by importing this module,
 using instance() to get a XendRoot instance, and then
@@ -71,9 +71,6 @@
 
     """Default port xend serves HTTP at. """
     xend_port_default         = '8000'
-
-    """Default port xend serves events at. """
-    xend_event_port_default   = '8001'
 
     """Default port xend serves relocation at. """
     xend_relocation_port_default = '8002'
@@ -210,21 +207,16 @@
         """
         return self.get_config_int('xend-port', self.xend_port_default)
 
-    def get_xend_event_port(self):
-        """Get the port xend listens at for connection to its event server.
-        """
-        return self.get_config_int('xend-event-port', 
self.xend_event_port_default)
-
     def get_xend_relocation_port(self):
         """Get the port xend listens at for connection to its relocation 
server.
         """
         return self.get_config_int('xend-relocation-port', 
self.xend_relocation_port_default)
 
     def get_xend_address(self):
-        """Get the address xend listens at for its HTTP and event ports.
+        """Get the address xend listens at for its HTTP port.
         This defaults to the empty string which allows all hosts to connect.
         If this is set to 'localhost' only the localhost will be able to 
connect
-        to the HTTP and event ports.
+        to the HTTP port.
         """
         return self.get_config_value('xend-address', self.xend_address_default)
 
@@ -232,7 +224,7 @@
         """Get the address xend listens at for its relocation server port.
         This defaults to the empty string which allows all hosts to connect.
         If this is set to 'localhost' only the localhost will be able to 
connect
-        to the HTTP and event ports.
+        to the relocation port.
         """
         return self.get_config_value('xend-relocation-address', 
self.xend_relocation_address_default)
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xend/server/DevController.py     Wed Nov  2 16:29:32 2005
@@ -16,12 +16,18 @@
 # Copyright (C) 2005 XenSource Ltd
 #============================================================================
 
+from threading import Event
 
 from xen.xend import sxp
 from xen.xend.XendError import VmError
 from xen.xend.XendLogging import log
+
 from xen.xend.xenstore.xstransact import xstransact
-
+from xen.xend.xenstore.xswatch import xswatch
+
+DEVICE_CREATE_TIMEOUT = 120
+HOTPLUG_STATUS_NODE = "hotplug-status"
+HOTPLUG_STATUS_ERROR = "error"
 
 class DevController:
     """Abstract base class for a device controller.  Device controllers create
@@ -54,6 +60,18 @@
 
         self.writeDetails(config, devid, back, front)
 
+        status, fn_ret = self.waitForBackend(devid)
+        if status:
+            self.destroyDevice(devid)
+            raise VmError( ("Device %s (%s) could not be connected. "
+                            "Hotplug scripts not working") 
+                            % (devid, self.deviceClass))
+
+        elif fn_ret == HOTPLUG_STATUS_ERROR:
+            self.destroyDevice(devid)
+            raise VmError( ("Device %s (%s) could not be connected. "
+                            "Backend device not found!") 
+                            % (devid, self.deviceClass))
         return devid
 
 
@@ -242,6 +260,29 @@
         xstransact.Write(frontpath, frontDetails)
         xstransact.Write(backpath, backDetails)
 
+    def waitForBackend(self,devid):
+        ev = Event()
+
+        def hotplugStatus():
+            status = self.readBackend(devid, HOTPLUG_STATUS_NODE)
+            if status is not None:
+                watch.xs.unwatch(backpath, watch)
+                hotplugStatus.value = status
+                ev.set()
+
+        hotplugStatus.value = None
+        frontpath = self.frontendPath(devid)
+        backpath = xstransact.Read(frontpath, "backend")
+
+        watch = xswatch(backpath, hotplugStatus)
+
+        ev.wait(DEVICE_CREATE_TIMEOUT)
+        if ev.isSet():
+            return (0, hotplugStatus.value)
+        else:
+            return (-1, hotplugStatus.value)
+
+
 
     def backendPath(self, backdom, devid):
         """@param backdom [XendDomainInfo] The backend domain info."""
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xend/server/SrvDaemon.py Wed Nov  2 16:29:32 2005
@@ -19,7 +19,6 @@
 from xen.xend.server import SrvServer
 from xen.xend.XendLogging import log
 
-import event
 import relocate
 from params import *
 
@@ -273,7 +272,6 @@
             log.info("Xend changeset: %s.", xinfo['xen_changeset'])
             del xc
 
-            event.listenEvent(self)
             relocate.listenRelocation()
             servers = SrvServer.create()
             self.daemonize()
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xm/create.py     Wed Nov  2 16:29:32 2005
@@ -376,7 +376,7 @@
           use="""Should the device model use SDL?""")
 
 gopts.var('display', val='DISPLAY',
-          fn=set_value, default='localhost:0',
+          fn=set_value, default=None,
           use="X11 display to use")
 
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xm/main.py       Wed Nov  2 16:29:32 2005
@@ -791,6 +791,9 @@
             else:
                 err("Error connecting to xend: %s.  Is xend running?" % ex[1])
             sys.exit(1)
+        except KeyboardInterrupt:
+            print "Interrupted."
+            sys.exit(1)
         except IOError:
             if os.geteuid() != 0:
                 err("Most commands need root access.  Please try again as 
root.")
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/vtpm_manager/manager/vtpm_manager.c
--- a/tools/vtpm_manager/manager/vtpm_manager.c Tue Nov  1 12:38:20 2005
+++ b/tools/vtpm_manager/manager/vtpm_manager.c Wed Nov  2 16:29:32 2005
@@ -140,12 +140,15 @@
   TPM_AUTHDATA sharedsecret;
   
   TPMTRYRETURN( VTSP_OSAP(vtpm_globals->manager_tcs_handle,
-                         TPM_ET_SRK,
-                         0, 
+                         TPM_ET_KEYHANDLE,
+                         TPM_SRK_KEYHANDLE, 
                          (const TPM_AUTHDATA*)&vtpm_globals->srk_usage_auth,
                          &sharedsecret, 
                          &osap) ); 
-  
+
+  osap.fContinueAuthSession = FALSE;
+ 
+ 
   TPMTRYRETURN( VTSP_CreateWrapKey( vtpm_globals->manager_tcs_handle,
                                    TPM_KEY_BIND,
                                    (const 
TPM_AUTHDATA*)&vtpm_globals->storage_key_usage_auth,
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/vtpm_manager/manager/vtsp.c
--- a/tools/vtpm_manager/manager/vtsp.c Tue Nov  1 12:38:20 2005
+++ b/tools/vtpm_manager/manager/vtsp.c Wed Nov  2 16:29:32 2005
@@ -180,8 +180,8 @@
   Crypto_GetRandom((BYTE *) &nonceOddOSAP, sizeof(TPM_NONCE) ); 
   
   TPMTRYRETURN( TCSP_OSAP(    hContext,
-                             TPM_ET_SRK,
-                             0, 
+                             entityType,
+                             entityValue, 
                              nonceOddOSAP,
                              &auth->AuthHandle, 
                              &auth->NonceEven, 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/vtpm_manager/util/buffer.h
--- a/tools/vtpm_manager/util/buffer.h  Tue Nov  1 12:38:20 2005
+++ b/tools/vtpm_manager/util/buffer.h  Wed Nov  2 16:29:32 2005
@@ -36,18 +36,6 @@
 
 #include <stddef.h>             // for pointer NULL
 #include "tcg.h"
-
-// structure to enable use of FMT_SIZE32_DATA in BSG_Unpack
-typedef struct pack_buf_t {
-  UINT32 size;
-  BYTE * data;
-} pack_buf_t;
-
-// and a const version for Pack
-typedef struct pack_constbuf_t {
-  UINT32 size;
-  const BYTE* data;
-} pack_constbuf_t;
 
 typedef UINT32 tpm_size_t;
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/vtpm_manager/util/tcg.h
--- a/tools/vtpm_manager/util/tcg.h     Tue Nov  1 12:38:20 2005
+++ b/tools/vtpm_manager/util/tcg.h     Wed Nov  2 16:29:32 2005
@@ -190,6 +190,20 @@
   BOOL   fContinueAuthSession;
   TPM_AUTHDATA  HMAC;
 } TCS_AUTH;
+
+// structures for dealing with sizes followed by buffers in all the
+// TCG structure.
+typedef struct pack_buf_t {
+  UINT32 size;
+  BYTE * data;
+} pack_buf_t;
+
+typedef struct pack_constbuf_t {
+  UINT32 size;
+  const BYTE* data;
+} pack_constbuf_t;
+
+
 
 // **************************** CONSTANTS *********************************
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Tue Nov  1 12:38:20 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Wed Nov  2 16:29:32 2005
@@ -704,7 +704,6 @@
 {
        char path[80];
        char *name;
-       unsigned int *len;
        struct xs_transaction_handle *xstranshandle;
 
        snprintf(path, sizeof(path),"/local/domain/%i/name", domain_id);
@@ -715,7 +714,7 @@
                exit(1); /* Change this */
        }
 
-       name = (char *) xs_read(handle->xshandle, xstranshandle, path, len);
+       name = (char *) xs_read(handle->xshandle, xstranshandle, path, NULL);
        
        xs_transaction_end(handle->xshandle, xstranshandle, false);
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/xenstore/xs.h
--- a/tools/xenstore/xs.h       Tue Nov  1 12:38:20 2005
+++ b/tools/xenstore/xs.h       Wed Nov  2 16:29:32 2005
@@ -136,7 +136,7 @@
  */
 bool xs_release_domain(struct xs_handle *h, unsigned int domid);
 
-/* Query the home path of a domain.
+/* Query the home path of a domain.  Call free() after use.
  */
 char *xs_get_domain_path(struct xs_handle *h, unsigned int domid);
 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Tue Nov  1 12:38:20 2005
+++ b/xen/arch/x86/domain.c     Wed Nov  2 16:29:32 2005
@@ -189,22 +189,22 @@
     {
         list_for_each_entry ( page, &d->page_list, list )
         {
-            printk("Page %p: mfn=%td, caf=%08x, taf=%" PRtype_info "\n",
-                   _p(page_to_phys(page)), page-frame_table, page->count_info,
-                   page->u.inuse.type_info);
+            printk("Page %p: mfn=%p, caf=%08x, taf=%" PRtype_info "\n",
+                   _p(page_to_phys(page)), _p(page - frame_table),
+                   page->count_info, page->u.inuse.type_info);
         }
     }
 
     list_for_each_entry ( page, &d->xenpage_list, list )
     {
-        printk("XenPage %p: mfn=%td, caf=%08x, taf=%" PRtype_info "\n",
-               _p(page_to_phys(page)), page-frame_table, page->count_info,
-               page->u.inuse.type_info);
+        printk("XenPage %p: mfn=%p, caf=%08x, taf=%" PRtype_info "\n",
+               _p(page_to_phys(page)), _p(page - frame_table),
+               page->count_info, page->u.inuse.type_info);
     }
 
     page = virt_to_page(d->shared_info);
-    printk("Shared_info@%p: mfn=%td, caf=%08x, taf=%" PRtype_info "\n",
-           _p(page_to_phys(page)), page-frame_table, page->count_info,
+    printk("Shared_info@%p: mfn=%p, caf=%08x, taf=%" PRtype_info "\n",
+           _p(page_to_phys(page)), _p(page - frame_table), page->count_info,
            page->u.inuse.type_info);
 }
 
@@ -407,6 +407,9 @@
         /* VMX uses the initially provided page tables as the P2M map. */
         if ( !pagetable_get_paddr(d->arch.phys_table) )
             d->arch.phys_table = v->arch.guest_table;
+
+        /* Initialize monitor page table */
+        v->arch.monitor_table = mk_pagetable(0);
 
         vmx_final_setup_guest(v);
     }
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 xen/arch/x86/shadow.c
--- a/xen/arch/x86/shadow.c     Tue Nov  1 12:38:20 2005
+++ b/xen/arch/x86/shadow.c     Wed Nov  2 16:29:32 2005
@@ -1,19 +1,19 @@
 /******************************************************************************
- * arch/x86/shadow_64.c
- * 
+ * arch/x86/shadow.c
+ *
  * Copyright (c) 2005 Michael A Fetterman
  * Based on an earlier implementation by Ian Pratt et al
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
@@ -55,7 +55,6 @@
     unsigned long va, unsigned int from, unsigned int to);
 static inline void validate_bl2e_change( struct domain *d,
     guest_root_pgentry_t *new_gle_p, pgentry_64_t *shadow_l3, int index);
-
 #endif
 
 /********
@@ -102,7 +101,6 @@
         return 1;
 #endif
         return 0;
-        
     }
 
     // To convert this page to use as a page table, the writable count
@@ -228,18 +226,20 @@
                  */
                 page = alloc_domheap_pages(NULL, SL1_ORDER, 0);
                 if (!page)
-                    domain_crash_synchronous();
+                    goto no_shadow_page;
 
                 void *l1_0 = map_domain_page(page_to_pfn(page));
-                memset(l1_0,0,PAGE_SIZE);
+                memset(l1_0, 0, PAGE_SIZE);
                 unmap_domain_page(l1_0);
+
                 void *l1_1 = map_domain_page(page_to_pfn(page+1));
-                memset(l1_1,0,PAGE_SIZE);
+                memset(l1_1, 0, PAGE_SIZE);
                 unmap_domain_page(l1_1);
 #else
                 page = alloc_domheap_page(NULL);
                 if (!page)
-                    domain_crash_synchronous();
+                    goto no_shadow_page;
+
                 void *l1 = map_domain_page(page_to_pfn(page));
                 memset(l1, 0, PAGE_SIZE);
                 unmap_domain_page(l1);
@@ -248,6 +248,9 @@
             else
             {
                 page = alloc_domheap_page(NULL);
+                if (!page)
+                    goto no_shadow_page;
+
                 void *l1 = map_domain_page(page_to_pfn(page));
                 memset(l1, 0, PAGE_SIZE);
                 unmap_domain_page(l1);
@@ -255,22 +258,26 @@
         }
     }
     else {
+#if CONFIG_PAGING_LEVELS == 2
         page = alloc_domheap_page(NULL);
+#elif CONFIG_PAGING_LEVELS == 3
+        if ( psh_type == PGT_l3_shadow )
+            page = alloc_domheap_pages(NULL, 0, ALLOC_DOM_DMA);
+        else
+            page = alloc_domheap_page(NULL);
+#elif CONFIG_PAGING_LEVELS == 4
+        if ( (psh_type == PGT_l4_shadow) &&
+             (d->arch.ops->guest_paging_levels != PAGING_L4) )
+            page = alloc_domheap_pages(NULL, 0, ALLOC_DOM_DMA);
+        else
+            page = alloc_domheap_page(NULL);
+#endif
+        if (!page)
+            goto no_shadow_page;
+
         void *lp = map_domain_page(page_to_pfn(page));
         memset(lp, 0, PAGE_SIZE);
         unmap_domain_page(lp);
-
-    }
-    if ( unlikely(page == NULL) )
-    {
-        printk("Couldn't alloc shadow page! dom%d count=%d\n",
-               d->domain_id, d->arch.shadow_page_count);
-        printk("Shadow table counts: l1=%d l2=%d hl2=%d snapshot=%d\n",
-               perfc_value(shadow_l1_pages), 
-               perfc_value(shadow_l2_pages),
-               perfc_value(hl2_table_pages),
-               perfc_value(snapshot_pages));
-        BUG(); /* XXX FIXME: try a shadow flush to free up some memory. */
     }
 
     smfn = page_to_pfn(page);
@@ -359,7 +366,7 @@
 
     return smfn;
 
-  fail:
+fail:
     FSH_LOG("promotion of pfn=%lx mfn=%lx failed!  external gnttab refs?",
             gpfn, gmfn);
     if (psh_type == PGT_l1_shadow)
@@ -377,6 +384,20 @@
     }
     else
         free_domheap_page(page);
+
+    return 0;
+
+no_shadow_page:
+    ASSERT(page == NULL);
+    printk("Couldn't alloc shadow page! dom%d count=%d\n",
+           d->domain_id, d->arch.shadow_page_count);
+    printk("Shadow table counts: l1=%d l2=%d hl2=%d snapshot=%d\n",
+           perfc_value(shadow_l1_pages),
+           perfc_value(shadow_l2_pages),
+           perfc_value(hl2_table_pages),
+           perfc_value(snapshot_pages));
+    BUG(); /* XXX FIXME: try a shadow flush to free up some memory. */
+
     return 0;
 }
 
@@ -467,12 +488,12 @@
          * We could proactively fill in PDEs for pages that are already
          * shadowed *and* where the guest PDE has _PAGE_ACCESSED set
          * (restriction required for coherence of the accessed bit). However,
-         * we tried it and it didn't help performance. This is simpler. 
+         * we tried it and it didn't help performance. This is simpler.
          */
         memset(spl2e, 0, DOMAIN_ENTRIES_PER_L2_PAGETABLE*sizeof(l2_pgentry_t));
 
         /* Install hypervisor and 2x linear p.t. mapings. */
-        memcpy(&spl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE], 
+        memcpy(&spl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE],
                &idle_pg_table[DOMAIN_ENTRIES_PER_L2_PAGETABLE],
                HYPERVISOR_ENTRIES_PER_L2_PAGETABLE * sizeof(l2_pgentry_t));
 
@@ -499,7 +520,7 @@
             //
             if ( !get_shadow_ref(hl2mfn) )
                 BUG();
-            
+
             spl2e[l2_table_offset(LINEAR_PT_VIRT_START)] =
                 l2e_from_pfn(hl2mfn, __PAGE_HYPERVISOR);
         }
@@ -509,7 +530,7 @@
     }
     else
     {
-        memset(spl2e, 0, L2_PAGETABLE_ENTRIES*sizeof(l2_pgentry_t));        
+        memset(spl2e, 0, L2_PAGETABLE_ENTRIES*sizeof(l2_pgentry_t));
     }
 
     unmap_domain_page(spl2e);
@@ -520,7 +541,7 @@
 #endif
 
 static void shadow_map_l1_into_current_l2(unsigned long va)
-{ 
+{
     struct vcpu *v = current;
     struct domain *d = v->domain;
     l1_pgentry_t *spl1e;
@@ -573,7 +594,7 @@
 #if CONFIG_PAGING_LEVELS >=4
     if (d->arch.ops->guest_paging_levels == PAGING_L2)
     {
-        /* for 32-bit VMX guest on 64-bit host, 
+        /* for 32-bit VMX guest on 64-bit host,
          * need update two L2 entries each time
          */
         if ( !get_shadow_ref(sl1mfn))
@@ -601,7 +622,7 @@
         l1_pgentry_t sl1e;
         int index = guest_l1_table_offset(va);
         int min = 1, max = 0;
-        
+
         unsigned long entries, pt_va;
         l1_pgentry_t tmp_sl1e;
         guest_l1_pgentry_t tmp_gl1e;//Prepare for double compile
@@ -767,7 +788,7 @@
 
         /* Record the allocation block so it can be correctly freed later. */
         d->arch.out_of_sync_extras_count++;
-        *((struct out_of_sync_entry **)&extra[out_of_sync_extra_size]) = 
+        *((struct out_of_sync_entry **)&extra[out_of_sync_extra_size]) =
             d->arch.out_of_sync_extras;
         d->arch.out_of_sync_extras = &extra[0];
 
@@ -997,7 +1018,7 @@
 {
     struct domain *d = v->domain;
 #if defined (__x86_64__)
-    unsigned long l2mfn = ((v->arch.flags & TF_kernel_mode)? 
+    unsigned long l2mfn = ((v->arch.flags & TF_kernel_mode)?
                           pagetable_get_pfn(v->arch.guest_table) :
                           pagetable_get_pfn(v->arch.guest_table_user));
 #else
@@ -1059,7 +1080,7 @@
         return 1;
 
     __guest_get_l2e(v, va, &l2e);
-    if ( !(guest_l2e_get_flags(l2e) & _PAGE_PRESENT) || 
+    if ( !(guest_l2e_get_flags(l2e) & _PAGE_PRESENT) ||
          (guest_l2e_get_flags(l2e) & _PAGE_PSE))
         return 0;
 
@@ -1132,7 +1153,7 @@
 }
 
 static int fix_entry(
-    struct domain *d, 
+    struct domain *d,
     l1_pgentry_t *pt, u32 *found, int is_l1_shadow, u32 max_refs_to_find)
 {
     l1_pgentry_t old = *pt;
@@ -1171,19 +1192,19 @@
     match = l1e_from_pfn(readonly_gmfn, flags);
 
     if ( shadow_mode_external(d) ) {
-        i = (frame_table[readonly_gmfn].u.inuse.type_info & PGT_va_mask) 
+        i = (frame_table[readonly_gmfn].u.inuse.type_info & PGT_va_mask)
             >> PGT_va_shift;
 
         if ( (i >= 0 && i <= L1_PAGETABLE_ENTRIES) &&
-             !l1e_has_changed(pt[i], match, flags) && 
+             !l1e_has_changed(pt[i], match, flags) &&
              fix_entry(d, &pt[i], &found, is_l1_shadow, max_refs_to_find) &&
              !prediction )
             goto out;
     }
- 
+
     for (i = 0; i < GUEST_L1_PAGETABLE_ENTRIES; i++)
     {
-        if ( unlikely(!l1e_has_changed(pt[i], match, flags)) && 
+        if ( unlikely(!l1e_has_changed(pt[i], match, flags)) &&
              fix_entry(d, &pt[i], &found, is_l1_shadow, max_refs_to_find) )
             break;
     }
@@ -1232,7 +1253,7 @@
     }
 
     if ( shadow_mode_external(d) ) {
-        if (write_refs-- == 0) 
+        if (write_refs-- == 0)
             return 0;
 
          // Use the back pointer to locate the shadow page that can contain
@@ -1252,7 +1273,7 @@
         a = &d->arch.shadow_ht[i];
         while ( a && a->gpfn_and_flags )
         {
-            if ( (a->gpfn_and_flags & PGT_type_mask) == PGT_l1_shadow 
+            if ( (a->gpfn_and_flags & PGT_type_mask) == PGT_l1_shadow
 #if CONFIG_PAGING_LEVELS >= 4
               || (a->gpfn_and_flags & PGT_type_mask) == PGT_fl1_shadow
 #endif
@@ -1361,10 +1382,10 @@
                 if ( (i < min_snapshot) || (i > max_snapshot) ||
                      guest_l1e_has_changed(guest1[i], snapshot1[i], 
PAGE_FLAG_MASK) )
                 {
-                    int error; 
+                    int error;
 
                     error = validate_pte_change(d, guest1[i], &shadow1[i]);
-                    if ( error ==  -1 ) 
+                    if ( error ==  -1 )
                         unshadow_l1 = 1;
                     else {
                         need_flush |= error;
@@ -1451,7 +1472,7 @@
             l2_pgentry_t *guest2 = guest;
             l2_pgentry_t *snapshot2 = snapshot;
             l1_pgentry_t *shadow2 = shadow;
-            
+
             ASSERT(shadow_mode_write_all(d));
             BUG_ON(!shadow_mode_refcounts(d)); // not yet implemented
 
@@ -1611,7 +1632,7 @@
              !shadow_get_page_from_l1e(npte, d) )
             BUG();
         *ppte = npte;
-        set_guest_back_ptr(d, npte, (entry->writable_pl1e) >> PAGE_SHIFT, 
+        set_guest_back_ptr(d, npte, (entry->writable_pl1e) >> PAGE_SHIFT,
                            (entry->writable_pl1e & 
~PAGE_MASK)/sizeof(l1_pgentry_t));
         shadow_put_page_from_l1e(opte, d);
 
@@ -1696,7 +1717,7 @@
 
 static inline int l1pte_read_fault(
     struct domain *d, guest_l1_pgentry_t *gpte_p, l1_pgentry_t *spte_p)
-{ 
+{
     guest_l1_pgentry_t gpte = *gpte_p;
     l1_pgentry_t spte = *spte_p;
     unsigned long pfn = l1e_get_pfn(gpte);
@@ -1738,7 +1759,7 @@
     SH_VVLOG("shadow_fault( va=%lx, code=%lu )",
              va, (unsigned long)regs->error_code);
     perfc_incrc(shadow_fault_calls);
-    
+
     check_pagetable(v, "pre-sf");
 
     /*
@@ -1781,7 +1802,7 @@
     }
 
     /* Write fault? */
-    if ( regs->error_code & 2 )  
+    if ( regs->error_code & 2 )
     {
         int allow_writes = 0;
 
@@ -1795,7 +1816,7 @@
             else
             {
                 /* Write fault on a read-only mapping. */
-                SH_VVLOG("shadow_fault - EXIT: wr fault on RO page (%" PRIpte 
")", 
+                SH_VVLOG("shadow_fault - EXIT: wr fault on RO page (%" PRIpte 
")",
                          l1e_get_intpte(gpte));
                 perfc_incrc(shadow_fault_bail_ro_mapping);
                 goto fail;
@@ -1855,7 +1876,7 @@
     check_pagetable(v, "post-sf");
     return EXCRET_fault_fixed;
 
- fail:
+fail:
     shadow_unlock(d);
     return 0;
 }
@@ -1872,7 +1893,7 @@
     shadow_lock(d);
 
     //printk("%s(va=%p, val=%p)\n", __func__, (void *)va, (void 
*)l1e_get_intpte(val));
-        
+
     // This is actually overkill - we don't need to sync the L1 itself,
     // just everything involved in getting to this L1 (i.e. we need
     // linear_pg_table[l1_linear_offset(va)] to be in sync)...
@@ -1902,7 +1923,7 @@
  * and what it uses to get/maintain that mapping.
  *
  * SHADOW MODE:      none         enable         translate         external
- * 
+ *
  * 4KB things:
  * guest_vtable    lin_l2     mapped per gl2   lin_l2 via hl2   mapped per gl2
  * shadow_vtable     n/a         sh_lin_l2       sh_lin_l2      mapped per gl2
@@ -1927,7 +1948,7 @@
 {
     struct domain *d = v->domain;
 #if defined (__x86_64__)
-    unsigned long gmfn = ((v->arch.flags & TF_kernel_mode)? 
+    unsigned long gmfn = ((v->arch.flags & TF_kernel_mode)?
                           pagetable_get_pfn(v->arch.guest_table) :
                           pagetable_get_pfn(v->arch.guest_table_user));
 #else
@@ -1983,7 +2004,7 @@
     /*
      * arch.shadow_vtable
      */
-    if ( max_mode == SHM_external 
+    if ( max_mode == SHM_external
 #if CONFIG_PAGING_LEVELS >=4
          || max_mode & SHM_enable
 #endif
@@ -2218,7 +2239,7 @@
                page_table_page);
         FAIL("RW2 coherence");
     }
- 
+
     if ( eff_guest_mfn == shadow_mfn )
     {
         if ( level > 1 )
@@ -2268,7 +2289,7 @@
         errors += check_pte(v, p_guest+i, p_shadow+i,
                             p_snapshot ? p_snapshot+i : NULL,
                             1, l2_idx, i);
- 
+
     unmap_domain_page(p_shadow);
     unmap_domain_page(p_guest);
     if ( p_snapshot )
@@ -2304,11 +2325,11 @@
 
 #if 0
     if ( memcmp(&spl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE],
-                &gpl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE], 
+                &gpl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE],
                 ((SH_LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT) -
                  DOMAIN_ENTRIES_PER_L2_PAGETABLE) * sizeof(l2_pgentry_t)) )
     {
-        for ( i = DOMAIN_ENTRIES_PER_L2_PAGETABLE; 
+        for ( i = DOMAIN_ENTRIES_PER_L2_PAGETABLE;
               i < (SH_LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT);
               i++ )
             printk("+++ (%d) %lx %lx\n",i,
@@ -2316,7 +2337,7 @@
         FAILPT("hypervisor entries inconsistent");
     }
 
-    if ( (l2_pgentry_val(spl2e[LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT]) != 
+    if ( (l2_pgentry_val(spl2e[LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT]) !=
           l2_pgentry_val(gpl2e[LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT])) )
         FAILPT("hypervisor linear map inconsistent");
 #endif
@@ -2376,7 +2397,7 @@
 {
     struct domain *d = v->domain;
 #if defined (__x86_64__)
-    pagetable_t pt = ((v->arch.flags & TF_kernel_mode)? 
+    pagetable_t pt = ((v->arch.flags & TF_kernel_mode)?
                       pagetable_get_pfn(v->arch.guest_table) :
                       pagetable_get_pfn(v->arch.guest_table_user));
 #else
@@ -2411,7 +2432,7 @@
         oos_pdes = 1;
         ASSERT(ptbase_mfn);
     }
- 
+
     errors += check_l2_table(v, ptbase_mfn, smfn, oos_pdes);
 
     gpl2e = (l2_pgentry_t *) map_domain_page(ptbase_mfn);
@@ -2542,7 +2563,6 @@
  * The code is for 32-bit VMX gues on 64-bit host.
  * To sync guest L2.
  */
-
 static inline void
 validate_bl2e_change(
   struct domain *d,
@@ -2573,7 +2593,6 @@
             entry_from_pfn(sl1mfn + 1, entry_get_flags(sl2_p[sl2_idx]));
     }
     unmap_domain_page(sl2_p);
-
 }
 
 /*
@@ -2606,9 +2625,8 @@
     }
 
     unmap_domain_page(spl4e);
+
     return smfn;
-
-
 }
 
 static unsigned long shadow_l4_table(
@@ -2641,7 +2659,7 @@
          * We could proactively fill in PDEs for pages that are already
          * shadowed *and* where the guest PDE has _PAGE_ACCESSED set
          * (restriction required for coherence of the accessed bit). However,
-         * we tried it and it didn't help performance. This is simpler. 
+         * we tried it and it didn't help performance. This is simpler.
          */
         memset(spl4e, 0, L4_PAGETABLE_ENTRIES*sizeof(l4_pgentry_t));
 
@@ -2734,7 +2752,7 @@
     }
 }
 
-static void shadow_map_into_current(struct vcpu *v, 
+static void shadow_map_into_current(struct vcpu *v,
   unsigned long va, unsigned int from, unsigned int to)
 {
     pgentry_64_t gle, sle;
@@ -2745,7 +2763,7 @@
         return;
     }
 
-    __rw_entry(v, va, &gle, GUEST_ENTRY | GET_ENTRY | to); 
+    __rw_entry(v, va, &gle, GUEST_ENTRY | GET_ENTRY | to);
     ASSERT(entry_get_flags(gle) & _PAGE_PRESENT);
     gpfn = entry_get_pfn(gle);
 
@@ -2761,7 +2779,7 @@
 /*
  * shadow_set_lxe should be put in shadow.h
  */
-static void shadow_set_l2e_64(unsigned long va, l2_pgentry_t sl2e, 
+static void shadow_set_l2e_64(unsigned long va, l2_pgentry_t sl2e,
   int create_l2_shadow, int put_ref_check)
 {
     struct vcpu *v = current;
@@ -2911,11 +2929,11 @@
         sl2e = l2e_empty();
 
     l1_mfn = ___shadow_status(d, start_gpfn | nx, PGT_fl1_shadow);
-    
+
     /* Check the corresponding l2e */
     if (l1_mfn) {
         /* Why it is PRESENT?*/
-        if ((l2e_get_flags(sl2e) & _PAGE_PRESENT) && 
+        if ((l2e_get_flags(sl2e) & _PAGE_PRESENT) &&
                 l2e_get_pfn(sl2e) == l1_mfn) {
             ESH_LOG("sl2e PRSENT bit is set: %lx, l1_mfn = %lx\n", 
l2e_get_pfn(sl2e), l1_mfn);
         } else {
@@ -2962,7 +2980,7 @@
         sl1e = l1e_from_pfn(mfn, l2e_get_flags(tmp_l2e));
 
         if (!rw) {
-            if ( shadow_mode_log_dirty(d) || 
+            if ( shadow_mode_log_dirty(d) ||
               !(l2e_get_flags(gl2e) & _PAGE_DIRTY) || mfn_is_page_table(mfn) )
             {
                 l1e_remove_flags(sl1e, _PAGE_RW);
@@ -3011,7 +3029,7 @@
  */
 #if defined( GUEST_PGENTRY_32 )
 static inline int guest_page_fault(struct vcpu *v,
-  unsigned long va, unsigned int error_code, 
+  unsigned long va, unsigned int error_code,
   guest_l2_pgentry_t *gpl2e, guest_l1_pgentry_t *gpl1e)
 {
     /* The following check for 32-bit guest on 64-bit host */
@@ -3053,7 +3071,7 @@
 }
 #else
 static inline int guest_page_fault(struct vcpu *v,
-  unsigned long va, unsigned int error_code, 
+  unsigned long va, unsigned int error_code,
   guest_l2_pgentry_t *gpl2e, guest_l1_pgentry_t *gpl1e)
 {
     struct domain *d = v->domain;
@@ -3121,7 +3139,7 @@
 
     perfc_incrc(shadow_fault_calls);
 
-    ESH_LOG("<shadow_fault_64> va=%lx,  rip = %lx, error code = %x\n", 
+    ESH_LOG("<shadow_fault_64> va=%lx,  rip = %lx, error code = %x\n",
             va, regs->eip, regs->error_code);
 
     /*
@@ -3143,12 +3161,12 @@
             v, va, regs->error_code, &gl2e, &gl1e) ) {
         goto fail;
     }
-    
+
     if ( unlikely(!(guest_l2e_get_flags(gl2e) & _PAGE_PSE)) ) {
         /*
          * Handle 4K pages here
          */
-        
+
         /* Write fault? */
         if ( regs->error_code & 2 ) {
             if ( !l1pte_write_fault(v, &gl1e, &sl1e, va) ) {
@@ -3171,7 +3189,7 @@
          */
          if ( unlikely(shadow_mode_log_dirty(d)) )
             __mark_dirty(d, __gpfn_to_mfn(d, l2e_get_pfn(gl2e)));
- 
+
     } else {
         /*
          * Handle 2M pages here
@@ -3239,7 +3257,7 @@
 
     if (guest_page_fault(v, gva, 0, &gl2e, &gl1e))
         return 0;
-    
+
     if (guest_l2e_get_flags(gl2e) & _PAGE_PSE)
         gpa = guest_l2e_get_paddr(gl2e) + (gva & ((1 << 
GUEST_L2_PAGETABLE_SHIFT) - 1));
     else
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 xen/arch/x86/vmx_platform.c
--- a/xen/arch/x86/vmx_platform.c       Tue Nov  1 12:38:20 2005
+++ b/xen/arch/x86/vmx_platform.c       Wed Nov  2 16:29:32 2005
@@ -303,20 +303,20 @@
     mmio_inst->flags = 0;
 }
 
-#define GET_OP_SIZE_FOR_BYTE(op_size)   \
-    do {    \
-     if (rex)   \
-     op_size = BYTE_64;  \
- else    \
-     op_size = BYTE;  \
+#define GET_OP_SIZE_FOR_BYTE(op_size)       \
+    do {                                    \
+        if (rex)                            \
+            op_size = BYTE_64;              \
+        else                                \
+            op_size = BYTE;                 \
     } while(0)
 
 #define GET_OP_SIZE_FOR_NONEBYTE(op_size)   \
-    do {    \
-     if (rex & 0x8)   \
-     op_size = QUAD;  \
- else if (op_size != WORD) \
-     op_size = LONG;  \
+    do {                                    \
+        if (rex & 0x8)                      \
+            op_size = QUAD;                 \
+        else if (op_size != WORD)           \
+            op_size = LONG;                 \
     } while(0)
 
 
@@ -398,8 +398,9 @@
 
     case 0x20: /* and r8, m8 */
         instr->instr = INSTR_AND;
-        GET_OP_SIZE_FOR_BYTE(instr->op_size);
-        return reg_mem(instr->op_size, opcode, instr, rex);
+        instr->op_size = BYTE;
+        GET_OP_SIZE_FOR_BYTE(size_reg);
+        return reg_mem(size_reg, opcode, instr, rex);
 
     case 0x21: /* and r32/16, m32/16 */
         instr->instr = INSTR_AND;
@@ -413,8 +414,9 @@
 
     case 0x30: /* xor r8, m8 */
         instr->instr = INSTR_XOR;
-        GET_OP_SIZE_FOR_BYTE(instr->op_size);
-        return reg_mem(instr->op_size, opcode, instr, rex);
+        instr->op_size = BYTE;
+        GET_OP_SIZE_FOR_BYTE(size_reg);
+        return reg_mem(size_reg, opcode, instr, rex);
 
     case 0x31: /* xor r32/16, m32/16 */
         instr->instr = INSTR_XOR;
@@ -592,7 +594,7 @@
         instr->operand[1] = mk_operand(instr->op_size, index, 0, REGISTER);
         return DECODE_success;
 
-    case 0xB7: /* movz m16, r32 */
+    case 0xB7: /* movz m16/m32, r32/r64 */
         instr->instr = INSTR_MOVZ;
         index = get_index(opcode + 1, rex);
         if (rex & 0x8) {
@@ -689,9 +691,9 @@
                           struct mmio_op *mmio_opp, struct cpu_user_regs *regs)
 {
     unsigned long value = 0;
-    int index, size;
-
-    size = operand_size(inst->operand[0]);
+    int index, size_reg;
+
+    size_reg = operand_size(inst->operand[0]);
 
     mmio_opp->flags = inst->flags;
     mmio_opp->instr = inst->instr;
@@ -701,14 +703,17 @@
 
     if (inst->operand[0] & REGISTER) { /* dest is memory */
         index = operand_index(inst->operand[0]);
-        value = get_reg_value(size, index, 0, regs);
+        value = get_reg_value(size_reg, index, 0, regs);
         send_mmio_req(type, gpa, 1, inst->op_size, value, IOREQ_WRITE, 0);
     } else if (inst->operand[0] & IMMEDIATE) { /* dest is memory */
         value = inst->immediate;
         send_mmio_req(type, gpa, 1, inst->op_size, value, IOREQ_WRITE, 0);
     } else if (inst->operand[0] & MEMORY) { /* dest is register */
         /* send the request and wait for the value */
-        send_mmio_req(type, gpa, 1, inst->op_size, 0, IOREQ_READ, 0);
+        if (inst->instr == INSTR_MOVZ)
+            send_mmio_req(type, gpa, 1, size_reg, 0, IOREQ_READ, 0);
+        else
+            send_mmio_req(type, gpa, 1, inst->op_size, 0, IOREQ_READ, 0);
     } else {
         printf("mmio_operands: invalid operand\n");
         domain_crash_synchronous();
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 xen/common/trace.c
--- a/xen/common/trace.c        Tue Nov  1 12:38:20 2005
+++ b/xen/common/trace.c        Wed Nov  2 16:29:32 2005
@@ -260,7 +260,7 @@
     }
 
     rec = &t_recs[smp_processor_id()][buf->prod % nr_recs];
-    rdtscll(rec->cycles);
+    rec->cycles  = (u64)get_cycles();
     rec->event   = event;
     rec->data[0] = d1;
     rec->data[1] = d2;
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 xen/include/asm-x86/time.h
--- a/xen/include/asm-x86/time.h        Tue Nov  1 12:38:20 2005
+++ b/xen/include/asm-x86/time.h        Wed Nov  2 16:29:32 2005
@@ -1,6 +1,8 @@
 
 #ifndef __X86_TIME_H__
 #define __X86_TIME_H__
+
+#include <asm/msr.h>
 
 extern int timer_ack;
 
@@ -10,4 +12,13 @@
 struct domain;
 extern void init_domain_time(struct domain *d);
 
+typedef u64 cycles_t;
+
+static inline cycles_t get_cycles(void)
+{
+    cycles_t c;
+    rdtscll(c);
+    return c;
+}
+
 #endif /* __X86_TIME_H__ */
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 patches/linux-2.6.12/cpu-hotplug-init.patch
--- /dev/null   Tue Nov  1 12:38:20 2005
+++ b/patches/linux-2.6.12/cpu-hotplug-init.patch       Wed Nov  2 16:29:32 2005
@@ -0,0 +1,34 @@
+diff -ur linux-2.6.12.orig/include/linux/init.h 
linux-2.6.12/include/linux/init.h
+--- linux-2.6.12.orig/include/linux/init.h     2005-11-01 14:52:28.656025573 
+0000
++++ linux-2.6.12/include/linux/init.h  2005-11-01 14:53:28.015791549 +0000
+@@ -229,6 +229,18 @@
+ #define __devexitdata __exitdata
+ #endif
+ 
++#ifdef CONFIG_HOTPLUG_CPU
++#define __cpuinit
++#define __cpuinitdata
++#define __cpuexit
++#define __cpuexitdata
++#else
++#define __cpuinit     __init
++#define __cpuinitdata __initdata
++#define __cpuexit __exit
++#define __cpuexitdata __exitdata
++#endif
++
+ /* Functions marked as __devexit may be discarded at kernel link time, 
depending
+    on config options.  Newer versions of binutils detect references from
+    retained sections to discarded sections and flag an error.  Pointers to
+diff -ur linux-2.6.12.orig/arch/x86_64/kernel/i387.c 
linux-2.6.12/arch/x86_64/kernel/i387.c
+--- linux-2.6.12.orig/arch/x86_64/kernel/i387.c        2005-11-01 
15:01:58.932991232 +0000
++++ linux-2.6.12/arch/x86_64/kernel/i387.c     2005-11-01 15:02:09.729312416 
+0000
+@@ -42,7 +42,7 @@
+  * Called at bootup to set up the initial FPU state that is later cloned
+  * into all processes.
+  */
+-void __init fpu_init(void)
++void __cpuinit fpu_init(void)
+ {
+       unsigned long oldcr0 = read_cr0();
+       extern void __bad_fxsave_alignment(void);
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xend/tests/__init__.py
--- /dev/null   Tue Nov  1 12:38:20 2005
+++ b/tools/python/xen/xend/tests/__init__.py   Wed Nov  2 16:29:32 2005
@@ -0,0 +1,1 @@
+ 
diff -r 5ffe3f16aa52 -r 9cdfcecf4968 tools/python/xen/xend/server/event.py
--- a/tools/python/xen/xend/server/event.py     Tue Nov  1 12:38:20 2005
+++ /dev/null   Wed Nov  2 16:29:32 2005
@@ -1,196 +0,0 @@
-#============================================================================
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of version 2.1 of the GNU Lesser General Public
-# License as published by the Free Software Foundation.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#============================================================================
-# Copyright (C) 2004, 2005 Mike Wray <mike.wray@xxxxxx>
-# Copyright (C) 2005 XenSource Ltd
-#============================================================================
-
-import sys
-import StringIO
-
-from xen.web import protocol, tcp, unix
-
-from xen.xend import scheduler
-from xen.xend import sxp
-from xen.xend import PrettyPrint
-from xen.xend.XendError import XendError
-from xen.xend import XendLogging
-from xen.xend import XendRoot
-
-
-xroot = XendRoot.instance()
-
-
-DEBUG = 0
-
-class EventProtocol(protocol.Protocol):
-    """Asynchronous handler for a connected event socket.
-    """
-
-    def __init__(self, daemon):
-        #protocol.Protocol.__init__(self)
-        self.daemon = daemon
-        # Event queue.
-        self.queue = []
-        self.parser = sxp.Parser()
-        self.pretty = 1
-
-    def dataReceived(self, data):
-        try:
-            self.parser.input(data)
-            while(self.parser.ready()):
-                val = self.parser.get_val()
-                res = self.dispatch(val)
-                self.send_result(res)
-            if self.parser.at_eof():
-                self.loseConnection()
-        except SystemExit:
-            raise
-        except:
-            self.send_error()
-
-    def loseConnection(self):
-        if self.transport:
-            self.transport.loseConnection()
-        if self.connected:
-            scheduler.now(self.connectionLost)
-
-    def connectionLost(self, reason=None):
-        pass
-
-    def send_reply(self, sxpr):
-        io = StringIO.StringIO()
-        if self.pretty:
-            PrettyPrint.prettyprint(sxpr, out=io)
-        else:
-            sxp.show(sxpr, out=io)
-        print >> io
-        io.seek(0)
-        if self.transport:
-            return self.transport.write(io.getvalue())
-        else:
-            return 0
-
-    def send_result(self, res):
-        if res is None:
-            resp = ['ok']
-        else:
-            resp = ['ok', res]
-        return self.send_reply(resp)
-
-    def send_error(self):
-        (extype, exval) = sys.exc_info()[:2]
-        return self.send_reply(['err',
-                                ['type', str(extype)],
-                                ['value', str(exval)]])
-
-    def send_event(self, val):
-        return self.send_reply(['event', val[0], val[1]])
-
-    def queue_event(self, name, v):
-        # Despite the name we don't queue the event here.
-        # We send it because the transport will queue it.
-        self.send_event([name, v])
-        
-    def opname(self, name):
-         return 'op_' + name.replace('.', '_')
-
-    def operror(self, name, req):
-        raise XendError('Invalid operation: ' +name)
-
-    def dispatch(self, req):
-        op_name = sxp.name(req)
-        op_method_name = self.opname(op_name)
-        op_method = getattr(self, op_method_name, self.operror)
-        return op_method(op_name, req)
-
-    def op_help(self, _1, _2):
-        def nameop(x):
-            if x.startswith('op_'):
-                return x[3:].replace('_', '.')
-            else:
-                return x
-        
-        l = [ nameop(k) for k in dir(self) if k.startswith('op_') ]
-        return l
-
-    def op_quit(self, _1, _2):
-        self.loseConnection()
-
-    def op_exit(self, _1, _2):
-        sys.exit(0)
-
-    def op_pretty(self, _1, _2):
-        self.pretty = 1
-
-    def op_info(self, _1, _2):
-        val = ['info']
-        #val += self.daemon.blkifs()
-        #val += self.daemon.netifs()
-        #val += self.daemon.usbifs()
-        return val
-
-    def op_trace(self, _, v):
-        mode = (v[1] == 'on')
-        self.daemon.tracing(mode)
-
-    def op_log_stderr(self, _, v):
-        mode = v[1]
-        if mode == 'on':
-            XendLogging.addLogStderr()
-        else:
-            XendLogging.removeLogStderr()
-
-    def op_domain_ls(self, _1, _2):
-        xd = xroot.get_component("xen.xend.XendDomain")
-        return xd.list_names()
-
-    def op_domain_configure(self, _, v):
-        domid = sxp.child_value(v, "dom")
-        config = sxp.child_value(v, "config")
-        if domid is None:
-            raise XendError("missing domain id")
-        if config is None:
-            raise XendError("missing domain config")
-        xd = xroot.get_component("xen.xend.XendDomain")
-        xd.domain_configure(domid, config)
-
-    def op_domain_unpause(self, _, v):
-        domid = sxp.child_value(v, "dom")
-        if domid is None:
-            raise XendError("missing domain id")
-        xd = xroot.get_component("xen.xend.XendDomain")
-        xd.domain_unpause(domid)
-
-class EventFactory(protocol.ServerFactory):
-    """Asynchronous handler for the event server socket.
-    """
-
-    def __init__(self, daemon):
-        protocol.ServerFactory.__init__(self)
-        self.daemon = daemon
-
-    def buildProtocol(self, _):
-        return EventProtocol(self.daemon)
-
-def listenEvent(daemon):
-    factory = EventFactory(daemon)
-    if xroot.get_xend_unix_server():
-        path = '/var/lib/xend/event-socket'
-        unix.listenUNIX(path, factory)
-    if xroot.get_xend_http_server():
-        port = xroot.get_xend_event_port()
-        interface = xroot.get_xend_address()
-        l = tcp.listenTCP(port, factory, interface=interface)
-        l.setCloExec()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.