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

[Xen-changelog] [xen-unstable] merge with xen-unstable.hg



# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Node ID 970ff2ba748f0c81c764897be23849603a7f9b5b
# Parent  968caf47b548be3fa3d15b92fa74dfca3a9e24a0
# Parent  da87dc126b33d771f50336de30330c81d8eed32d
merge with xen-unstable.hg
---
 patches/linux-2.6.16.33/kexec-generic.patch                     |  213 -
 patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-xen-i386.patch   |  105 
 patches/linux-2.6.16.33/linux-2.6.19-rc1-kexec-xen-x86_64.patch |  209 -
 docs/xen-api/xenapi-datamodel.tex                               | 1931 
++++++----
 linux-2.6-xen-sparse/arch/i386/kernel/crash.c                   |  187 
 linux-2.6-xen-sparse/arch/i386/kernel/machine_kexec.c           |  129 
 linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c                |   26 
 linux-2.6-xen-sparse/arch/x86_64/kernel/crash.c                 |  190 
 linux-2.6-xen-sparse/arch/x86_64/kernel/machine_kexec.c         |  279 +
 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c                  |   62 
 linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c           |   38 
 linux-2.6-xen-sparse/drivers/xen/core/smpboot.c                 |   72 
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c              |   13 
 linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile                |   10 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c         |    1 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c          |    2 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h          |    1 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.h          |    2 
 linux-2.6-xen-sparse/include/asm-i386/kexec.h                   |  117 
 linux-2.6-xen-sparse/include/asm-x86_64/kexec.h                 |  109 
 linux-2.6-xen-sparse/include/linux/kexec.h                      |  152 
 linux-2.6-xen-sparse/kernel/kexec.c                             | 1105 +++++
 patches/linux-2.6.16.33/series                                  |    3 
 tools/examples/init.d/xendomains                                |    9 
 tools/examples/xm-config.xml                                    |   43 
 tools/firmware/vmxassist/head.S                                 |    2 
 tools/firmware/vmxassist/setup.c                                |    4 
 tools/firmware/vmxassist/vm86.c                                 |  213 -
 tools/ioemu/hw/tpm_tis.c                                        |   12 
 tools/ioemu/hw/usb-hid.c                                        |   19 
 tools/ioemu/hw/usb-uhci.c                                       |   42 
 tools/ioemu/target-i386-dm/cpu.h                                |    3 
 tools/ioemu/target-i386-dm/exec-dm.c                            |   17 
 tools/ioemu/vl.c                                                |  154 
 tools/ioemu/vl.h                                                |   20 
 tools/libxc/ia64/xc_ia64_linux_save.c                           |    2 
 tools/libxc/xc_core.c                                           |    4 
 tools/libxc/xc_domain.c                                         |   46 
 tools/libxc/xc_hvm_build.c                                      |   16 
 tools/libxc/xc_linux_build.c                                    |   16 
 tools/libxc/xc_load_elf.c                                       |  103 
 tools/libxc/xc_private.c                                        |   89 
 tools/libxc/xc_private.h                                        |   20 
 tools/libxc/xenctrl.h                                           |   46 
 tools/python/xen/lowlevel/xc/xc.c                               |  130 
 tools/python/xen/web/httpserver.py                              |   44 
 tools/python/xen/xend/XendAPI.py                                |   35 
 tools/python/xen/xend/XendCheckpoint.py                         |    1 
 tools/python/xen/xend/XendConfig.py                             |   85 
 tools/python/xen/xend/XendDomain.py                             |   17 
 tools/python/xen/xend/XendDomainInfo.py                         |   91 
 tools/python/xen/xend/image.py                                  |   12 
 tools/python/xen/xend/server/DevController.py                   |    6 
 tools/python/xen/xend/server/SrvDaemon.py                       |    2 
 tools/python/xen/xend/server/SrvDomain.py                       |   13 
 tools/python/xen/xend/server/SrvDomainDir.py                    |   42 
 tools/python/xen/xend/server/SrvServer.py                       |   24 
 tools/python/xen/xend/server/blkif.py                           |    2 
 tools/python/xen/xm/XenAPI.py                                   |  132 
 tools/python/xen/xm/create.py                                   |    6 
 tools/python/xen/xm/main.py                                     |  135 
 tools/python/xen/xm/migrate.py                                  |    3 
 tools/python/xen/xm/new.py                                      |    5 
 tools/python/xen/xm/shutdown.py                                 |    4 
 tools/xm-test/ramdisk/Makefile.am                               |    8 
 xen/arch/x86/boot/x86_32.S                                      |    9 
 xen/arch/x86/boot/x86_64.S                                      |    9 
 xen/arch/x86/crash.c                                            |   12 
 xen/arch/x86/domain.c                                           |    4 
 xen/arch/x86/mm.c                                               |  101 
 xen/arch/x86/mm/shadow/common.c                                 |   10 
 xen/arch/x86/mm/shadow/multi.c                                  |    3 
 xen/arch/x86/setup.c                                            |   11 
 xen/arch/x86/traps.c                                            |   31 
 xen/arch/x86/x86_32/domain_page.c                               |   36 
 xen/arch/x86/x86_32/entry.S                                     |    8 
 xen/arch/x86/x86_32/mm.c                                        |   35 
 xen/arch/x86/x86_64/entry.S                                     |    6 
 xen/arch/x86/x86_64/mm.c                                        |   31 
 xen/common/domctl.c                                             |    2 
 xen/common/kexec.c                                              |   15 
 xen/include/asm-x86/domain.h                                    |   11 
 xen/include/asm-x86/page.h                                      |   15 
 xen/include/asm-x86/x86_32/page-2level.h                        |    3 
 xen/include/asm-x86/x86_32/page-3level.h                        |    7 
 xen/include/asm-x86/x86_64/page.h                               |    3 
 xen/include/public/domctl.h                                     |    2 
 xen/include/public/kexec.h                                      |    3 
 xen/include/public/memory.h                                     |   17 
 xen/include/xen/domain_page.h                                   |    9 
 xen/include/xen/multiboot.h                                     |   35 
 91 files changed, 5153 insertions(+), 1908 deletions(-)

diff -r 968caf47b548 -r 970ff2ba748f docs/xen-api/xenapi-datamodel.tex
--- a/docs/xen-api/xenapi-datamodel.tex Thu Dec 07 16:18:55 2006 -0700
+++ b/docs/xen-api/xenapi-datamodel.tex Fri Dec 08 09:09:18 2006 -0700
@@ -23,7 +23,7 @@ Name & Description \\
 Name & Description \\
 \hline
 {\tt session} & A session \\
-{\tt task} & A longrunning asynchronous task \\
+{\tt task} & A long-running asynchronous task \\
 {\tt VM} & A virtual machine (or 'guest') \\
 {\tt host} & A physical host \\
 {\tt host\_cpu} & A physical CPU \\
@@ -109,6 +109,7 @@ The following enumeration types are used
 \hline
 \end{longtable}
 
+\vspace{1cm}
 \begin{longtable}{|ll|}
 \hline
 {\tt enum vdi\_type} & \\
@@ -130,6 +131,17 @@ The following enumeration types are used
 \hspace{0.5cm}{\tt Suspended} & Suspended \\
 \hspace{0.5cm}{\tt ShuttingDown} & Shutting Down \\
 \hspace{0.5cm}{\tt Unknown} & Some other unknown state \\
+\hline
+\end{longtable}
+
+\vspace{1cm}
+\begin{longtable}{|ll|}
+\hline
+{\tt enum task\_status\_type} & \\
+\hline
+\hspace{0.5cm}{\tt pending} & task is in progress \\
+\hspace{0.5cm}{\tt success} & task was completed successfully \\
+\hspace{0.5cm}{\tt failure} & task has failed \\
 \hline
 \end{longtable}
 
@@ -254,6 +266,16 @@ The following enumeration types are used
 \vspace{1cm}
 \begin{longtable}{|ll|}
 \hline
+{\tt enum vbd\_type} & \\
+\hline
+\hspace{0.5cm}{\tt CD} & VBD will appear to guest as CD \\
+\hspace{0.5cm}{\tt Disk} & VBD will appear to guest as disk \\
+\hline
+\end{longtable}
+
+\vspace{1cm}
+\begin{longtable}{|ll|}
+\hline
 {\tt enum driver\_type} & \\
 \hline
 \hspace{0.5cm}{\tt ioemu} & use hardware emulation \\
@@ -273,6 +295,7 @@ The following enumeration types are used
 \hline
 Quals & Field & Type & Description \\
 \hline
+$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object 
reference \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt this\_host} & host ref & Currently 
connected host \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt this\_user} & user ref & Currently 
connected user \\
 \hline
@@ -333,10 +356,42 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~get\_uuid}
+
+{\bf Overview:} 
+Get the uuid field of the given session.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_uuid (session_id s, session ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt session ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_this\_host}
 
 {\bf Overview:} 
-get accessor message derived from field this\_host of object session
+Get the this\_host field of the given session.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) get_this_host (session_id s, session ref 
self)\end{verbatim}
@@ -349,7 +404,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt session ref } & self & object instance \\ \hline 
+{\tt session ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -368,7 +423,7 @@ value of the field
 \subsubsection{RPC name:~get\_this\_user}
 
 {\bf Overview:} 
-get accessor message derived from field this\_user of object session
+Get the this\_user field of the given session.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (user ref) get_this_user (session_id s, session ref 
self)\end{verbatim}
@@ -381,7 +436,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt session ref } & self & object instance \\ \hline 
+{\tt session ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -400,7 +455,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class session
+Create a new session instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (session ref) create (session_id s, session record 
args)\end{verbatim}
@@ -432,7 +487,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class session
+Destroy the specified session instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, session ref self)\end{verbatim}
@@ -445,7 +500,7 @@ destructor for class session
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt session ref } & self & object instance \\ \hline 
+{\tt session ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -464,7 +519,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the session instance with a particular uuid
+Get a reference to the session instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (session ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -496,7 +551,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class session
+Get a record containing the current state of the given session.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (session record) get_record (session_id s, session ref 
self)\end{verbatim}
@@ -533,89 +588,321 @@ all fields from the object
 \begin{longtable}{|lllp{0.38\textwidth}|}
 \hline
 \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf task} \\
-\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A 
longrunning asynchronous task}} \\
+\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A 
long-running asynchronous task}} \\
 \hline
 Quals & Field & Type & Description \\
 \hline
 $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object 
reference \\
 $\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
 $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg 
human-readable description \\
+$\mathit{RO}_\mathit{run}$ &  {\tt status} & task\_status\_type & current 
status of the task \\
+$\mathit{RO}_\mathit{run}$ &  {\tt progress} & int & if the task is still 
pending, this field contains the estimated percentage complete (0-100). If task 
has completed (successfully or unsuccessfully) this should be 100. \\
+$\mathit{RO}_\mathit{run}$ &  {\tt eta} & datetime & if the task is still 
pending, this field contains the estimated completion time. If the task has 
finished (successfully or not) it contains the time the task finished. \\
+$\mathit{RO}_\mathit{run}$ &  {\tt type} & string & if the task has completed 
successfully, this field contains the type of the encoded result (i.e. name of 
the class whose reference is in the result field). Undefined otherwise. \\
+$\mathit{RO}_\mathit{run}$ &  {\tt result} & string & if the task has 
completed successfully, this field contains the result value (either Void or an 
object reference). Undefined otherwise. \\
+$\mathit{RO}_\mathit{run}$ &  {\tt error\_code} & int & if the task has 
failed, this field contains the error code. Undefined otherwise. \\
+$\mathit{RO}_\mathit{run}$ &  {\tt error\_info} & string Set & if the task has 
failed, this field contains the set of associated error strings. Undefined 
otherwise. \\
 \hline
 \end{longtable}
 \subsection{Additional RPCs associated with class: task}
+\subsubsection{RPC name:~get\_all}
+
+{\bf Overview:} 
+Return a list of all the tasks known to the system
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} ((task ref) Set) get_all (session_id s)\end{verbatim}
+
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+(task ref) Set
+}
+
+
+references to all objects
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_uuid}
+
+{\bf Overview:} 
+Get the uuid field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_uuid (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_name\_label}
+
+{\bf Overview:} 
+Get the name/label field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_name_label (session_id s, task ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~set\_name\_label}
+
+{\bf Overview:} 
+Set the name/label field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_name_label (session_id s, task ref self, string 
value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+{\tt string } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_name\_description}
+
+{\bf Overview:} 
+Get the name/description field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_name_description (session_id s, task ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~set\_name\_description}
+
+{\bf Overview:} 
+Set the name/description field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_name_description (session_id s, task ref self, 
string value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+{\tt string } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_status}
 
 {\bf Overview:} 
-Poll a running asynchronous RPC invocation and query its status
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (uuid ref) get_status (session_id s, task ref 
task)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & task & The ID of the RPC call to poll \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-uuid ref
-}
-
-
-String describing status of specified asynchronous RPC invocation, including 
estimated completion time
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_all\_tasks}
-
-{\bf Overview:} 
-List all asynchronous RPC calls currently executing
-
- \noindent {\bf Signature:} 
-\begin{verbatim} ((task ref) Set) get_all_tasks (session_id s)\end{verbatim}
-
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-(task ref) Set
-}
-
-
-A list of tasks currently executing. Note that
-tasks are associated with users rather than sessions. Thus, if you logout and
-login again with a different session but the same user, this function will 
still
-return the user's running tasks.
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_uuid}
-
-{\bf Overview:} 
-get accessor message derived from field uuid of object task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} string get_uuid (session_id s, task ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
+Get the status field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (task_status_type) get_status (session_id s, task ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+task\_status\_type
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_progress}
+
+{\bf Overview:} 
+Get the progress field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} int get_progress (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+int
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_eta}
+
+{\bf Overview:} 
+Get the eta field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} datetime get_eta (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+datetime
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_type}
+
+{\bf Overview:} 
+Get the type field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_type (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -631,23 +918,23 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
-\subsubsection{RPC name:~get\_name\_label}
-
-{\bf Overview:} 
-get accessor message derived from field name/label of object task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} string get_name_label (session_id s, task ref 
self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
+\subsubsection{RPC name:~get\_result}
+
+{\bf Overview:} 
+Get the result field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} string get_result (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -663,25 +950,119 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
-\subsubsection{RPC name:~set\_name\_label}
-
-{\bf Overview:} 
-set accessor message derived from field name/label of object task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_name_label (session_id s, task ref self, string 
value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
-
-{\tt string } & value & New value to set \\ \hline 
+\subsubsection{RPC name:~get\_error\_code}
+
+{\bf Overview:} 
+Get the error\_code field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} int get_error_code (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+int
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~get\_error\_info}
+
+{\bf Overview:} 
+Get the error\_info field of the given task.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (string Set) get_error_info (session_id s, task ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+string Set
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~create}
+
+{\bf Overview:} 
+Create a new task instance, and return its handle.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (task ref) create (session_id s, task record 
args)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task record } & args & All constructor arguments \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+task ref
+}
+
+
+reference to the newly created object
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~destroy}
+
+{\bf Overview:} 
+Destroy the specified task instance.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void destroy (session_id s, task ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt task ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -697,89 +1078,23 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
-\subsubsection{RPC name:~get\_name\_description}
-
-{\bf Overview:} 
-get accessor message derived from field name/description of object task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} string get_name_description (session_id s, task ref 
self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-string
-}
-
-
-value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_name\_description}
-
-{\bf Overview:} 
-set accessor message derived from field name/description of object task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void set_name_description (session_id s, task ref self, 
string value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
-
-{\tt string } & value & New value to set \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~create}
-
-{\bf Overview:} 
-constructor for class task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (task ref) create (session_id s, task record 
args)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task record } & args & All constructor arguments \\ \hline 
+\subsubsection{RPC name:~get\_by\_uuid}
+
+{\bf Overview:} 
+Get a reference to the task instance with the specified UUID.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (task ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt string } & uuid & UUID of object to return \\ \hline 
 
 \end{tabular}
 
@@ -791,70 +1106,6 @@ task ref
 }
 
 
-reference to the newly created object
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~destroy}
-
-{\bf Overview:} 
-destructor for class task
-
- \noindent {\bf Signature:} 
-\begin{verbatim} void destroy (session_id s, task ref self)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt task ref } & self & object instance \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-void
-}
-
-
-
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~get\_by\_uuid}
-
-{\bf Overview:} 
-returns the task instance with a particular uuid
-
- \noindent {\bf Signature:} 
-\begin{verbatim} (task ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
- 
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt string } & uuid & UUID of object to return \\ \hline 
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:} 
-{\tt 
-task ref
-}
-
-
 reference to the object
 \vspace{0.3cm}
 \vspace{0.3cm}
@@ -862,7 +1113,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class task
+Get a record containing the current state of the given task.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (task record) get_record (session_id s, task ref 
self)\end{verbatim}
@@ -894,7 +1145,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the task instance with a particular name label
+Get all the task instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((task ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -941,15 +1192,16 @@ Quals & Field & Type & Description \\
 $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg 
human-readable description \\
 $\mathit{RW}$ &  {\tt user\_version} & int & a user version number for this 
machine \\
 $\mathit{RW}$ &  {\tt is\_a\_template} & bool & true if this is a template. 
Template VMs can never be started, they are used only for cloning other VMs \\
+$\mathit{RW}$ &  {\tt auto\_power\_on} & bool & true if this VM should be 
started automatically after host boot \\
 $\mathit{RO}_\mathit{run}$ &  {\tt resident\_on} & host ref & the host the VM 
is currently resident on \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_max} & int & Statically-set 
(i.e. absolute) maximum \\
-$\mathit{RW}$ &  {\tt memory/dynamic\_max} & int & Dynamic maximum \\
-$\mathit{RO}_\mathit{run}$ &  {\tt memory/actual} & int & Guest's actual usage 
\\
-$\mathit{RW}$ &  {\tt memory/dynamic\_min} & int & Dynamic minimum \\
-$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_min} & int & Statically-set 
(i.e. absolute) mininum \\
+$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_max} & int & Statically-set 
(i.e. absolute) maximum (bytes) \\
+$\mathit{RW}$ &  {\tt memory/dynamic\_max} & int & Dynamic maximum (bytes) \\
+$\mathit{RO}_\mathit{run}$ &  {\tt memory/actual} & int & Guest's actual usage 
(bytes) \\
+$\mathit{RW}$ &  {\tt memory/dynamic\_min} & int & Dynamic minimum (bytes) \\
+$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_min} & int & Statically-set 
(i.e. absolute) mininum (bytes) \\
 $\mathit{RW}$ &  {\tt VCPUs/policy} & string & the name of the VCPU scheduling 
policy to be applied \\
 $\mathit{RW}$ &  {\tt VCPUs/params} & string & string-encoded parameters 
passed to selected VCPU policy \\
-$\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/number} & int & Current number of 
VCPUs \\
+$\mathit{RW}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
 $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ 
float) Map & Utilisation for all of guest's current VCPUs \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt VCPUs/features/required} & (cpu\_feature) 
Set & CPU features the guest demands the host supports \\
 $\mathit{RO}_\mathit{ins}$ &  {\tt VCPUs/features/can\_use} & (cpu\_feature) 
Set & CPU features the guest can use if available \\
@@ -1335,7 +1587,7 @@ A list of all the IDs of all the VMs
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object VM
+Get the uuid field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, VM ref self)\end{verbatim}
@@ -1348,7 +1600,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1367,7 +1619,7 @@ value of the field
 \subsubsection{RPC name:~get\_power\_state}
 
 {\bf Overview:} 
-get accessor message derived from field power\_state of object VM
+Get the power\_state field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (vm_power_state) get_power_state (session_id s, VM ref 
self)\end{verbatim}
@@ -1380,7 +1632,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1399,7 +1651,7 @@ value of the field
 \subsubsection{RPC name:~get\_name\_label}
 
 {\bf Overview:} 
-get accessor message derived from field name/label of object VM
+Get the name/label field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_label (session_id s, VM ref 
self)\end{verbatim}
@@ -1412,7 +1664,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1431,7 +1683,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_label}
 
 {\bf Overview:} 
-set accessor message derived from field name/label of object VM
+Set the name/label field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_label (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -1444,7 +1696,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -1465,7 +1717,7 @@ void
 \subsubsection{RPC name:~get\_name\_description}
 
 {\bf Overview:} 
-get accessor message derived from field name/description of object VM
+Get the name/description field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_description (session_id s, VM ref 
self)\end{verbatim}
@@ -1478,7 +1730,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1497,7 +1749,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_description}
 
 {\bf Overview:} 
-set accessor message derived from field name/description of object VM
+Set the name/description field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_description (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -1510,7 +1762,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -1531,7 +1783,7 @@ void
 \subsubsection{RPC name:~get\_user\_version}
 
 {\bf Overview:} 
-get accessor message derived from field user\_version of object VM
+Get the user\_version field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_user_version (session_id s, VM ref self)\end{verbatim}
@@ -1544,7 +1796,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1563,7 +1815,7 @@ value of the field
 \subsubsection{RPC name:~set\_user\_version}
 
 {\bf Overview:} 
-set accessor message derived from field user\_version of object VM
+Set the user\_version field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_user_version (session_id s, VM ref self, int 
value)\end{verbatim}
@@ -1576,7 +1828,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -1597,7 +1849,7 @@ void
 \subsubsection{RPC name:~get\_is\_a\_template}
 
 {\bf Overview:} 
-get accessor message derived from field is\_a\_template of object VM
+Get the is\_a\_template field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_is_a_template (session_id s, VM ref 
self)\end{verbatim}
@@ -1610,7 +1862,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1629,7 +1881,7 @@ value of the field
 \subsubsection{RPC name:~set\_is\_a\_template}
 
 {\bf Overview:} 
-set accessor message derived from field is\_a\_template of object VM
+Set the is\_a\_template field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_is_a_template (session_id s, VM ref self, bool 
value)\end{verbatim}
@@ -1642,7 +1894,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -1660,10 +1912,76 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~get\_auto\_power\_on}
+
+{\bf Overview:} 
+Get the auto\_power\_on field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} bool get_auto_power_on (session_id s, VM ref 
self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+bool
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~set\_auto\_power\_on}
+
+{\bf Overview:} 
+Set the auto\_power\_on field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_auto_power_on (session_id s, VM ref self, bool 
value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+{\tt bool } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_resident\_on}
 
 {\bf Overview:} 
-get accessor message derived from field resident\_on of object VM
+Get the resident\_on field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) get_resident_on (session_id s, VM ref 
self)\end{verbatim}
@@ -1676,7 +1994,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1695,7 +2013,7 @@ value of the field
 \subsubsection{RPC name:~get\_memory\_static\_max}
 
 {\bf Overview:} 
-get accessor message derived from field memory/static\_max of object VM
+Get the memory/static\_max field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_memory_static_max (session_id s, VM ref 
self)\end{verbatim}
@@ -1708,7 +2026,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1727,7 +2045,7 @@ value of the field
 \subsubsection{RPC name:~get\_memory\_dynamic\_max}
 
 {\bf Overview:} 
-get accessor message derived from field memory/dynamic\_max of object VM
+Get the memory/dynamic\_max field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_memory_dynamic_max (session_id s, VM ref 
self)\end{verbatim}
@@ -1740,7 +2058,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1759,7 +2077,7 @@ value of the field
 \subsubsection{RPC name:~set\_memory\_dynamic\_max}
 
 {\bf Overview:} 
-set accessor message derived from field memory/dynamic\_max of object VM
+Set the memory/dynamic\_max field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_memory_dynamic_max (session_id s, VM ref self, int 
value)\end{verbatim}
@@ -1772,7 +2090,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -1793,7 +2111,7 @@ void
 \subsubsection{RPC name:~get\_memory\_actual}
 
 {\bf Overview:} 
-get accessor message derived from field memory/actual of object VM
+Get the memory/actual field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_memory_actual (session_id s, VM ref 
self)\end{verbatim}
@@ -1806,7 +2124,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1825,7 +2143,7 @@ value of the field
 \subsubsection{RPC name:~get\_memory\_dynamic\_min}
 
 {\bf Overview:} 
-get accessor message derived from field memory/dynamic\_min of object VM
+Get the memory/dynamic\_min field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_memory_dynamic_min (session_id s, VM ref 
self)\end{verbatim}
@@ -1838,7 +2156,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1857,7 +2175,7 @@ value of the field
 \subsubsection{RPC name:~set\_memory\_dynamic\_min}
 
 {\bf Overview:} 
-set accessor message derived from field memory/dynamic\_min of object VM
+Set the memory/dynamic\_min field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_memory_dynamic_min (session_id s, VM ref self, int 
value)\end{verbatim}
@@ -1870,7 +2188,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -1891,7 +2209,7 @@ void
 \subsubsection{RPC name:~get\_memory\_static\_min}
 
 {\bf Overview:} 
-get accessor message derived from field memory/static\_min of object VM
+Get the memory/static\_min field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_memory_static_min (session_id s, VM ref 
self)\end{verbatim}
@@ -1904,7 +2222,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1923,7 +2241,7 @@ value of the field
 \subsubsection{RPC name:~get\_VCPUs\_policy}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/policy of object VM
+Get the VCPUs/policy field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_VCPUs_policy (session_id s, VM ref 
self)\end{verbatim}
@@ -1936,7 +2254,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -1955,7 +2273,7 @@ value of the field
 \subsubsection{RPC name:~set\_VCPUs\_policy}
 
 {\bf Overview:} 
-set accessor message derived from field VCPUs/policy of object VM
+Set the VCPUs/policy field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VCPUs_policy (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -1968,7 +2286,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -1989,7 +2307,7 @@ void
 \subsubsection{RPC name:~get\_VCPUs\_params}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/params of object VM
+Get the VCPUs/params field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_VCPUs_params (session_id s, VM ref 
self)\end{verbatim}
@@ -2002,7 +2320,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2021,7 +2339,7 @@ value of the field
 \subsubsection{RPC name:~set\_VCPUs\_params}
 
 {\bf Overview:} 
-set accessor message derived from field VCPUs/params of object VM
+Set the VCPUs/params field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VCPUs_params (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -2034,7 +2352,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -2055,7 +2373,7 @@ void
 \subsubsection{RPC name:~get\_VCPUs\_number}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/number of object VM
+Get the VCPUs/number field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_VCPUs_number (session_id s, VM ref self)\end{verbatim}
@@ -2068,7 +2386,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2084,10 +2402,44 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~set\_VCPUs\_number}
+
+{\bf Overview:} 
+Set the VCPUs/number field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_VCPUs_number (session_id s, VM ref self, int 
value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+{\tt int } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_VCPUs\_utilisation}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/utilisation of object VM
+Get the VCPUs/utilisation field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((int -> float) Map) get_VCPUs_utilisation (session_id s, VM 
ref self)\end{verbatim}
@@ -2100,7 +2452,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2119,7 +2471,7 @@ value of the field
 \subsubsection{RPC name:~get\_VCPUs\_features\_required}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/features/required of object VM
+Get the VCPUs/features/required field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_required (session_id 
s, VM ref self)\end{verbatim}
@@ -2132,7 +2484,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2151,7 +2503,7 @@ value of the field
 \subsubsection{RPC name:~get\_VCPUs\_features\_can\_use}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/features/can\_use of object VM
+Get the VCPUs/features/can\_use field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_can_use (session_id s, 
VM ref self)\end{verbatim}
@@ -2164,7 +2516,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2183,7 +2535,7 @@ value of the field
 \subsubsection{RPC name:~get\_VCPUs\_features\_force\_on}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/features/force\_on of object VM
+Get the VCPUs/features/force\_on field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_force_on (session_id 
s, VM ref self)\end{verbatim}
@@ -2196,7 +2548,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2212,6 +2564,40 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~set\_VCPUs\_features\_force\_on}
+
+{\bf Overview:} 
+Set the VCPUs/features/force\_on field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_VCPUs_features_force_on (session_id s, VM ref self, 
(cpu_feature) Set value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+{\tt (cpu\_feature) Set } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~add\_VCPUs\_features\_force\_on}
 
 {\bf Overview:} 
@@ -2228,7 +2614,7 @@ set add message derived from field VCPUs
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt cpu\_feature } & value & New value to add \\ \hline 
 
@@ -2262,7 +2648,7 @@ set remove message derived from field VC
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt cpu\_feature } & value & Value to remove \\ \hline 
 
@@ -2283,7 +2669,7 @@ void
 \subsubsection{RPC name:~get\_VCPUs\_features\_force\_off}
 
 {\bf Overview:} 
-get accessor message derived from field VCPUs/features/force\_off of object VM
+Get the VCPUs/features/force\_off field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_force_off (session_id 
s, VM ref self)\end{verbatim}
@@ -2296,7 +2682,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2312,6 +2698,40 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~set\_VCPUs\_features\_force\_off}
+
+{\bf Overview:} 
+Set the VCPUs/features/force\_off field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_VCPUs_features_force_off (session_id s, VM ref self, 
(cpu_feature) Set value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+{\tt (cpu\_feature) Set } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~add\_VCPUs\_features\_force\_off}
 
 {\bf Overview:} 
@@ -2328,7 +2748,7 @@ set add message derived from field VCPUs
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt cpu\_feature } & value & New value to add \\ \hline 
 
@@ -2362,7 +2782,7 @@ set remove message derived from field VC
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt cpu\_feature } & value & Value to remove \\ \hline 
 
@@ -2383,7 +2803,7 @@ void
 \subsubsection{RPC name:~get\_actions\_after\_shutdown}
 
 {\bf Overview:} 
-get accessor message derived from field actions/after\_shutdown of object VM
+Get the actions/after\_shutdown field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (on_normal_exit) get_actions_after_shutdown (session_id s, VM 
ref self)\end{verbatim}
@@ -2396,7 +2816,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2415,7 +2835,7 @@ value of the field
 \subsubsection{RPC name:~set\_actions\_after\_shutdown}
 
 {\bf Overview:} 
-set accessor message derived from field actions/after\_shutdown of object VM
+Set the actions/after\_shutdown field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_actions_after_shutdown (session_id s, VM ref self, 
on_normal_exit value)\end{verbatim}
@@ -2428,7 +2848,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt on\_normal\_exit } & value & New value to set \\ \hline 
 
@@ -2449,7 +2869,7 @@ void
 \subsubsection{RPC name:~get\_actions\_after\_reboot}
 
 {\bf Overview:} 
-get accessor message derived from field actions/after\_reboot of object VM
+Get the actions/after\_reboot field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (on_normal_exit) get_actions_after_reboot (session_id s, VM 
ref self)\end{verbatim}
@@ -2462,7 +2882,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2481,7 +2901,7 @@ value of the field
 \subsubsection{RPC name:~set\_actions\_after\_reboot}
 
 {\bf Overview:} 
-set accessor message derived from field actions/after\_reboot of object VM
+Set the actions/after\_reboot field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_actions_after_reboot (session_id s, VM ref self, 
on_normal_exit value)\end{verbatim}
@@ -2494,7 +2914,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt on\_normal\_exit } & value & New value to set \\ \hline 
 
@@ -2515,7 +2935,7 @@ void
 \subsubsection{RPC name:~get\_actions\_after\_suspend}
 
 {\bf Overview:} 
-get accessor message derived from field actions/after\_suspend of object VM
+Get the actions/after\_suspend field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (on_normal_exit) get_actions_after_suspend (session_id s, VM 
ref self)\end{verbatim}
@@ -2528,7 +2948,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2547,7 +2967,7 @@ value of the field
 \subsubsection{RPC name:~set\_actions\_after\_suspend}
 
 {\bf Overview:} 
-set accessor message derived from field actions/after\_suspend of object VM
+Set the actions/after\_suspend field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_actions_after_suspend (session_id s, VM ref self, 
on_normal_exit value)\end{verbatim}
@@ -2560,7 +2980,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt on\_normal\_exit } & value & New value to set \\ \hline 
 
@@ -2581,7 +3001,7 @@ void
 \subsubsection{RPC name:~get\_actions\_after\_crash}
 
 {\bf Overview:} 
-get accessor message derived from field actions/after\_crash of object VM
+Get the actions/after\_crash field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (on_crash_behaviour) get_actions_after_crash (session_id s, 
VM ref self)\end{verbatim}
@@ -2594,7 +3014,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2613,7 +3033,7 @@ value of the field
 \subsubsection{RPC name:~set\_actions\_after\_crash}
 
 {\bf Overview:} 
-set accessor message derived from field actions/after\_crash of object VM
+Set the actions/after\_crash field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_actions_after_crash (session_id s, VM ref self, 
on_crash_behaviour value)\end{verbatim}
@@ -2626,7 +3046,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt on\_crash\_behaviour } & value & New value to set \\ \hline 
 
@@ -2660,7 +3080,7 @@ Get the consoles field of the given VM.
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2679,7 +3099,7 @@ value of the field
 \subsubsection{RPC name:~get\_VIFs}
 
 {\bf Overview:} 
-get accessor message derived from field VIFs of object VM
+Get the VIFs field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VIF ref) Set) get_VIFs (session_id s, VM ref 
self)\end{verbatim}
@@ -2692,7 +3112,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2711,7 +3131,7 @@ value of the field
 \subsubsection{RPC name:~get\_VBDs}
 
 {\bf Overview:} 
-get accessor message derived from field VBDs of object VM
+Get the VBDs field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VBD ref) Set) get_VBDs (session_id s, VM ref 
self)\end{verbatim}
@@ -2724,7 +3144,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2743,7 +3163,7 @@ value of the field
 \subsubsection{RPC name:~get\_VTPMs}
 
 {\bf Overview:} 
-get accessor message derived from field VTPMs of object VM
+Get the VTPMs field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VTPM ref) Set) get_VTPMs (session_id s, VM ref 
self)\end{verbatim}
@@ -2756,7 +3176,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2775,7 +3195,7 @@ value of the field
 \subsubsection{RPC name:~get\_bios\_boot}
 
 {\bf Overview:} 
-get accessor message derived from field bios/boot of object VM
+Get the bios/boot field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_bios_boot (session_id s, VM ref self)\end{verbatim}
@@ -2788,7 +3208,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2807,7 +3227,7 @@ value of the field
 \subsubsection{RPC name:~set\_bios\_boot}
 
 {\bf Overview:} 
-set accessor message derived from field bios/boot of object VM
+Set the bios/boot field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_bios_boot (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -2820,7 +3240,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -2841,7 +3261,7 @@ void
 \subsubsection{RPC name:~get\_platform\_std\_VGA}
 
 {\bf Overview:} 
-get accessor message derived from field platform/std\_VGA of object VM
+Get the platform/std\_VGA field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_platform_std_VGA (session_id s, VM ref 
self)\end{verbatim}
@@ -2854,7 +3274,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2873,7 +3293,7 @@ value of the field
 \subsubsection{RPC name:~set\_platform\_std\_VGA}
 
 {\bf Overview:} 
-set accessor message derived from field platform/std\_VGA of object VM
+Set the platform/std\_VGA field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_platform_std_VGA (session_id s, VM ref self, bool 
value)\end{verbatim}
@@ -2886,7 +3306,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -2907,7 +3327,7 @@ void
 \subsubsection{RPC name:~get\_platform\_serial}
 
 {\bf Overview:} 
-get accessor message derived from field platform/serial of object VM
+Get the platform/serial field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_platform_serial (session_id s, VM ref 
self)\end{verbatim}
@@ -2920,7 +3340,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -2939,7 +3359,7 @@ value of the field
 \subsubsection{RPC name:~set\_platform\_serial}
 
 {\bf Overview:} 
-set accessor message derived from field platform/serial of object VM
+Set the platform/serial field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_platform_serial (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -2952,7 +3372,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -2973,7 +3393,7 @@ void
 \subsubsection{RPC name:~get\_platform\_localtime}
 
 {\bf Overview:} 
-get accessor message derived from field platform/localtime of object VM
+Get the platform/localtime field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_platform_localtime (session_id s, VM ref 
self)\end{verbatim}
@@ -2986,7 +3406,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3005,7 +3425,7 @@ value of the field
 \subsubsection{RPC name:~set\_platform\_localtime}
 
 {\bf Overview:} 
-set accessor message derived from field platform/localtime of object VM
+Set the platform/localtime field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_platform_localtime (session_id s, VM ref self, bool 
value)\end{verbatim}
@@ -3018,7 +3438,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -3039,7 +3459,7 @@ void
 \subsubsection{RPC name:~get\_platform\_clock\_offset}
 
 {\bf Overview:} 
-get accessor message derived from field platform/clock\_offset of object VM
+Get the platform/clock\_offset field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_platform_clock_offset (session_id s, VM ref 
self)\end{verbatim}
@@ -3052,7 +3472,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3071,7 +3491,7 @@ value of the field
 \subsubsection{RPC name:~set\_platform\_clock\_offset}
 
 {\bf Overview:} 
-set accessor message derived from field platform/clock\_offset of object VM
+Set the platform/clock\_offset field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_platform_clock_offset (session_id s, VM ref self, 
bool value)\end{verbatim}
@@ -3084,7 +3504,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -3105,7 +3525,7 @@ void
 \subsubsection{RPC name:~get\_platform\_enable\_audio}
 
 {\bf Overview:} 
-get accessor message derived from field platform/enable\_audio of object VM
+Get the platform/enable\_audio field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_platform_enable_audio (session_id s, VM ref 
self)\end{verbatim}
@@ -3118,7 +3538,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3137,7 +3557,7 @@ value of the field
 \subsubsection{RPC name:~set\_platform\_enable\_audio}
 
 {\bf Overview:} 
-set accessor message derived from field platform/enable\_audio of object VM
+Set the platform/enable\_audio field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_platform_enable_audio (session_id s, VM ref self, 
bool value)\end{verbatim}
@@ -3150,7 +3570,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -3171,7 +3591,7 @@ void
 \subsubsection{RPC name:~get\_builder}
 
 {\bf Overview:} 
-get accessor message derived from field builder of object VM
+Get the builder field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_builder (session_id s, VM ref self)\end{verbatim}
@@ -3184,7 +3604,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3203,7 +3623,7 @@ value of the field
 \subsubsection{RPC name:~set\_builder}
 
 {\bf Overview:} 
-set accessor message derived from field builder of object VM
+Set the builder field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_builder (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -3216,7 +3636,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -3237,7 +3657,7 @@ void
 \subsubsection{RPC name:~get\_boot\_method}
 
 {\bf Overview:} 
-get accessor message derived from field boot\_method of object VM
+Get the boot\_method field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (boot_type) get_boot_method (session_id s, VM ref 
self)\end{verbatim}
@@ -3250,7 +3670,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3269,7 +3689,7 @@ value of the field
 \subsubsection{RPC name:~set\_boot\_method}
 
 {\bf Overview:} 
-set accessor message derived from field boot\_method of object VM
+Set the boot\_method field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_boot_method (session_id s, VM ref self, boot_type 
value)\end{verbatim}
@@ -3282,7 +3702,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt boot\_type } & value & New value to set \\ \hline 
 
@@ -3303,7 +3723,7 @@ void
 \subsubsection{RPC name:~get\_kernel\_kernel}
 
 {\bf Overview:} 
-get accessor message derived from field kernel/kernel of object VM
+Get the kernel/kernel field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_kernel_kernel (session_id s, VM ref 
self)\end{verbatim}
@@ -3316,7 +3736,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3335,7 +3755,7 @@ value of the field
 \subsubsection{RPC name:~set\_kernel\_kernel}
 
 {\bf Overview:} 
-set accessor message derived from field kernel/kernel of object VM
+Set the kernel/kernel field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_kernel_kernel (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -3348,7 +3768,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -3369,7 +3789,7 @@ void
 \subsubsection{RPC name:~get\_kernel\_initrd}
 
 {\bf Overview:} 
-get accessor message derived from field kernel/initrd of object VM
+Get the kernel/initrd field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_kernel_initrd (session_id s, VM ref 
self)\end{verbatim}
@@ -3382,7 +3802,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3401,7 +3821,7 @@ value of the field
 \subsubsection{RPC name:~set\_kernel\_initrd}
 
 {\bf Overview:} 
-set accessor message derived from field kernel/initrd of object VM
+Set the kernel/initrd field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_kernel_initrd (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -3414,7 +3834,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -3435,7 +3855,7 @@ void
 \subsubsection{RPC name:~get\_kernel\_args}
 
 {\bf Overview:} 
-get accessor message derived from field kernel/args of object VM
+Get the kernel/args field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_kernel_args (session_id s, VM ref 
self)\end{verbatim}
@@ -3448,7 +3868,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3467,7 +3887,7 @@ value of the field
 \subsubsection{RPC name:~set\_kernel\_args}
 
 {\bf Overview:} 
-set accessor message derived from field kernel/args of object VM
+Set the kernel/args field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_kernel_args (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -3480,7 +3900,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -3501,7 +3921,7 @@ void
 \subsubsection{RPC name:~get\_grub\_cmdline}
 
 {\bf Overview:} 
-get accessor message derived from field grub/cmdline of object VM
+Get the grub/cmdline field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_grub_cmdline (session_id s, VM ref 
self)\end{verbatim}
@@ -3514,7 +3934,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3533,7 +3953,7 @@ value of the field
 \subsubsection{RPC name:~set\_grub\_cmdline}
 
 {\bf Overview:} 
-set accessor message derived from field grub/cmdline of object VM
+Set the grub/cmdline field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_grub_cmdline (session_id s, VM ref self, string 
value)\end{verbatim}
@@ -3546,7 +3966,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -3567,7 +3987,7 @@ void
 \subsubsection{RPC name:~get\_PCI\_bus}
 
 {\bf Overview:} 
-get accessor message derived from field PCI\_bus of object VM
+Get the PCI\_bus field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_PCI_bus (session_id s, VM ref self)\end{verbatim}
@@ -3580,7 +4000,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3599,7 +4019,7 @@ value of the field
 \subsubsection{RPC name:~get\_tools\_version}
 
 {\bf Overview:} 
-get accessor message derived from field tools\_version of object VM
+Get the tools\_version field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((string -> string) Map) get_tools_version (session_id s, VM 
ref self)\end{verbatim}
@@ -3612,7 +4032,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3631,7 +4051,7 @@ value of the field
 \subsubsection{RPC name:~get\_otherConfig}
 
 {\bf Overview:} 
-get accessor message derived from field otherConfig of object VM
+Get the otherConfig field of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((string -> string) Map) get_otherConfig (session_id s, VM 
ref self)\end{verbatim}
@@ -3644,7 +4064,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3660,6 +4080,40 @@ value of the field
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~set\_otherConfig}
+
+{\bf Overview:} 
+Set the otherConfig field of the given VM.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_otherConfig (session_id s, VM ref self, (string -> 
string) Map value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VM ref } & self & reference to the object \\ \hline 
+
+{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~add\_to\_otherConfig}
 
 {\bf Overview:} 
@@ -3676,7 +4130,7 @@ map add message derived from field other
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & key & Key to add \\ \hline 
 
@@ -3712,7 +4166,7 @@ map remove message derived from field ot
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 {\tt string } & key & Key to remove \\ \hline 
 
@@ -3733,7 +4187,7 @@ void
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class VM
+Create a new VM instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) create (session_id s, VM record args)\end{verbatim}
@@ -3765,7 +4219,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class VM
+Destroy the specified VM.  The VM is completely removed from the system.  This 
function can only be called when the VM is in the Halted State.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, VM ref self)\end{verbatim}
@@ -3778,7 +4232,7 @@ destructor for class VM
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VM ref } & self & object instance \\ \hline 
+{\tt VM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -3797,7 +4251,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the VM instance with a particular uuid
+Get a reference to the VM instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
@@ -3829,7 +4283,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class VM
+Get a record containing the current state of the given VM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM record) get_record (session_id s, VM ref 
self)\end{verbatim}
@@ -3861,7 +4315,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the VM instance with a particular name label
+Get all the VM instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VM ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -4064,7 +4518,7 @@ A list of all the IDs of all the hosts
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object host
+Get the uuid field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, host ref self)\end{verbatim}
@@ -4077,7 +4531,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4096,7 +4550,7 @@ value of the field
 \subsubsection{RPC name:~get\_name\_label}
 
 {\bf Overview:} 
-get accessor message derived from field name/label of object host
+Get the name/label field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_label (session_id s, host ref 
self)\end{verbatim}
@@ -4109,7 +4563,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4128,7 +4582,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_label}
 
 {\bf Overview:} 
-set accessor message derived from field name/label of object host
+Set the name/label field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_label (session_id s, host ref self, string 
value)\end{verbatim}
@@ -4141,7 +4595,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -4162,7 +4616,7 @@ void
 \subsubsection{RPC name:~get\_name\_description}
 
 {\bf Overview:} 
-get accessor message derived from field name/description of object host
+Get the name/description field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_description (session_id s, host ref 
self)\end{verbatim}
@@ -4175,7 +4629,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4194,7 +4648,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_description}
 
 {\bf Overview:} 
-set accessor message derived from field name/description of object host
+Set the name/description field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_description (session_id s, host ref self, 
string value)\end{verbatim}
@@ -4207,7 +4661,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -4228,7 +4682,7 @@ void
 \subsubsection{RPC name:~get\_software\_version}
 
 {\bf Overview:} 
-get accessor message derived from field software\_version of object host
+Get the software\_version field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((string -> string) Map) get_software_version (session_id s, 
host ref self)\end{verbatim}
@@ -4241,7 +4695,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4260,7 +4714,7 @@ value of the field
 \subsubsection{RPC name:~get\_resident\_VMs}
 
 {\bf Overview:} 
-get accessor message derived from field resident\_VMs of object host
+Get the resident\_VMs field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VM ref) Set) get_resident_VMs (session_id s, host ref 
self)\end{verbatim}
@@ -4273,7 +4727,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4292,7 +4746,7 @@ value of the field
 \subsubsection{RPC name:~get\_PIFs}
 
 {\bf Overview:} 
-get accessor message derived from field PIFs of object host
+Get the PIFs field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((PIF ref) Set) get_PIFs (session_id s, host ref 
self)\end{verbatim}
@@ -4305,7 +4759,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4324,7 +4778,7 @@ value of the field
 \subsubsection{RPC name:~get\_host\_CPUs}
 
 {\bf Overview:} 
-get accessor message derived from field host\_CPUs of object host
+Get the host\_CPUs field of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((host_cpu ref) Set) get_host_CPUs (session_id s, host ref 
self)\end{verbatim}
@@ -4337,7 +4791,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4356,7 +4810,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class host
+Create a new host instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) create (session_id s, host record 
args)\end{verbatim}
@@ -4388,7 +4842,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class host
+Destroy the specified host instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, host ref self)\end{verbatim}
@@ -4401,7 +4855,7 @@ destructor for class host
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host ref } & self & object instance \\ \hline 
+{\tt host ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4420,7 +4874,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the host instance with a particular uuid
+Get a reference to the host instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -4452,7 +4906,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class host
+Get a record containing the current state of the given host.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host record) get_record (session_id s, host ref 
self)\end{verbatim}
@@ -4484,7 +4938,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the host instance with a particular name label
+Get all the host instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((host ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -4539,7 +4993,7 @@ Quals & Field & Type & Description \\
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object host\_cpu
+Get the uuid field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4552,7 +5006,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4571,7 +5025,7 @@ value of the field
 \subsubsection{RPC name:~get\_host}
 
 {\bf Overview:} 
-get accessor message derived from field host of object host\_cpu
+Get the host field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) get_host (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4584,7 +5038,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4603,7 +5057,7 @@ value of the field
 \subsubsection{RPC name:~get\_number}
 
 {\bf Overview:} 
-get accessor message derived from field number of object host\_cpu
+Get the number field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_number (session_id s, host_cpu ref self)\end{verbatim}
@@ -4616,7 +5070,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4635,7 +5089,7 @@ value of the field
 \subsubsection{RPC name:~get\_vendor}
 
 {\bf Overview:} 
-get accessor message derived from field vendor of object host\_cpu
+Get the vendor field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_vendor (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4648,7 +5102,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4667,7 +5121,7 @@ value of the field
 \subsubsection{RPC name:~get\_speed}
 
 {\bf Overview:} 
-get accessor message derived from field speed of object host\_cpu
+Get the speed field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_speed (session_id s, host_cpu ref self)\end{verbatim}
@@ -4680,7 +5134,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4699,7 +5153,7 @@ value of the field
 \subsubsection{RPC name:~get\_modelname}
 
 {\bf Overview:} 
-get accessor message derived from field modelname of object host\_cpu
+Get the modelname field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_modelname (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4712,7 +5166,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4731,7 +5185,7 @@ value of the field
 \subsubsection{RPC name:~get\_features}
 
 {\bf Overview:} 
-get accessor message derived from field features of object host\_cpu
+Get the features field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((cpu_feature) Set) get_features (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4744,7 +5198,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4763,7 +5217,7 @@ value of the field
 \subsubsection{RPC name:~get\_utilisation}
 
 {\bf Overview:} 
-get accessor message derived from field utilisation of object host\_cpu
+Get the utilisation field of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_utilisation (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4776,7 +5230,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4795,7 +5249,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class host\_cpu
+Create a new host\_cpu instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host_cpu ref) create (session_id s, host_cpu record 
args)\end{verbatim}
@@ -4827,7 +5281,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class host\_cpu
+Destroy the specified host\_cpu instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, host_cpu ref self)\end{verbatim}
@@ -4840,7 +5294,7 @@ destructor for class host\_cpu
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt host\_cpu ref } & self & object instance \\ \hline 
+{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4859,7 +5313,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the host\_cpu instance with a particular uuid
+Get a reference to the host\_cpu instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host_cpu ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -4891,7 +5345,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class host\_cpu
+Get a record containing the current state of the given host\_cpu.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host_cpu record) get_record (session_id s, host_cpu ref 
self)\end{verbatim}
@@ -4966,7 +5420,7 @@ A list of all the IDs of all the network
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object network
+Get the uuid field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, network ref self)\end{verbatim}
@@ -4979,7 +5433,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -4998,7 +5452,7 @@ value of the field
 \subsubsection{RPC name:~get\_name\_label}
 
 {\bf Overview:} 
-get accessor message derived from field name/label of object network
+Get the name/label field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_label (session_id s, network ref 
self)\end{verbatim}
@@ -5011,7 +5465,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5030,7 +5484,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_label}
 
 {\bf Overview:} 
-set accessor message derived from field name/label of object network
+Set the name/label field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_label (session_id s, network ref self, string 
value)\end{verbatim}
@@ -5043,7 +5497,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5064,7 +5518,7 @@ void
 \subsubsection{RPC name:~get\_name\_description}
 
 {\bf Overview:} 
-get accessor message derived from field name/description of object network
+Get the name/description field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_description (session_id s, network ref 
self)\end{verbatim}
@@ -5077,7 +5531,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5096,7 +5550,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_description}
 
 {\bf Overview:} 
-set accessor message derived from field name/description of object network
+Set the name/description field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_description (session_id s, network ref self, 
string value)\end{verbatim}
@@ -5109,7 +5563,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5130,7 +5584,7 @@ void
 \subsubsection{RPC name:~get\_VIFs}
 
 {\bf Overview:} 
-get accessor message derived from field VIFs of object network
+Get the VIFs field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VIF ref) Set) get_VIFs (session_id s, network ref 
self)\end{verbatim}
@@ -5143,7 +5597,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5162,7 +5616,7 @@ value of the field
 \subsubsection{RPC name:~get\_PIFs}
 
 {\bf Overview:} 
-get accessor message derived from field PIFs of object network
+Get the PIFs field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((PIF ref) Set) get_PIFs (session_id s, network ref 
self)\end{verbatim}
@@ -5175,7 +5629,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5194,7 +5648,7 @@ value of the field
 \subsubsection{RPC name:~get\_default\_gateway}
 
 {\bf Overview:} 
-get accessor message derived from field default\_gateway of object network
+Get the default\_gateway field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_default_gateway (session_id s, network ref 
self)\end{verbatim}
@@ -5207,7 +5661,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5226,7 +5680,7 @@ value of the field
 \subsubsection{RPC name:~set\_default\_gateway}
 
 {\bf Overview:} 
-set accessor message derived from field default\_gateway of object network
+Set the default\_gateway field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_default_gateway (session_id s, network ref self, 
string value)\end{verbatim}
@@ -5239,7 +5693,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5260,7 +5714,7 @@ void
 \subsubsection{RPC name:~get\_default\_netmask}
 
 {\bf Overview:} 
-get accessor message derived from field default\_netmask of object network
+Get the default\_netmask field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_default_netmask (session_id s, network ref 
self)\end{verbatim}
@@ -5273,7 +5727,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5292,7 +5746,7 @@ value of the field
 \subsubsection{RPC name:~set\_default\_netmask}
 
 {\bf Overview:} 
-set accessor message derived from field default\_netmask of object network
+Set the default\_netmask field of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_default_netmask (session_id s, network ref self, 
string value)\end{verbatim}
@@ -5305,7 +5759,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5326,7 +5780,7 @@ void
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class network
+Create a new network instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (network ref) create (session_id s, network record 
args)\end{verbatim}
@@ -5358,7 +5812,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class network
+Destroy the specified network instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, network ref self)\end{verbatim}
@@ -5371,7 +5825,7 @@ destructor for class network
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt network ref } & self & object instance \\ \hline 
+{\tt network ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5390,7 +5844,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the network instance with a particular uuid
+Get a reference to the network instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (network ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -5422,7 +5876,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class network
+Get a record containing the current state of the given network.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (network record) get_record (session_id s, network ref 
self)\end{verbatim}
@@ -5454,7 +5908,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the network instance with a particular name label
+Get all the network instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((network ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -5511,7 +5965,7 @@ Quals & Field & Type & Description \\
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object VIF
+Get the uuid field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, VIF ref self)\end{verbatim}
@@ -5524,7 +5978,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5543,7 +5997,7 @@ value of the field
 \subsubsection{RPC name:~get\_name}
 
 {\bf Overview:} 
-get accessor message derived from field name of object VIF
+Get the name field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name (session_id s, VIF ref self)\end{verbatim}
@@ -5556,7 +6010,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5575,7 +6029,7 @@ value of the field
 \subsubsection{RPC name:~set\_name}
 
 {\bf Overview:} 
-set accessor message derived from field name of object VIF
+Set the name field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name (session_id s, VIF ref self, string 
value)\end{verbatim}
@@ -5588,7 +6042,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5609,7 +6063,7 @@ void
 \subsubsection{RPC name:~get\_type}
 
 {\bf Overview:} 
-get accessor message derived from field type of object VIF
+Get the type field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (driver_type) get_type (session_id s, VIF ref 
self)\end{verbatim}
@@ -5622,7 +6076,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5641,7 +6095,7 @@ value of the field
 \subsubsection{RPC name:~set\_type}
 
 {\bf Overview:} 
-set accessor message derived from field type of object VIF
+Set the type field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_type (session_id s, VIF ref self, driver_type 
value)\end{verbatim}
@@ -5654,7 +6108,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt driver\_type } & value & New value to set \\ \hline 
 
@@ -5675,7 +6129,7 @@ void
 \subsubsection{RPC name:~get\_device}
 
 {\bf Overview:} 
-get accessor message derived from field device of object VIF
+Get the device field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_device (session_id s, VIF ref self)\end{verbatim}
@@ -5688,7 +6142,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5707,7 +6161,7 @@ value of the field
 \subsubsection{RPC name:~set\_device}
 
 {\bf Overview:} 
-set accessor message derived from field device of object VIF
+Set the device field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_device (session_id s, VIF ref self, string 
value)\end{verbatim}
@@ -5720,7 +6174,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5741,7 +6195,7 @@ void
 \subsubsection{RPC name:~get\_network}
 
 {\bf Overview:} 
-get accessor message derived from field network of object VIF
+Get the network field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (network ref) get_network (session_id s, VIF ref 
self)\end{verbatim}
@@ -5754,7 +6208,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5773,7 +6227,7 @@ value of the field
 \subsubsection{RPC name:~set\_network}
 
 {\bf Overview:} 
-set accessor message derived from field network of object VIF
+Set the network field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_network (session_id s, VIF ref self, network ref 
value)\end{verbatim}
@@ -5786,7 +6240,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt network ref } & value & New value to set \\ \hline 
 
@@ -5807,7 +6261,7 @@ void
 \subsubsection{RPC name:~get\_VM}
 
 {\bf Overview:} 
-get accessor message derived from field VM of object VIF
+Get the VM field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) get_VM (session_id s, VIF ref self)\end{verbatim}
@@ -5820,7 +6274,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5839,7 +6293,7 @@ value of the field
 \subsubsection{RPC name:~set\_VM}
 
 {\bf Overview:} 
-set accessor message derived from field VM of object VIF
+Set the VM field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VM (session_id s, VIF ref self, VM ref 
value)\end{verbatim}
@@ -5852,7 +6306,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt VM ref } & value & New value to set \\ \hline 
 
@@ -5873,7 +6327,7 @@ void
 \subsubsection{RPC name:~get\_MAC}
 
 {\bf Overview:} 
-get accessor message derived from field MAC of object VIF
+Get the MAC field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_MAC (session_id s, VIF ref self)\end{verbatim}
@@ -5886,7 +6340,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5905,7 +6359,7 @@ value of the field
 \subsubsection{RPC name:~set\_MAC}
 
 {\bf Overview:} 
-set accessor message derived from field MAC of object VIF
+Set the MAC field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_MAC (session_id s, VIF ref self, string 
value)\end{verbatim}
@@ -5918,7 +6372,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -5939,7 +6393,7 @@ void
 \subsubsection{RPC name:~get\_MTU}
 
 {\bf Overview:} 
-get accessor message derived from field MTU of object VIF
+Get the MTU field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_MTU (session_id s, VIF ref self)\end{verbatim}
@@ -5952,7 +6406,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -5971,7 +6425,7 @@ value of the field
 \subsubsection{RPC name:~set\_MTU}
 
 {\bf Overview:} 
-set accessor message derived from field MTU of object VIF
+Set the MTU field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_MTU (session_id s, VIF ref self, int 
value)\end{verbatim}
@@ -5984,7 +6438,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -6005,7 +6459,7 @@ void
 \subsubsection{RPC name:~get\_io\_read\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/read\_kbs of object VIF
+Get the io/read\_kbs field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_read_kbs (session_id s, VIF ref 
self)\end{verbatim}
@@ -6018,7 +6472,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6037,7 +6491,7 @@ value of the field
 \subsubsection{RPC name:~get\_io\_write\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/write\_kbs of object VIF
+Get the io/write\_kbs field of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_write_kbs (session_id s, VIF ref 
self)\end{verbatim}
@@ -6050,7 +6504,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6069,7 +6523,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class VIF
+Create a new VIF instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VIF ref) create (session_id s, VIF record args)\end{verbatim}
@@ -6101,7 +6555,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class VIF
+Destroy the specified VIF instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, VIF ref self)\end{verbatim}
@@ -6114,7 +6568,7 @@ destructor for class VIF
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VIF ref } & self & object instance \\ \hline 
+{\tt VIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6133,7 +6587,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the VIF instance with a particular uuid
+Get a reference to the VIF instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VIF ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -6165,7 +6619,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class VIF
+Get a record containing the current state of the given VIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VIF record) get_record (session_id s, VIF ref 
self)\end{verbatim}
@@ -6221,7 +6675,7 @@ Quals & Field & Type & Description \\
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object PIF
+Get the uuid field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, PIF ref self)\end{verbatim}
@@ -6234,7 +6688,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6253,7 +6707,7 @@ value of the field
 \subsubsection{RPC name:~get\_name}
 
 {\bf Overview:} 
-get accessor message derived from field name of object PIF
+Get the name field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name (session_id s, PIF ref self)\end{verbatim}
@@ -6266,7 +6720,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6285,7 +6739,7 @@ value of the field
 \subsubsection{RPC name:~set\_name}
 
 {\bf Overview:} 
-set accessor message derived from field name of object PIF
+Set the name field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name (session_id s, PIF ref self, string 
value)\end{verbatim}
@@ -6298,7 +6752,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -6319,7 +6773,7 @@ void
 \subsubsection{RPC name:~get\_network}
 
 {\bf Overview:} 
-get accessor message derived from field network of object PIF
+Get the network field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (network ref) get_network (session_id s, PIF ref 
self)\end{verbatim}
@@ -6332,7 +6786,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6351,7 +6805,7 @@ value of the field
 \subsubsection{RPC name:~set\_network}
 
 {\bf Overview:} 
-set accessor message derived from field network of object PIF
+Set the network field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_network (session_id s, PIF ref self, network ref 
value)\end{verbatim}
@@ -6364,7 +6818,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt network ref } & value & New value to set \\ \hline 
 
@@ -6385,7 +6839,7 @@ void
 \subsubsection{RPC name:~get\_host}
 
 {\bf Overview:} 
-get accessor message derived from field host of object PIF
+Get the host field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (host ref) get_host (session_id s, PIF ref self)\end{verbatim}
@@ -6398,7 +6852,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6417,7 +6871,7 @@ value of the field
 \subsubsection{RPC name:~set\_host}
 
 {\bf Overview:} 
-set accessor message derived from field host of object PIF
+Set the host field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_host (session_id s, PIF ref self, host ref 
value)\end{verbatim}
@@ -6430,7 +6884,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt host ref } & value & New value to set \\ \hline 
 
@@ -6451,7 +6905,7 @@ void
 \subsubsection{RPC name:~get\_MAC}
 
 {\bf Overview:} 
-get accessor message derived from field MAC of object PIF
+Get the MAC field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_MAC (session_id s, PIF ref self)\end{verbatim}
@@ -6464,7 +6918,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6483,7 +6937,7 @@ value of the field
 \subsubsection{RPC name:~set\_MAC}
 
 {\bf Overview:} 
-set accessor message derived from field MAC of object PIF
+Set the MAC field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_MAC (session_id s, PIF ref self, string 
value)\end{verbatim}
@@ -6496,7 +6950,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -6517,7 +6971,7 @@ void
 \subsubsection{RPC name:~get\_MTU}
 
 {\bf Overview:} 
-get accessor message derived from field MTU of object PIF
+Get the MTU field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_MTU (session_id s, PIF ref self)\end{verbatim}
@@ -6530,7 +6984,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6549,7 +7003,7 @@ value of the field
 \subsubsection{RPC name:~set\_MTU}
 
 {\bf Overview:} 
-set accessor message derived from field MTU of object PIF
+Set the MTU field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_MTU (session_id s, PIF ref self, int 
value)\end{verbatim}
@@ -6562,7 +7016,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -6583,7 +7037,7 @@ void
 \subsubsection{RPC name:~get\_VLAN}
 
 {\bf Overview:} 
-get accessor message derived from field VLAN of object PIF
+Get the VLAN field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_VLAN (session_id s, PIF ref self)\end{verbatim}
@@ -6596,7 +7050,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6615,7 +7069,7 @@ value of the field
 \subsubsection{RPC name:~set\_VLAN}
 
 {\bf Overview:} 
-set accessor message derived from field VLAN of object PIF
+Set the VLAN field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VLAN (session_id s, PIF ref self, string 
value)\end{verbatim}
@@ -6628,7 +7082,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -6649,7 +7103,7 @@ void
 \subsubsection{RPC name:~get\_io\_read\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/read\_kbs of object PIF
+Get the io/read\_kbs field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_read_kbs (session_id s, PIF ref 
self)\end{verbatim}
@@ -6662,7 +7116,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6681,7 +7135,7 @@ value of the field
 \subsubsection{RPC name:~get\_io\_write\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/write\_kbs of object PIF
+Get the io/write\_kbs field of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_write_kbs (session_id s, PIF ref 
self)\end{verbatim}
@@ -6694,7 +7148,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6713,7 +7167,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class PIF
+Create a new PIF instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (PIF ref) create (session_id s, PIF record args)\end{verbatim}
@@ -6745,7 +7199,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class PIF
+Destroy the specified PIF instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, PIF ref self)\end{verbatim}
@@ -6758,7 +7212,7 @@ destructor for class PIF
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt PIF ref } & self & object instance \\ \hline 
+{\tt PIF ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6777,7 +7231,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the PIF instance with a particular uuid
+Get a reference to the PIF instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (PIF ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -6809,7 +7263,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class PIF
+Get a record containing the current state of the given PIF.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (PIF record) get_record (session_id s, PIF ref 
self)\end{verbatim}
@@ -6923,7 +7377,7 @@ A list of all the IDs of all the Storage
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object SR
+Get the uuid field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, SR ref self)\end{verbatim}
@@ -6936,7 +7390,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6955,7 +7409,7 @@ value of the field
 \subsubsection{RPC name:~get\_name\_label}
 
 {\bf Overview:} 
-get accessor message derived from field name/label of object SR
+Get the name/label field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_label (session_id s, SR ref 
self)\end{verbatim}
@@ -6968,7 +7422,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -6987,7 +7441,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_label}
 
 {\bf Overview:} 
-set accessor message derived from field name/label of object SR
+Set the name/label field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_label (session_id s, SR ref self, string 
value)\end{verbatim}
@@ -7000,7 +7454,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -7021,7 +7475,7 @@ void
 \subsubsection{RPC name:~get\_name\_description}
 
 {\bf Overview:} 
-get accessor message derived from field name/description of object SR
+Get the name/description field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_description (session_id s, SR ref 
self)\end{verbatim}
@@ -7034,7 +7488,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7053,7 +7507,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_description}
 
 {\bf Overview:} 
-set accessor message derived from field name/description of object SR
+Set the name/description field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_description (session_id s, SR ref self, string 
value)\end{verbatim}
@@ -7066,7 +7520,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -7087,7 +7541,7 @@ void
 \subsubsection{RPC name:~get\_VDIs}
 
 {\bf Overview:} 
-get accessor message derived from field VDIs of object SR
+Get the VDIs field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VDI ref) Set) get_VDIs (session_id s, SR ref 
self)\end{verbatim}
@@ -7100,7 +7554,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7119,7 +7573,7 @@ value of the field
 \subsubsection{RPC name:~get\_virtual\_allocation}
 
 {\bf Overview:} 
-get accessor message derived from field virtual\_allocation of object SR
+Get the virtual\_allocation field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_virtual_allocation (session_id s, SR ref 
self)\end{verbatim}
@@ -7132,7 +7586,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7151,7 +7605,7 @@ value of the field
 \subsubsection{RPC name:~get\_physical\_utilisation}
 
 {\bf Overview:} 
-get accessor message derived from field physical\_utilisation of object SR
+Get the physical\_utilisation field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_physical_utilisation (session_id s, SR ref 
self)\end{verbatim}
@@ -7164,7 +7618,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7183,7 +7637,7 @@ value of the field
 \subsubsection{RPC name:~get\_physical\_size}
 
 {\bf Overview:} 
-get accessor message derived from field physical\_size of object SR
+Get the physical\_size field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_physical_size (session_id s, SR ref 
self)\end{verbatim}
@@ -7196,7 +7650,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7215,7 +7669,7 @@ value of the field
 \subsubsection{RPC name:~get\_type}
 
 {\bf Overview:} 
-get accessor message derived from field type of object SR
+Get the type field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_type (session_id s, SR ref self)\end{verbatim}
@@ -7228,7 +7682,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7247,7 +7701,7 @@ value of the field
 \subsubsection{RPC name:~get\_location}
 
 {\bf Overview:} 
-get accessor message derived from field location of object SR
+Get the location field of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_location (session_id s, SR ref self)\end{verbatim}
@@ -7260,7 +7714,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7279,7 +7733,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class SR
+Create a new SR instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (SR ref) create (session_id s, SR record args)\end{verbatim}
@@ -7311,7 +7765,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class SR
+Destroy the specified SR instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, SR ref self)\end{verbatim}
@@ -7324,7 +7778,7 @@ destructor for class SR
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt SR ref } & self & object instance \\ \hline 
+{\tt SR ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7343,7 +7797,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the SR instance with a particular uuid
+Get a reference to the SR instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (SR ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
@@ -7375,7 +7829,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class SR
+Get a record containing the current state of the given SR.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (SR record) get_record (session_id s, SR ref 
self)\end{verbatim}
@@ -7407,7 +7861,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the SR instance with a particular name label
+Get all the SR instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((SR ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -7533,7 +7987,7 @@ void
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object VDI
+Get the uuid field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, VDI ref self)\end{verbatim}
@@ -7546,7 +8000,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7565,7 +8019,7 @@ value of the field
 \subsubsection{RPC name:~get\_name\_label}
 
 {\bf Overview:} 
-get accessor message derived from field name/label of object VDI
+Get the name/label field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_label (session_id s, VDI ref 
self)\end{verbatim}
@@ -7578,7 +8032,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7597,7 +8051,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_label}
 
 {\bf Overview:} 
-set accessor message derived from field name/label of object VDI
+Set the name/label field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_label (session_id s, VDI ref self, string 
value)\end{verbatim}
@@ -7610,7 +8064,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -7631,7 +8085,7 @@ void
 \subsubsection{RPC name:~get\_name\_description}
 
 {\bf Overview:} 
-get accessor message derived from field name/description of object VDI
+Get the name/description field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_name_description (session_id s, VDI ref 
self)\end{verbatim}
@@ -7644,7 +8098,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7663,7 +8117,7 @@ value of the field
 \subsubsection{RPC name:~set\_name\_description}
 
 {\bf Overview:} 
-set accessor message derived from field name/description of object VDI
+Set the name/description field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_name_description (session_id s, VDI ref self, string 
value)\end{verbatim}
@@ -7676,7 +8130,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -7697,7 +8151,7 @@ void
 \subsubsection{RPC name:~get\_SR}
 
 {\bf Overview:} 
-get accessor message derived from field SR of object VDI
+Get the SR field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (SR ref) get_SR (session_id s, VDI ref self)\end{verbatim}
@@ -7710,7 +8164,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7729,7 +8183,7 @@ value of the field
 \subsubsection{RPC name:~set\_SR}
 
 {\bf Overview:} 
-set accessor message derived from field SR of object VDI
+Set the SR field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_SR (session_id s, VDI ref self, SR ref 
value)\end{verbatim}
@@ -7742,7 +8196,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt SR ref } & value & New value to set \\ \hline 
 
@@ -7763,7 +8217,7 @@ void
 \subsubsection{RPC name:~get\_VBDs}
 
 {\bf Overview:} 
-get accessor message derived from field VBDs of object VDI
+Get the VBDs field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VBD ref) Set) get_VBDs (session_id s, VDI ref 
self)\end{verbatim}
@@ -7776,7 +8230,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7795,7 +8249,7 @@ value of the field
 \subsubsection{RPC name:~get\_virtual\_size}
 
 {\bf Overview:} 
-get accessor message derived from field virtual\_size of object VDI
+Get the virtual\_size field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_virtual_size (session_id s, VDI ref 
self)\end{verbatim}
@@ -7808,7 +8262,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7827,7 +8281,7 @@ value of the field
 \subsubsection{RPC name:~set\_virtual\_size}
 
 {\bf Overview:} 
-set accessor message derived from field virtual\_size of object VDI
+Set the virtual\_size field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_virtual_size (session_id s, VDI ref self, int 
value)\end{verbatim}
@@ -7840,7 +8294,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt int } & value & New value to set \\ \hline 
 
@@ -7861,7 +8315,7 @@ void
 \subsubsection{RPC name:~get\_physical\_utilisation}
 
 {\bf Overview:} 
-get accessor message derived from field physical\_utilisation of object VDI
+Get the physical\_utilisation field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_physical_utilisation (session_id s, VDI ref 
self)\end{verbatim}
@@ -7874,7 +8328,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7893,7 +8347,7 @@ value of the field
 \subsubsection{RPC name:~get\_sector\_size}
 
 {\bf Overview:} 
-get accessor message derived from field sector\_size of object VDI
+Get the sector\_size field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_sector_size (session_id s, VDI ref self)\end{verbatim}
@@ -7906,7 +8360,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7925,7 +8379,7 @@ value of the field
 \subsubsection{RPC name:~get\_type}
 
 {\bf Overview:} 
-get accessor message derived from field type of object VDI
+Get the type field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (vdi_type) get_type (session_id s, VDI ref self)\end{verbatim}
@@ -7938,7 +8392,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7957,7 +8411,7 @@ value of the field
 \subsubsection{RPC name:~get\_parent}
 
 {\bf Overview:} 
-get accessor message derived from field parent of object VDI
+Get the parent field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VDI ref) get_parent (session_id s, VDI ref 
self)\end{verbatim}
@@ -7970,7 +8424,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -7989,7 +8443,7 @@ value of the field
 \subsubsection{RPC name:~get\_children}
 
 {\bf Overview:} 
-get accessor message derived from field children of object VDI
+Get the children field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VDI ref) Set) get_children (session_id s, VDI ref 
self)\end{verbatim}
@@ -8002,7 +8456,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8021,7 +8475,7 @@ value of the field
 \subsubsection{RPC name:~get\_sharable}
 
 {\bf Overview:} 
-get accessor message derived from field sharable of object VDI
+Get the sharable field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_sharable (session_id s, VDI ref self)\end{verbatim}
@@ -8034,7 +8488,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8053,7 +8507,7 @@ value of the field
 \subsubsection{RPC name:~set\_sharable}
 
 {\bf Overview:} 
-set accessor message derived from field sharable of object VDI
+Set the sharable field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_sharable (session_id s, VDI ref self, bool 
value)\end{verbatim}
@@ -8066,7 +8520,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -8087,7 +8541,7 @@ void
 \subsubsection{RPC name:~get\_read\_only}
 
 {\bf Overview:} 
-get accessor message derived from field read\_only of object VDI
+Get the read\_only field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} bool get_read_only (session_id s, VDI ref self)\end{verbatim}
@@ -8100,7 +8554,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8119,7 +8573,7 @@ value of the field
 \subsubsection{RPC name:~set\_read\_only}
 
 {\bf Overview:} 
-set accessor message derived from field read\_only of object VDI
+Set the read\_only field of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_read_only (session_id s, VDI ref self, bool 
value)\end{verbatim}
@@ -8132,7 +8586,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 {\tt bool } & value & New value to set \\ \hline 
 
@@ -8153,7 +8607,7 @@ void
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class VDI
+Create a new VDI instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VDI ref) create (session_id s, VDI record args)\end{verbatim}
@@ -8185,7 +8639,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class VDI
+Destroy the specified VDI instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, VDI ref self)\end{verbatim}
@@ -8198,7 +8652,7 @@ destructor for class VDI
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & object instance \\ \hline 
+{\tt VDI ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8217,7 +8671,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the VDI instance with a particular uuid
+Get a reference to the VDI instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VDI ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -8249,7 +8703,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class VDI
+Get a record containing the current state of the given VDI.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VDI record) get_record (session_id s, VDI ref 
self)\end{verbatim}
@@ -8281,7 +8735,7 @@ all fields from the object
 \subsubsection{RPC name:~get\_by\_name\_label}
 
 {\bf Overview:} 
-returns the VDI instance with a particular name label
+Get all the VDI instances with the given label.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} ((VDI ref) Set) get_by_name_label (session_id s, string 
label)\end{verbatim}
@@ -8327,6 +8781,7 @@ Quals & Field & Type & Description \\
 $\mathit{RW}$ &  {\tt VDI} & VDI ref & the virtual disk \\
 $\mathit{RW}$ &  {\tt device} & string & device seen by the guest e.g. hda1 \\
 $\mathit{RW}$ &  {\tt mode} & vbd\_mode & the mode the disk should be mounted 
with \\
+$\mathit{RW}$ &  {\tt type} & vbd\_type & how the VBD will appear to the guest 
(e.g. disk or CD) \\
 $\mathit{RW}$ &  {\tt driver} & driver\_type & the style of driver \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth 
(KiB/s) \\
 $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth 
(KiB/s) \\
@@ -8370,7 +8825,7 @@ void
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object VBD
+Get the uuid field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, VBD ref self)\end{verbatim}
@@ -8383,7 +8838,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8402,7 +8857,7 @@ value of the field
 \subsubsection{RPC name:~get\_VM}
 
 {\bf Overview:} 
-get accessor message derived from field VM of object VBD
+Get the VM field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) get_VM (session_id s, VBD ref self)\end{verbatim}
@@ -8415,7 +8870,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8434,7 +8889,7 @@ value of the field
 \subsubsection{RPC name:~set\_VM}
 
 {\bf Overview:} 
-set accessor message derived from field VM of object VBD
+Set the VM field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VM (session_id s, VBD ref self, VM ref 
value)\end{verbatim}
@@ -8447,7 +8902,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 {\tt VM ref } & value & New value to set \\ \hline 
 
@@ -8468,7 +8923,7 @@ void
 \subsubsection{RPC name:~get\_VDI}
 
 {\bf Overview:} 
-get accessor message derived from field VDI of object VBD
+Get the VDI field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VDI ref) get_VDI (session_id s, VBD ref self)\end{verbatim}
@@ -8481,7 +8936,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8500,7 +8955,7 @@ value of the field
 \subsubsection{RPC name:~set\_VDI}
 
 {\bf Overview:} 
-set accessor message derived from field VDI of object VBD
+Set the VDI field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_VDI (session_id s, VBD ref self, VDI ref 
value)\end{verbatim}
@@ -8513,7 +8968,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 {\tt VDI ref } & value & New value to set \\ \hline 
 
@@ -8534,7 +8989,7 @@ void
 \subsubsection{RPC name:~get\_device}
 
 {\bf Overview:} 
-get accessor message derived from field device of object VBD
+Get the device field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_device (session_id s, VBD ref self)\end{verbatim}
@@ -8547,7 +9002,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8566,7 +9021,7 @@ value of the field
 \subsubsection{RPC name:~set\_device}
 
 {\bf Overview:} 
-set accessor message derived from field device of object VBD
+Set the device field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_device (session_id s, VBD ref self, string 
value)\end{verbatim}
@@ -8579,7 +9034,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -8600,7 +9055,7 @@ void
 \subsubsection{RPC name:~get\_mode}
 
 {\bf Overview:} 
-get accessor message derived from field mode of object VBD
+Get the mode field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (vbd_mode) get_mode (session_id s, VBD ref self)\end{verbatim}
@@ -8613,7 +9068,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8632,7 +9087,7 @@ value of the field
 \subsubsection{RPC name:~set\_mode}
 
 {\bf Overview:} 
-set accessor message derived from field mode of object VBD
+Set the mode field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_mode (session_id s, VBD ref self, vbd_mode 
value)\end{verbatim}
@@ -8645,7 +9100,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 {\tt vbd\_mode } & value & New value to set \\ \hline 
 
@@ -8663,10 +9118,76 @@ void
 \vspace{0.3cm}
 \vspace{0.3cm}
 \vspace{0.3cm}
+\subsubsection{RPC name:~get\_type}
+
+{\bf Overview:} 
+Get the type field of the given VBD.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} (vbd_type) get_type (session_id s, VBD ref self)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VBD ref } & self & reference to the object \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+vbd\_type
+}
+
+
+value of the field
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
+\subsubsection{RPC name:~set\_type}
+
+{\bf Overview:} 
+Set the type field of the given VBD.
+
+ \noindent {\bf Signature:} 
+\begin{verbatim} void set_type (session_id s, VBD ref self, vbd_type 
value)\end{verbatim}
+
+
+\noindent{\bf Arguments:}
+
+ 
+\vspace{0.3cm}
+\begin{tabular}{|c|c|p{7cm}|}
+ \hline
+{\bf type} & {\bf name} & {\bf description} \\ \hline
+{\tt VBD ref } & self & reference to the object \\ \hline 
+
+{\tt vbd\_type } & value & New value to set \\ \hline 
+
+\end{tabular}
+
+\vspace{0.3cm}
+
+ \noindent {\bf Return Type:} 
+{\tt 
+void
+}
+
+
+
+\vspace{0.3cm}
+\vspace{0.3cm}
+\vspace{0.3cm}
 \subsubsection{RPC name:~get\_driver}
 
 {\bf Overview:} 
-get accessor message derived from field driver of object VBD
+Get the driver field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (driver_type) get_driver (session_id s, VBD ref 
self)\end{verbatim}
@@ -8679,7 +9200,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8698,7 +9219,7 @@ value of the field
 \subsubsection{RPC name:~set\_driver}
 
 {\bf Overview:} 
-set accessor message derived from field driver of object VBD
+Set the driver field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_driver (session_id s, VBD ref self, driver_type 
value)\end{verbatim}
@@ -8711,7 +9232,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 {\tt driver\_type } & value & New value to set \\ \hline 
 
@@ -8732,7 +9253,7 @@ void
 \subsubsection{RPC name:~get\_io\_read\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/read\_kbs of object VBD
+Get the io/read\_kbs field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_read_kbs (session_id s, VBD ref 
self)\end{verbatim}
@@ -8745,7 +9266,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8764,7 +9285,7 @@ value of the field
 \subsubsection{RPC name:~get\_io\_write\_kbs}
 
 {\bf Overview:} 
-get accessor message derived from field io/write\_kbs of object VBD
+Get the io/write\_kbs field of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} float get_io_write_kbs (session_id s, VBD ref 
self)\end{verbatim}
@@ -8777,7 +9298,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8796,7 +9317,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class VBD
+Create a new VBD instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VBD ref) create (session_id s, VBD record args)\end{verbatim}
@@ -8828,7 +9349,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class VBD
+Destroy the specified VBD instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, VBD ref self)\end{verbatim}
@@ -8841,7 +9362,7 @@ destructor for class VBD
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VBD ref } & self & object instance \\ \hline 
+{\tt VBD ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8860,7 +9381,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the VBD instance with a particular uuid
+Get a reference to the VBD instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VBD ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -8892,7 +9413,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class VBD
+Get a record containing the current state of the given VBD.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VBD record) get_record (session_id s, VBD ref 
self)\end{verbatim}
@@ -8944,7 +9465,7 @@ Quals & Field & Type & Description \\
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object VTPM
+Get the uuid field of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, VTPM ref self)\end{verbatim}
@@ -8957,7 +9478,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -8976,7 +9497,7 @@ value of the field
 \subsubsection{RPC name:~get\_VM}
 
 {\bf Overview:} 
-get accessor message derived from field VM of object VTPM
+Get the VM field of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) get_VM (session_id s, VTPM ref self)\end{verbatim}
@@ -8989,7 +9510,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9008,7 +9529,7 @@ value of the field
 \subsubsection{RPC name:~get\_backend}
 
 {\bf Overview:} 
-get accessor message derived from field backend of object VTPM
+Get the backend field of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VM ref) get_backend (session_id s, VTPM ref 
self)\end{verbatim}
@@ -9021,7 +9542,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9040,7 +9561,7 @@ value of the field
 \subsubsection{RPC name:~get\_driver}
 
 {\bf Overview:} 
-get accessor message derived from field driver of object VTPM
+Get the driver field of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (driver_type) get_driver (session_id s, VTPM ref 
self)\end{verbatim}
@@ -9053,7 +9574,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9072,7 +9593,7 @@ value of the field
 \subsubsection{RPC name:~get\_instance}
 
 {\bf Overview:} 
-get accessor message derived from field instance of object VTPM
+Get the instance field of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} int get_instance (session_id s, VTPM ref self)\end{verbatim}
@@ -9085,7 +9606,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9104,7 +9625,7 @@ value of the field
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class VTPM
+Create a new VTPM instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VTPM ref) create (session_id s, VTPM record 
args)\end{verbatim}
@@ -9136,7 +9657,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class VTPM
+Destroy the specified VTPM instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, VTPM ref self)\end{verbatim}
@@ -9149,7 +9670,7 @@ destructor for class VTPM
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VTPM ref } & self & object instance \\ \hline 
+{\tt VTPM ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9168,7 +9689,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the VTPM instance with a particular uuid
+Get a reference to the VTPM instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VTPM ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -9200,7 +9721,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class VTPM
+Get a record containing the current state of the given VTPM.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (VTPM record) get_record (session_id s, VTPM ref 
self)\end{verbatim}
@@ -9360,7 +9881,7 @@ Destroy the specified console instance.
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt console ref } & self & object instance \\ \hline 
+{\tt console ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9392,7 +9913,7 @@ Get the uuid field of the given console.
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt console ref } & self & object instance \\ \hline 
+{\tt console ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9424,7 +9945,7 @@ Get the protocol field of the given cons
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt console ref } & self & object instance \\ \hline 
+{\tt console ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9456,7 +9977,7 @@ Get the uri field of the given console.
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt console ref } & self & object instance \\ \hline 
+{\tt console ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9488,7 +10009,7 @@ Get the VM field of the given console.
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt console ref } & self & object instance \\ \hline 
+{\tt console ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9525,7 +10046,7 @@ Quals & Field & Type & Description \\
 \subsubsection{RPC name:~get\_uuid}
 
 {\bf Overview:} 
-get accessor message derived from field uuid of object user
+Get the uuid field of the given user.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_uuid (session_id s, user ref self)\end{verbatim}
@@ -9538,7 +10059,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt user ref } & self & object instance \\ \hline 
+{\tt user ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9557,7 +10078,7 @@ value of the field
 \subsubsection{RPC name:~get\_short\_name}
 
 {\bf Overview:} 
-get accessor message derived from field short\_name of object user
+Get the short\_name field of the given user.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_short_name (session_id s, user ref 
self)\end{verbatim}
@@ -9570,7 +10091,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt user ref } & self & object instance \\ \hline 
+{\tt user ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9589,7 +10110,7 @@ value of the field
 \subsubsection{RPC name:~get\_fullname}
 
 {\bf Overview:} 
-get accessor message derived from field fullname of object user
+Get the fullname field of the given user.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} string get_fullname (session_id s, user ref 
self)\end{verbatim}
@@ -9602,7 +10123,7 @@ get accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt user ref } & self & object instance \\ \hline 
+{\tt user ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9621,7 +10142,7 @@ value of the field
 \subsubsection{RPC name:~set\_fullname}
 
 {\bf Overview:} 
-set accessor message derived from field fullname of object user
+Set the fullname field of the given user.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void set_fullname (session_id s, user ref self, string 
value)\end{verbatim}
@@ -9634,7 +10155,7 @@ set accessor message derived from field 
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt user ref } & self & object instance \\ \hline 
+{\tt user ref } & self & reference to the object \\ \hline 
 
 {\tt string } & value & New value to set \\ \hline 
 
@@ -9655,7 +10176,7 @@ void
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class user
+Create a new user instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (user ref) create (session_id s, user record 
args)\end{verbatim}
@@ -9687,7 +10208,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class user
+Destroy the specified user instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, user ref self)\end{verbatim}
@@ -9700,7 +10221,7 @@ destructor for class user
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt user ref } & self & object instance \\ \hline 
+{\tt user ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9719,7 +10240,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the user instance with a particular uuid
+Get a reference to the user instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (user ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -9751,7 +10272,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class user
+Get a record containing the current state of the given user.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (user record) get_record (session_id s, user ref 
self)\end{verbatim}
@@ -9832,7 +10353,7 @@ void
 \subsubsection{RPC name:~create}
 
 {\bf Overview:} 
-constructor for class debug
+Create a new debug instance, and return its handle.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (debug ref) create (session_id s, debug record 
args)\end{verbatim}
@@ -9864,7 +10385,7 @@ reference to the newly created object
 \subsubsection{RPC name:~destroy}
 
 {\bf Overview:} 
-destructor for class debug
+Destroy the specified debug instance.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} void destroy (session_id s, debug ref self)\end{verbatim}
@@ -9877,7 +10398,7 @@ destructor for class debug
 \begin{tabular}{|c|c|p{7cm}|}
  \hline
 {\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt debug ref } & self & object instance \\ \hline 
+{\tt debug ref } & self & reference to the object \\ \hline 
 
 \end{tabular}
 
@@ -9896,7 +10417,7 @@ void
 \subsubsection{RPC name:~get\_by\_uuid}
 
 {\bf Overview:} 
-returns the debug instance with a particular uuid
+Get a reference to the debug instance with the specified UUID.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (debug ref) get_by_uuid (session_id s, string 
uuid)\end{verbatim}
@@ -9928,7 +10449,7 @@ reference to the object
 \subsubsection{RPC name:~get\_record}
 
 {\bf Overview:} 
-returns a record containing the state of an instance of class debug
+Get a record containing the current state of the given debug.
 
  \noindent {\bf Signature:} 
 \begin{verbatim} (debug record) get_record (session_id s, debug ref 
self)\end{verbatim}
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Thu Dec 07 16:18:55 
2006 -0700
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Fri Dec 08 09:09:18 
2006 -0700
@@ -1047,9 +1047,9 @@ void time_resume(void)
 #ifdef CONFIG_SMP
 static char timer_name[NR_CPUS][15];
 
-void local_setup_timer(unsigned int cpu)
-{
-       int seq;
+int local_setup_timer(unsigned int cpu)
+{
+       int seq, irq;
 
        BUG_ON(cpu == 0);
 
@@ -1062,15 +1062,17 @@ void local_setup_timer(unsigned int cpu)
        } while (read_seqretry(&xtime_lock, seq));
 
        sprintf(timer_name[cpu], "timer%d", cpu);
-       per_cpu(timer_irq, cpu) =
-               bind_virq_to_irqhandler(
-                       VIRQ_TIMER,
-                       cpu,
-                       timer_interrupt,
-                       SA_INTERRUPT,
-                       timer_name[cpu],
-                       NULL);
-       BUG_ON(per_cpu(timer_irq, cpu) < 0);
+       irq = bind_virq_to_irqhandler(VIRQ_TIMER,
+                                     cpu,
+                                     timer_interrupt,
+                                     SA_INTERRUPT,
+                                     timer_name[cpu],
+                                     NULL);
+       if (irq < 0)
+               return irq;
+       per_cpu(timer_irq, cpu) = irq;
+
+       return 0;
 }
 
 void local_teardown_timer(unsigned int cpu)
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Thu Dec 07 16:18:55 
2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Fri Dec 08 09:09:18 
2006 -0700
@@ -244,35 +244,42 @@ asmlinkage void evtchn_do_upcall(struct 
 
 static int find_unbound_irq(void)
 {
+       static int warned;
+       int dynirq, irq;
+
+       for (dynirq = 0; dynirq < NR_DYNIRQS; dynirq++) {
+               irq = dynirq_to_irq(dynirq);
+               if (irq_bindcount[irq] == 0)
+                       return irq;
+       }
+
+       if (!warned) {
+               warned = 1;
+               printk(KERN_WARNING "No available IRQ to bind to: "
+                      "increase NR_DYNIRQS.\n");
+       }
+
+       return -ENOSPC;
+}
+
+static int bind_evtchn_to_irq(unsigned int evtchn)
+{
        int irq;
 
-       /* Only allocate from dynirq range */
-       for (irq = DYNIRQ_BASE; irq < NR_IRQS; irq++)
-               if (irq_bindcount[irq] == 0)
-                       break;
-
-       if (irq == NR_IRQS)
-               panic("No available IRQ to bind to: increase NR_IRQS!\n");
-
-       return irq;
-}
-
-static int bind_evtchn_to_irq(unsigned int evtchn)
-{
-       int irq;
-
        spin_lock(&irq_mapping_update_lock);
 
        if ((irq = evtchn_to_irq[evtchn]) == -1) {
-               irq = find_unbound_irq();
+               if ((irq = find_unbound_irq()) < 0)
+                       goto out;
+
                evtchn_to_irq[evtchn] = irq;
                irq_info[irq] = mk_irq_info(IRQT_EVTCHN, 0, evtchn);
        }
 
        irq_bindcount[irq]++;
 
+ out:
        spin_unlock(&irq_mapping_update_lock);
-
        return irq;
 }
 
@@ -284,6 +291,9 @@ static int bind_virq_to_irq(unsigned int
        spin_lock(&irq_mapping_update_lock);
 
        if ((irq = per_cpu(virq_to_irq, cpu)[virq]) == -1) {
+               if ((irq = find_unbound_irq()) < 0)
+                       goto out;
+
                bind_virq.virq = virq;
                bind_virq.vcpu = cpu;
                if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
@@ -291,7 +301,6 @@ static int bind_virq_to_irq(unsigned int
                        BUG();
                evtchn = bind_virq.port;
 
-               irq = find_unbound_irq();
                evtchn_to_irq[evtchn] = irq;
                irq_info[irq] = mk_irq_info(IRQT_VIRQ, virq, evtchn);
 
@@ -302,8 +311,8 @@ static int bind_virq_to_irq(unsigned int
 
        irq_bindcount[irq]++;
 
+ out:
        spin_unlock(&irq_mapping_update_lock);
-
        return irq;
 }
 
@@ -315,13 +324,15 @@ static int bind_ipi_to_irq(unsigned int 
        spin_lock(&irq_mapping_update_lock);
 
        if ((irq = per_cpu(ipi_to_irq, cpu)[ipi]) == -1) {
+               if ((irq = find_unbound_irq()) < 0)
+                       goto out;
+
                bind_ipi.vcpu = cpu;
                if (HYPERVISOR_event_channel_op(EVTCHNOP_bind_ipi,
                                                &bind_ipi) != 0)
                        BUG();
                evtchn = bind_ipi.port;
 
-               irq = find_unbound_irq();
                evtchn_to_irq[evtchn] = irq;
                irq_info[irq] = mk_irq_info(IRQT_IPI, ipi, evtchn);
 
@@ -332,8 +343,8 @@ static int bind_ipi_to_irq(unsigned int 
 
        irq_bindcount[irq]++;
 
+ out:
        spin_unlock(&irq_mapping_update_lock);
-
        return irq;
 }
 
@@ -383,6 +394,9 @@ int bind_evtchn_to_irqhandler(
        int retval;
 
        irq = bind_evtchn_to_irq(evtchn);
+       if (irq < 0)
+               return irq;
+
        retval = request_irq(irq, handler, irqflags, devname, dev_id);
        if (retval != 0) {
                unbind_from_irq(irq);
@@ -405,6 +419,9 @@ int bind_virq_to_irqhandler(
        int retval;
 
        irq = bind_virq_to_irq(virq, cpu);
+       if (irq < 0)
+               return irq;
+
        retval = request_irq(irq, handler, irqflags, devname, dev_id);
        if (retval != 0) {
                unbind_from_irq(irq);
@@ -427,6 +444,9 @@ int bind_ipi_to_irqhandler(
        int retval;
 
        irq = bind_ipi_to_irq(ipi, cpu);
+       if (irq < 0)
+               return irq;
+
        retval = request_irq(irq, handler, irqflags, devname, dev_id);
        if (retval != 0) {
                unbind_from_irq(irq);
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c     Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_kexec.c     Fri Dec 08 
09:09:18 2006 -0700
@@ -20,7 +20,7 @@ void xen_machine_kexec_setup_resources(v
 {
        xen_kexec_range_t range;
        struct resource *res;
-       int err, k = 0;
+       int k = 0;
 
        if (!is_initial_xendomain())
                return;
@@ -32,26 +32,21 @@ void xen_machine_kexec_setup_resources(v
                range.range = KEXEC_RANGE_MA_CPU;
                range.nr = k;
 
-               /*
-                * Anything other than EINVAL or success indictates
-                * that we are not running on a hypervisor which
-                * supports kexec.
-                */
-               err = HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range);
-               if (err == -EINVAL)
+               if(HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
                        break;
-               else if (err)
-                       return;
 
                k++;
        }
+
+       if (k == 0)
+               return;
 
        xen_max_nr_phys_cpus = k;
 
        /* allocate xen_phys_cpus */
 
        xen_phys_cpus = alloc_bootmem_low(k * sizeof(struct resource));
-       BUG_ON(!xen_phys_cpus);
+       BUG_ON(xen_phys_cpus == NULL);
 
        /* fill in xen_phys_cpus with per-cpu crash note information */
 
@@ -61,7 +56,7 @@ void xen_machine_kexec_setup_resources(v
                range.nr = k;
 
                if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
-                       BUG();
+                       goto err;
 
                res = xen_phys_cpus + k;
 
@@ -78,7 +73,7 @@ void xen_machine_kexec_setup_resources(v
        range.range = KEXEC_RANGE_MA_XEN;
 
        if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
-               BUG();
+               goto err;
 
        xen_hypervisor_res.name = "Hypervisor code and data";
        xen_hypervisor_res.start = range.start;
@@ -91,12 +86,23 @@ void xen_machine_kexec_setup_resources(v
        range.range = KEXEC_RANGE_MA_CRASH;
 
        if (HYPERVISOR_kexec_op(KEXEC_CMD_kexec_get_range, &range))
-               BUG();
+               return;
 
        if (range.size) {
                crashk_res.start = range.start;
                crashk_res.end = range.start + range.size - 1;
        }
+
+       return;
+
+ err:
+       /*
+        * It isn't possible to free xen_phys_cpus this early in the
+        * boot. Since failure at this stage is unexpected and the
+        * amount is small we leak the memory.
+         */
+       xen_max_nr_phys_cpus = 0;
+       return;
 }
 
 void xen_machine_kexec_register_resources(struct resource *res)
@@ -106,7 +112,7 @@ void xen_machine_kexec_register_resource
        request_resource(res, &xen_hypervisor_res);
 
        for (k = 0; k < xen_max_nr_phys_cpus; k++)
-               request_resource(res, xen_phys_cpus + k);
+               request_resource(&xen_hypervisor_res, xen_phys_cpus + k);
 
 }
 
@@ -157,7 +163,7 @@ void xen_machine_kexec_unload(struct kim
  * stop all CPUs and kexec. That is it combines machine_shutdown()
  * and machine_kexec() in Linux kexec terms.
  */
-NORET_TYPE void xen_machine_kexec(struct kimage *image)
+NORET_TYPE void machine_kexec(struct kimage *image)
 {
        xen_kexec_exec_t xke;
 
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Thu Dec 07 16:18:55 
2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Fri Dec 08 09:09:18 
2006 -0700
@@ -33,7 +33,7 @@ extern irqreturn_t smp_reschedule_interr
 extern irqreturn_t smp_reschedule_interrupt(int, void *, struct pt_regs *);
 extern irqreturn_t smp_call_function_interrupt(int, void *, struct pt_regs *);
 
-extern void local_setup_timer(unsigned int cpu);
+extern int local_setup_timer(unsigned int cpu);
 extern void local_teardown_timer(unsigned int cpu);
 
 extern void hypervisor_callback(void);
@@ -110,32 +110,45 @@ set_cpu_sibling_map(int cpu)
        cpu_data[cpu].booted_cores = 1;
 }
 
-static void xen_smp_intr_init(unsigned int cpu)
-{
+static int xen_smp_intr_init(unsigned int cpu)
+{
+       int rc;
+
+       per_cpu(resched_irq, cpu) = per_cpu(callfunc_irq, cpu) = -1;
+
        sprintf(resched_name[cpu], "resched%d", cpu);
-       per_cpu(resched_irq, cpu) =
-               bind_ipi_to_irqhandler(
-                       RESCHEDULE_VECTOR,
-                       cpu,
-                       smp_reschedule_interrupt,
-                       SA_INTERRUPT,
-                       resched_name[cpu],
-                       NULL);
-       BUG_ON(per_cpu(resched_irq, cpu) < 0);
+       rc = bind_ipi_to_irqhandler(RESCHEDULE_VECTOR,
+                                   cpu,
+                                   smp_reschedule_interrupt,
+                                   SA_INTERRUPT,
+                                   resched_name[cpu],
+                                   NULL);
+       if (rc < 0)
+               goto fail;
+       per_cpu(resched_irq, cpu) = rc;
 
        sprintf(callfunc_name[cpu], "callfunc%d", cpu);
-       per_cpu(callfunc_irq, cpu) =
-               bind_ipi_to_irqhandler(
-                       CALL_FUNCTION_VECTOR,
-                       cpu,
-                       smp_call_function_interrupt,
-                       SA_INTERRUPT,
-                       callfunc_name[cpu],
-                       NULL);
-       BUG_ON(per_cpu(callfunc_irq, cpu) < 0);
-
-       if (cpu != 0)
-               local_setup_timer(cpu);
+       rc = bind_ipi_to_irqhandler(CALL_FUNCTION_VECTOR,
+                                   cpu,
+                                   smp_call_function_interrupt,
+                                   SA_INTERRUPT,
+                                   callfunc_name[cpu],
+                                   NULL);
+       if (rc < 0)
+               goto fail;
+       per_cpu(callfunc_irq, cpu) = rc;
+
+       if ((cpu != 0) && ((rc = local_setup_timer(cpu)) != 0))
+               goto fail;
+
+       return 0;
+
+ fail:
+       if (per_cpu(resched_irq, cpu) >= 0)
+               unbind_from_irqhandler(per_cpu(resched_irq, cpu), NULL);
+       if (per_cpu(callfunc_irq, cpu) >= 0)
+               unbind_from_irqhandler(per_cpu(callfunc_irq, cpu), NULL);
+       return rc;
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
@@ -253,7 +266,8 @@ void __init smp_prepare_cpus(unsigned in
 
        set_cpu_sibling_map(0);
 
-       xen_smp_intr_init(0);
+       if (xen_smp_intr_init(0))
+               BUG();
 
        /* Restrict the possible_map according to max_cpus. */
        while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
@@ -419,7 +433,13 @@ int __devinit __cpu_up(unsigned int cpu)
        set_cpu_sibling_map(cpu);
        wmb();
 
-       xen_smp_intr_init(cpu);
+
+       rc = xen_smp_intr_init(cpu);
+       if (rc) {
+               remove_siblinginfo(cpu);
+               return rc;
+       }
+
        cpu_set(cpu, cpu_online_map);
 
        rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL);
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Fri Dec 08 
09:09:18 2006 -0700
@@ -1506,13 +1506,12 @@ static int __init netback_init(void)
        netif_xenbus_init();
 
 #ifdef NETBE_DEBUG_INTERRUPT
-       (void)bind_virq_to_irqhandler(
-               VIRQ_DEBUG,
-               0,
-               netif_be_dbg,
-               SA_SHIRQ, 
-               "net-be-dbg",
-               &netif_be_dbg);
+       (void)bind_virq_to_irqhandler(VIRQ_DEBUG,
+                                     0,
+                                     netif_be_dbg,
+                                     SA_SHIRQ, 
+                                     "net-be-dbg",
+                                     &netif_be_dbg);
 #endif
 
        return 0;
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile  Thu Dec 07 16:18:55 
2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/Makefile  Fri Dec 08 09:09:18 
2006 -0700
@@ -1,13 +1,9 @@ obj-y  += xenbus.o
-obj-y  += xenbus.o
+obj-y += xenbus_client.o xenbus_comms.o xenbus_xs.o xenbus_probe.o
 obj-$(CONFIG_XEN_BACKEND) += xenbus_be.o
 
 xenbus_be-objs =
 xenbus_be-objs += xenbus_backend_client.o
 
-xenbus-objs =
-xenbus-objs += xenbus_client.o
-xenbus-objs += xenbus_comms.o
-xenbus-objs += xenbus_xs.o
-xenbus-objs += xenbus_probe.o
-obj-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
+xenbus-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
+obj-y += $(xenbus-y) $(xenbus-m)
 obj-$(CONFIG_XEN_XENBUS_DEV) += xenbus_dev.o
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c   Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c   Fri Dec 08 
09:09:18 2006 -0700
@@ -289,6 +289,7 @@ int xenbus_free_evtchn(struct xenbus_dev
 
        return err;
 }
+EXPORT_SYMBOL_GPL(xenbus_free_evtchn);
 
 
 enum xenbus_state xenbus_read_driver_state(const char *path)
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c    Fri Dec 08 
09:09:18 2006 -0700
@@ -52,7 +52,7 @@ extern int xenstored_ready;
 extern int xenstored_ready;
 static DECLARE_WORK(probe_work, xenbus_probe, NULL);
 
-DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
+static DECLARE_WAIT_QUEUE_HEAD(xb_waitq);
 
 static irqreturn_t wake_waiting(int irq, void *unused, struct pt_regs *regs)
 {
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h    Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h    Fri Dec 08 
09:09:18 2006 -0700
@@ -38,7 +38,6 @@ int xb_write(const void *data, unsigned 
 int xb_write(const void *data, unsigned len);
 int xb_read(void *data, unsigned len);
 int xs_input_avail(void);
-extern wait_queue_head_t xb_waitq;
 extern struct xenstore_domain_interface *xen_store_interface;
 extern int xen_store_evtchn;
 
diff -r 968caf47b548 -r 970ff2ba748f 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.h
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.h    Thu Dec 07 
16:18:55 2006 -0700
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.h    Fri Dec 08 
09:09:18 2006 -0700
@@ -34,7 +34,7 @@
 #ifndef _XENBUS_PROBE_H
 #define _XENBUS_PROBE_H
 
-#ifdef CONFIG_XEN_BACKEND
+#if defined(CONFIG_XEN_BACKEND) || defined(CONFIG_XEN_BACKEND_MODULE)
 extern void xenbus_backend_suspend(int (*fn)(struct device *, void *));
 extern void xenbus_backend_resume(int (*fn)(struct device *, void *));
 extern void xenbus_backend_probe_and_watch(void);
diff -r 968caf47b548 -r 970ff2ba748f patches/linux-2.6.16.33/series
--- a/patches/linux-2.6.16.33/series    Thu Dec 07 16:18:55 2006 -0700
+++ b/patches/linux-2.6.16.33/series    Fri Dec 08 09:09:18 2006 -0700
@@ -1,12 +1,9 @@ kexec-generic.patch
-kexec-generic.patch
 git-2efe55a9cec8418f0e0cde3dc3787a42fddc4411.patch
 git-2a8a3d5b65e86ec1dfef7d268c64a909eab94af7.patch
 git-3566561bfadffcb5dbc85d576be80c0dbf2cccc9.patch
 linux-2.6.19-rc1-kexec-move_segment_code-i386.patch
-linux-2.6.19-rc1-kexec-xen-i386.patch
 git-4bfaaef01a1badb9e8ffb0c0a37cd2379008d21f.patch
 linux-2.6.19-rc1-kexec-move_segment_code-x86_64.patch
-linux-2.6.19-rc1-kexec-xen-x86_64.patch
 blktap-aio-16_03_06.patch
 device_bind.patch
 fix-hz-suspend.patch
diff -r 968caf47b548 -r 970ff2ba748f tools/examples/init.d/xendomains
--- a/tools/examples/init.d/xendomains  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/examples/init.d/xendomains  Fri Dec 08 09:09:18 2006 -0700
@@ -204,12 +204,14 @@ start()
        return; 
     fi
 
+    saved_domains=" "
     if [ "$XENDOMAINS_RESTORE" = "true" ] &&
        contains_something "$XENDOMAINS_SAVE"
     then
         mkdir -p $(dirname "$LOCKFILE")
        touch $LOCKFILE
        echo -n "Restoring Xen domains:"
+       saved_domains=`ls $XENDOMAINS_SAVE`
        for dom in $XENDOMAINS_SAVE/*; do
            echo -n " ${dom##*/}"
            xm restore $dom
@@ -234,9 +236,14 @@ start()
        # Create all domains with config files in XENDOMAINS_AUTO.
        # TODO: We should record which domain name belongs 
        # so we have the option to selectively shut down / migrate later
+       # If a domain statefile from $XENDOMAINS_SAVE matches a domain name
+       # in $XENDOMAINS_AUTO, do not try to start that domain; if it didn't 
+       # restore correctly it requires administrative attention.
        for dom in $XENDOMAINS_AUTO/*; do
            echo -n " ${dom##*/}"
-           if is_running $dom; then
+           shortdom=$(echo $dom | sed -n 's/^.*\/\(.*\)$/\1/p')
+           echo $saved_domains | grep -w $shortdom > /dev/null
+           if [ $? -eq 0 ] || is_running $dom; then
                echo -n "(skip)"
            else
                xm create --quiet --defconfig $dom
diff -r 968caf47b548 -r 970ff2ba748f tools/firmware/vmxassist/head.S
--- a/tools/firmware/vmxassist/head.S   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/firmware/vmxassist/head.S   Fri Dec 08 09:09:18 2006 -0700
@@ -130,7 +130,7 @@ _start:
        clts
 
        /* setup my own stack */
-       movl    $stack_top - 4*4, %esp
+       movl    $stack_top, %esp
        movl    %esp, %ebp
 
        /* go ... */
diff -r 968caf47b548 -r 970ff2ba748f tools/firmware/vmxassist/setup.c
--- a/tools/firmware/vmxassist/setup.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/firmware/vmxassist/setup.c  Fri Dec 08 09:09:18 2006 -0700
@@ -125,7 +125,7 @@ setup_gdt(void)
        /* setup task state segment */
        memset(&tss, 0, sizeof(tss));
        tss.ss0 = DATA_SELECTOR;
-       tss.esp0 = (unsigned) stack_top - 4*4;
+       tss.esp0 = (unsigned) stack_top;
        tss.iomap_base = offsetof(struct tss, iomap);
 
        /* initialize gdt's tss selector */
@@ -258,7 +258,7 @@ setup_ctx(void)
 
        memset(c, 0, sizeof(*c));
        c->eip = (unsigned long) switch_to_real_mode;
-       c->esp = (unsigned) stack_top - 4*4;
+       c->esp = (unsigned) stack_top;
        c->eflags = 0x2; /* no interrupts, please */
 
        /*
diff -r 968caf47b548 -r 970ff2ba748f tools/firmware/vmxassist/vm86.c
--- a/tools/firmware/vmxassist/vm86.c   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/firmware/vmxassist/vm86.c   Fri Dec 08 09:09:18 2006 -0700
@@ -1,6 +1,6 @@
 /*
  * vm86.c: A vm86 emulator. The main purpose of this emulator is to do as
- * little work as possible. 
+ * little work as possible.
  *
  * Leendert van Doorn, leendert@xxxxxxxxxxxxxx
  * Copyright (c) 2005-2006, International Business Machines Corporation.
@@ -52,8 +52,8 @@ static char *rnames[] = { "ax", "cx", "d
 static char *rnames[] = { "ax", "cx", "dx", "bx", "sp", "bp", "si", "di" };
 #endif /* DEBUG */
 
-#define PDE_PS           (1 << 7)
-#define PT_ENTRY_PRESENT 0x1
+#define PDE_PS                         (1 << 7)
+#define PT_ENTRY_PRESENT       0x1
 
 /* We only support access to <=4G physical memory due to 1:1 mapping */
 static uint64_t
@@ -136,7 +136,7 @@ address(struct regs *regs, unsigned seg,
        }
 
        if (mode == VM86_REAL || seg > oldctx.gdtr_limit ||
-           (mode == VM86_REAL_TO_PROTECTED && regs->cs == seg))
+               (mode == VM86_REAL_TO_PROTECTED && regs->cs == seg))
                return ((seg & 0xFFFF) << 4) + off;
 
        gdt_phys_base = guest_linear_to_phys(oldctx.gdtr_base);
@@ -153,13 +153,13 @@ address(struct regs *regs, unsigned seg,
        seg_limit = (entry_high & 0xF0000) | (entry_low & 0xFFFF);
 
        if (entry_high & 0x8000 &&
-           ((entry_high & 0x800000 && off >> 12 <= seg_limit) ||
-           (!(entry_high & 0x800000) && off <= seg_limit)))
+               ((entry_high & 0x800000 && off >> 12 <= seg_limit) ||
+               (!(entry_high & 0x800000) && off <= seg_limit)))
                return seg_base + off;
 
        panic("should never reach here in function address():\n\t"
-             "entry=0x%08x%08x, mode=%d, seg=0x%08x, offset=0x%08x\n",
-             entry_high, entry_low, mode, seg, off);
+                 "entry=0x%08x%08x, mode=%d, seg=0x%08x, offset=0x%08x\n",
+                 entry_high, entry_low, mode, seg, off);
 
        return 0;
 }
@@ -172,7 +172,7 @@ trace(struct regs *regs, int adjust, cha
        va_list ap;
 
        if ((traceset & (1 << mode)) &&
-          (mode == VM86_REAL_TO_PROTECTED || mode == VM86_REAL)) {
+               (mode == VM86_REAL_TO_PROTECTED || mode == VM86_REAL)) {
                /* 16-bit, seg:off addressing */
                unsigned addr = address(regs, regs->cs, off);
                printf("0x%08x: 0x%x:0x%04x ", addr, regs->cs, off);
@@ -183,7 +183,7 @@ trace(struct regs *regs, int adjust, cha
                printf("\n");
        }
        if ((traceset & (1 << mode)) &&
-          (mode == VM86_PROTECTED_TO_REAL || mode == VM86_PROTECTED)) {
+               (mode == VM86_PROTECTED_TO_REAL || mode == VM86_PROTECTED)) {
                /* 16-bit, gdt addressing */
                unsigned addr = address(regs, regs->cs, off);
                printf("0x%08x: 0x%x:0x%08x ", addr, regs->cs, off);
@@ -430,7 +430,7 @@ operand(unsigned prefix, struct regs *re
                        case 2: return address(regs, seg, regs->edx);
                        case 3: return address(regs, seg, regs->ebx);
                        case 4: return address(regs, seg,
-                                              sib(regs, mod, fetch8(regs)));
+                                                  sib(regs, mod, 
fetch8(regs)));
                        case 5: return address(regs, seg, fetch32(regs));
                        case 6: return address(regs, seg, regs->esi);
                        case 7: return address(regs, seg, regs->edi);
@@ -450,7 +450,7 @@ operand(unsigned prefix, struct regs *re
                        case 2: return address(regs, seg, regs->edx + disp);
                        case 3: return address(regs, seg, regs->ebx + disp);
                        case 4: return address(regs, seg,
-                                              sib(regs, mod, fetch8(regs)));
+                                                  sib(regs, mod, 
fetch8(regs)));
                        case 5: return address(regs, seg, regs->ebp + disp);
                        case 6: return address(regs, seg, regs->esi + disp);
                        case 7: return address(regs, seg, regs->edi + disp);
@@ -507,7 +507,7 @@ operand(unsigned prefix, struct regs *re
                }
        }
 
-       return 0; 
+       return 0;
 }
 
 /*
@@ -859,7 +859,7 @@ mov_to_seg(struct regs *regs, unsigned p
 
  fail:
        printf("%s:%d: missed opcode %02x %02x\n",
-              __FUNCTION__, __LINE__, opc, modrm);
+                  __FUNCTION__, __LINE__, opc, modrm);
        return 0;
 }
 
@@ -896,11 +896,11 @@ load_seg(unsigned long sel, uint32_t *ba
                  ((entry >> (32-16)) & 0x00FF0000) |
                  ((entry >> (   16)) & 0x0000FFFF));
        *limit = (((entry >> (48-16)) & 0x000F0000) |
-                 ((entry           ) & 0x0000FFFF));
+                 (entry & 0x0000FFFF));
 
        arbytes->bytes = 0;
        arbytes->fields.seg_type = (entry >> (8+32)) & 0xF; /* TYPE */
-       arbytes->fields.s =  (entry >> (12+32)) & 0x1; /* S */
+       arbytes->fields.s = (entry >> (12+32)) & 0x1; /* S */
        if (arbytes->fields.s)
                arbytes->fields.seg_type |= 1; /* accessed */
        arbytes->fields.dpl = (entry >> (13+32)) & 0x3; /* DPL */
@@ -924,7 +924,7 @@ load_or_clear_seg(unsigned long sel, uin
 load_or_clear_seg(unsigned long sel, uint32_t *base, uint32_t *limit, union 
vmcs_arbytes *arbytes)
 {
        if (!load_seg(sel, base, limit, arbytes))
-               load_seg(0, base, limit, arbytes);          
+               load_seg(0, base, limit, arbytes);
 }
 
 
@@ -988,21 +988,21 @@ real_mode(struct regs *regs)
                        panic("%%ss 0x%lx higher than 1MB", regs->uss);
                regs->uss = address(regs, regs->uss, 0) >> 4;
        } else {
-         regs->uss = saved_rm_regs.uss;
+               regs->uss = saved_rm_regs.uss;
        }
        if (regs->vds != 0) {
                if (regs->vds >= HIGHMEM)
                        panic("%%ds 0x%lx higher than 1MB", regs->vds);
                regs->vds = address(regs, regs->vds, 0) >> 4;
        } else {
-         regs->vds = saved_rm_regs.vds;
+               regs->vds = saved_rm_regs.vds;
        }
        if (regs->ves != 0) {
                if (regs->ves >= HIGHMEM)
                        panic("%%es 0x%lx higher than 1MB", regs->ves);
                regs->ves = address(regs, regs->ves, 0) >> 4;
        } else {
-         regs->ves = saved_rm_regs.ves;
+               regs->ves = saved_rm_regs.ves;
        }
 
        /* this should get us into 16-bit mode */
@@ -1029,10 +1029,7 @@ set_mode(struct regs *regs, enum vm86_mo
                    (mode == VM86_REAL_TO_PROTECTED)) {
                        regs->eflags &= ~EFLAGS_TF;
                        real_mode(regs);
-                       break;
-               } else if (mode == VM86_REAL) {
-                       break;
-               } else
+               } else if (mode != VM86_REAL)
                        panic("unexpected real mode transition");
                break;
 
@@ -1049,25 +1046,19 @@ set_mode(struct regs *regs, enum vm86_mo
                        oldctx.fs_sel = 0;
                        oldctx.gs_sel = 0;
                        oldctx.ss_sel = 0;
-                       break;
-               } else if (mode == VM86_REAL_TO_PROTECTED) {
-                       break;
-               } else
+               } else if (mode != VM86_REAL_TO_PROTECTED)
                        panic("unexpected real-to-protected mode transition");
                break;
 
        case VM86_PROTECTED_TO_REAL:
-               if (mode == VM86_PROTECTED) {
-                       break;
-               } else
+               if (mode != VM86_PROTECTED)
                        panic("unexpected protected-to-real mode transition");
                break;
 
        case VM86_PROTECTED:
-               if (mode == VM86_REAL_TO_PROTECTED) {
-                       protected_mode(regs);
-               } else
+               if (mode != VM86_REAL_TO_PROTECTED)
                        panic("unexpected protected mode transition");
+               protected_mode(regs);
                break;
        }
 
@@ -1081,25 +1072,19 @@ jmpl(struct regs *regs, int prefix)
        unsigned n = regs->eip;
        unsigned cs, eip;
 
-       if (mode == VM86_REAL_TO_PROTECTED) { /* jump to protected mode */
-               eip = (prefix & DATA32) ? fetch32(regs) : fetch16(regs);
-               cs = fetch16(regs);
-
-               TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
-
-                regs->cs = cs;
-                regs->eip = eip;
+       eip = (prefix & DATA32) ? fetch32(regs) : fetch16(regs);
+       cs = fetch16(regs);
+
+       TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
+
+       regs->cs = cs;
+       regs->eip = eip;
+
+       if (mode == VM86_REAL_TO_PROTECTED)             /* jump to protected 
mode */
                set_mode(regs, VM86_PROTECTED);
-       } else if (mode == VM86_PROTECTED_TO_REAL) { /* jump to real mode */
-               eip = (prefix & DATA32) ? fetch32(regs) : fetch16(regs);
-               cs = fetch16(regs);
-
-               TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
-
-                regs->cs = cs;
-                regs->eip = eip;
+       else if (mode == VM86_PROTECTED_TO_REAL)/* jump to real mode */
                set_mode(regs, VM86_REAL);
-       } else
+       else
                panic("jmpl");
 }
 
@@ -1110,29 +1095,22 @@ jmpl_indirect(struct regs *regs, int pre
        unsigned cs, eip;
        unsigned addr;
 
-       addr  = operand(prefix, regs, modrm);
-
-       if (mode == VM86_REAL_TO_PROTECTED) { /* jump to protected mode */
-               eip = (prefix & DATA32) ? read32(addr) : read16(addr);
-               addr += (prefix & DATA32) ? 4 : 2;
-               cs = read16(addr);
-
-               TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
-
-                regs->cs = cs;
-                regs->eip = eip;
+       addr = operand(prefix, regs, modrm);
+
+       eip = (prefix & DATA32) ? read32(addr) : read16(addr);
+       addr += (prefix & DATA32) ? 4 : 2;
+       cs = read16(addr);
+
+       TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
+
+       regs->cs = cs;
+       regs->eip = eip;
+
+       if (mode == VM86_REAL_TO_PROTECTED)             /* jump to protected 
mode */
                set_mode(regs, VM86_PROTECTED);
-       } else if (mode == VM86_PROTECTED_TO_REAL) { /* jump to real mode */
-               eip = (prefix & DATA32) ? read32(addr) : read16(addr);
-               addr += (prefix & DATA32) ? 4 : 2;
-               cs = read16(addr);
-
-               TRACE((regs, (regs->eip - n) + 1, "jmpl 0x%x:0x%x", cs, eip));
-
-                regs->cs = cs;
-                regs->eip = eip;
+       else if (mode == VM86_PROTECTED_TO_REAL)/* jump to real mode */
                set_mode(regs, VM86_REAL);
-       } else
+       else
                panic("jmpl");
 }
 
@@ -1151,15 +1129,14 @@ retl(struct regs *regs, int prefix)
 
        TRACE((regs, 1, "retl (to 0x%x:0x%x)", cs, eip));
 
-       if (mode == VM86_REAL_TO_PROTECTED) { /* jump to protected mode */
-                regs->cs = cs;
-                regs->eip = eip;
+       regs->cs = cs;
+       regs->eip = eip;
+
+       if (mode == VM86_REAL_TO_PROTECTED)             /* jump to protected 
mode */
                set_mode(regs, VM86_PROTECTED);
-       } else if (mode == VM86_PROTECTED_TO_REAL) { /* jump to real mode */
-                regs->cs = cs;
-                regs->eip = eip;
+       else if (mode == VM86_PROTECTED_TO_REAL)/* jump to real mode */
                set_mode(regs, VM86_REAL);
-       } else
+       else
                panic("retl");
 }
 
@@ -1259,8 +1236,8 @@ pushrm(struct regs *regs, int prefix, un
        unsigned addr;
        unsigned data;
 
-       addr  = operand(prefix, regs, modrm);
-       
+       addr = operand(prefix, regs, modrm);
+
        if (prefix & DATA32) {
                data = read32(addr);
                push32(regs, data);
@@ -1386,11 +1363,11 @@ opcode(struct regs *regs)
                case 0x3B: /* addr32 cmp r/m16, r16 */
                        if (mode != VM86_REAL && mode != VM86_REAL_TO_PROTECTED)
                                goto invalid;
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!cmp(regs, prefix, opc))
-                                goto invalid;
-                        return OPC_EMULATED;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!cmp(regs, prefix, opc))
+                               goto invalid;
+                       return OPC_EMULATED;
 
                case 0x3E:
                        TRACE((regs, regs->eip - eip, "%%ds:"));
@@ -1412,7 +1389,7 @@ opcode(struct regs *regs)
                        prefix |= DATA32;
                        continue;
 
-               case 0x67: 
+               case 0x67:
                        TRACE((regs, regs->eip - eip, "addr32"));
                        prefix |= ADDR32;
                        continue;
@@ -1421,18 +1398,18 @@ opcode(struct regs *regs)
                case 0x8A: /* addr32 mov r/m8, r8 */
                        if (mode != VM86_REAL && mode != VM86_REAL_TO_PROTECTED)
                                goto invalid;
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!movr(regs, prefix, opc))
-                                goto invalid;
-                        return OPC_EMULATED;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!movr(regs, prefix, opc))
+                               goto invalid;
+                       return OPC_EMULATED;
 
                case 0x89: /* addr32 mov r16, r/m16 */
                        if (mode == VM86_PROTECTED_TO_REAL) {
                                unsigned modrm = fetch8(regs);
                                unsigned addr = operand(prefix, regs, modrm);
                                unsigned val, r = (modrm >> 3) & 7;
-                               
+
                                if (prefix & DATA32) {
                                        val = getreg16(regs, r);
                                        write32(addr, val);
@@ -1447,11 +1424,11 @@ opcode(struct regs *regs)
                case 0x8B: /* addr32 mov r/m16, r16 */
                        if (mode != VM86_REAL && mode != VM86_REAL_TO_PROTECTED)
                                goto invalid;
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!movr(regs, prefix, opc))
-                                goto invalid;
-                        return OPC_EMULATED;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!movr(regs, prefix, opc))
+                               goto invalid;
+                       return OPC_EMULATED;
 
                case 0x8E: /* mov r16, sreg */
                        if (!mov_to_seg(regs, prefix, opc))
@@ -1459,11 +1436,11 @@ opcode(struct regs *regs)
                        return OPC_EMULATED;
 
                case 0x8F: /* addr32 pop r/m16 */
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!pop(regs, prefix, opc))
-                                goto invalid;
-                        return OPC_EMULATED;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!pop(regs, prefix, opc))
+                               goto invalid;
+                       return OPC_EMULATED;
 
                case 0x90: /* nop */
                        TRACE((regs, regs->eip - eip, "nop"));
@@ -1487,7 +1464,7 @@ opcode(struct regs *regs)
                        regs->eflags |= EFLAGS_VM;
                        return OPC_EMULATED;
 
-               case 0xA1: /* mov ax, r/m16 */ 
+               case 0xA1: /* mov ax, r/m16 */
                        {
                                int addr, data;
                                int seg = segment(prefix, regs, regs->vds);
@@ -1521,15 +1498,15 @@ opcode(struct regs *regs)
                        return OPC_EMULATED;
 
                case 0xC6: /* addr32 movb $imm, r/m8 */
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!movr(regs, prefix, opc))
-                                goto invalid;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!movr(regs, prefix, opc))
+                               goto invalid;
                        return OPC_EMULATED;
 
                case 0xCB: /* retl */
                        if ((mode == VM86_REAL_TO_PROTECTED) ||
-                           (mode == VM86_PROTECTED_TO_REAL)) {
+                               (mode == VM86_PROTECTED_TO_REAL)) {
                                retl(regs, prefix);
                                return OPC_INVALID;
                        }
@@ -1567,7 +1544,7 @@ opcode(struct regs *regs)
 
                case 0xEA: /* jmpl */
                        if ((mode == VM86_REAL_TO_PROTECTED) ||
-                           (mode == VM86_PROTECTED_TO_REAL)) {
+                               (mode == VM86_PROTECTED_TO_REAL)) {
                                jmpl(regs, prefix);
                                return OPC_INVALID;
                        }
@@ -1579,7 +1556,7 @@ opcode(struct regs *regs)
                                switch((modrm >> 3) & 7) {
                                case 5: /* jmpl (indirect) */
                                        if ((mode == VM86_REAL_TO_PROTECTED) ||
-                                           (mode == VM86_PROTECTED_TO_REAL)) {
+                                               (mode == 
VM86_PROTECTED_TO_REAL)) {
                                                jmpl_indirect(regs, prefix, 
modrm);
                                                return OPC_INVALID;
                                        }
@@ -1596,7 +1573,7 @@ opcode(struct regs *regs)
 
                case 0xEB: /* short jump */
                        if ((mode == VM86_REAL_TO_PROTECTED) ||
-                           (mode == VM86_PROTECTED_TO_REAL)) {
+                               (mode == VM86_PROTECTED_TO_REAL)) {
                                disp = (char) fetch8(regs);
                                TRACE((regs, 2, "jmp 0x%x", regs->eip + disp));
                                regs->eip += disp;
@@ -1619,10 +1596,10 @@ opcode(struct regs *regs)
                        continue;
 
                case 0xF6: /* addr32 testb $imm, r/m8 */
-                        if ((prefix & ADDR32) == 0)
-                                goto invalid;
-                        if (!test(regs, prefix, opc))
-                                goto invalid;
+                       if ((prefix & ADDR32) == 0)
+                               goto invalid;
+                       if (!test(regs, prefix, opc))
+                               goto invalid;
                        return OPC_EMULATED;
 
                case 0xFA: /* cli */
@@ -1682,6 +1659,8 @@ trap(int trapno, int errno, struct regs 
        case 1: /* Debug */
                if (regs->eflags & EFLAGS_VM) {
                        /* emulate any 8086 instructions  */
+                       if (mode == VM86_REAL)
+                               return;
                        if (mode != VM86_REAL_TO_PROTECTED)
                                panic("not in real-to-protected mode");
                        emulate(regs);
@@ -1702,7 +1681,7 @@ trap(int trapno, int errno, struct regs 
        default:
        invalid:
                printf("Trap (0x%x) while in %s mode\n",
-                   trapno, regs->eflags & EFLAGS_VM ? "real" : "protected");
+                       trapno, regs->eflags & EFLAGS_VM ? "real" : 
"protected");
                if (trapno == 14)
                        printf("Page fault address 0x%x\n", get_cr2());
                dump_regs(regs);
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/hw/tpm_tis.c
--- a/tools/ioemu/hw/tpm_tis.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/hw/tpm_tis.c  Fri Dec 08 09:09:18 2006 -0700
@@ -132,7 +132,7 @@ typedef struct TPMState {
 
 
 /* local prototypes */
-static int TPM_Send(tpmState *s, tpmBuffer *buffer, char *msg);
+static int TPM_Send(tpmState *s, tpmBuffer *buffer, uint8_t locty, char *msg);
 static int TPM_Receive(tpmState *s, tpmBuffer *buffer);
 static uint32_t vtpm_instance_from_xenstore(void);
 static void tis_poll_timer(void *opaque);
@@ -271,6 +271,8 @@ static int create_local_socket(tpmState 
 /*
  * the 'write' method for sending requests to the vTPM
  * four bytes with the vTPM instance number are prepended to each request
+ * the locality in which the command was sent is transmitted in the
+ * highest 3 bits
  */
 static int write_local_socket(tpmState *s, const tpmBuffer *buffer)
 {
@@ -608,7 +610,7 @@ static void tis_mem_writel(void *opaque,
             }
         }
         if (val & STS_TPM_GO) {
-            n = TPM_Send(s, &s->buffer,"tpm_data_write");
+            n = TPM_Send(s, &s->buffer, locty, "tpm_data_write");
             if (n > 0) {
                 /* sending of data was successful */
                 s->offset = 0;
@@ -915,7 +917,7 @@ const static unsigned char tpm_failure[]
 /*
  * Send a TPM request.
  */
-static int TPM_Send(tpmState *s, tpmBuffer *buffer, char *msg)
+static int TPM_Send(tpmState *s, tpmBuffer *buffer, uint8_t locty, char *msg)
 {
     int len;
     uint32_t size = tpm_get_size_from_buffer(buffer->buf);
@@ -944,6 +946,10 @@ static int TPM_Send(tpmState *s, tpmBuff
 #ifdef DEBUG_TPM
     showBuff(buffer->buf, "To TPM");
 #endif
+
+    /* transmit the locality in the highest 3 bits */
+    buffer->instance[0] &= 0x1f;
+    buffer->instance[0] |= (locty << 5);
 
     len = vTPMTransmit[s->Transmitlayer].write(s, buffer);
     if (len < 0) {
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/hw/usb-hid.c
--- a/tools/ioemu/hw/usb-hid.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/hw/usb-hid.c  Fri Dec 08 09:09:18 2006 -0700
@@ -39,6 +39,7 @@ typedef struct USBMouseState {
     int x, y;
     int kind;
     int mouse_grabbed;
+    int status_changed;
 } USBMouseState;
 
 /* mostly the same values as the Bochs USB Mouse device */
@@ -231,6 +232,7 @@ static void usb_mouse_event(void *opaque
     s->dy += dy1;
     s->dz += dz1;
     s->buttons_state = buttons_state;
+    s->status_changed = 1;
 }
 
 static void usb_tablet_event(void *opaque,
@@ -242,6 +244,7 @@ static void usb_tablet_event(void *opaqu
     s->y = y;
     s->dz += dz;
     s->buttons_state = buttons_state;
+    s->status_changed = 1;
 }
 
 static inline int int_clamp(int val, int vmin, int vmax)
@@ -483,10 +486,16 @@ static int usb_mouse_handle_data(USBDevi
     switch(pid) {
     case USB_TOKEN_IN:
         if (devep == 1) {
-           if (s->kind == USB_MOUSE)
-               ret = usb_mouse_poll(s, data, len);
-           else if (s->kind == USB_TABLET)
-               ret = usb_tablet_poll(s, data, len);
+            if (s->kind == USB_MOUSE)
+                ret = usb_mouse_poll(s, data, len);
+            else if (s->kind == USB_TABLET)
+                ret = usb_tablet_poll(s, data, len);
+
+            if (!s->status_changed)
+                ret = USB_RET_NAK;
+            else
+                s->status_changed = 0;
+
         } else {
             goto fail;
         }
@@ -523,6 +532,7 @@ USBDevice *usb_tablet_init(void)
     s->dev.handle_data = usb_mouse_handle_data;
     s->dev.handle_destroy = usb_mouse_handle_destroy;
     s->kind = USB_TABLET;
+    s->status_changed = 0;
 
     pstrcpy(s->dev.devname, sizeof(s->dev.devname), "QEMU USB Tablet");
 
@@ -544,6 +554,7 @@ USBDevice *usb_mouse_init(void)
     s->dev.handle_data = usb_mouse_handle_data;
     s->dev.handle_destroy = usb_mouse_handle_destroy;
     s->kind = USB_MOUSE;
+    s->status_changed = 0;
 
     pstrcpy(s->dev.devname, sizeof(s->dev.devname), "QEMU USB Mouse");
 
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/hw/usb-uhci.c
--- a/tools/ioemu/hw/usb-uhci.c Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/hw/usb-uhci.c Fri Dec 08 09:09:18 2006 -0700
@@ -424,12 +424,10 @@ static int uhci_handle_td(UHCIState *s, 
     uint8_t buf[2048];
     int len, max_len, err, ret;
 
-    if (td->ctrl & TD_CTRL_IOC) {
-        *int_mask |= 0x01;
-    }
-    
-    if (!(td->ctrl & TD_CTRL_ACTIVE))
-        return 1;
+    if (!(td->ctrl & TD_CTRL_ACTIVE)){
+        ret = 1;
+        goto out;
+    }
 
     /* TD is active */
     max_len = ((td->token >> 21) + 1) & 0x7ff;
@@ -467,7 +465,8 @@ static int uhci_handle_td(UHCIState *s, 
         /* invalid pid : frame interrupted */
         s->status |= UHCI_STS_HCPERR;
         uhci_update_irq(s);
-        return -1;
+        ret = -1;
+        goto out;
     }
     if (td->ctrl & TD_CTRL_IOS)
         td->ctrl &= ~TD_CTRL_ACTIVE;
@@ -479,10 +478,12 @@ static int uhci_handle_td(UHCIState *s, 
             len < max_len) {
             *int_mask |= 0x02;
             /* short packet: do not update QH */
-            return 1;
+            ret = 1;
+            goto out;
         } else {
             /* success */
-            return 0;
+            ret = 0;
+            goto out;
         }
     } else {
         switch(ret) {
@@ -501,23 +502,34 @@ static int uhci_handle_td(UHCIState *s, 
             }
             td->ctrl = (td->ctrl & ~(3 << TD_CTRL_ERROR_SHIFT)) | 
                 (err << TD_CTRL_ERROR_SHIFT);
-            return 1;
+            ret = 1;
+            goto out;
         case USB_RET_NAK:
             td->ctrl |= TD_CTRL_NAK;
             if (pid == USB_TOKEN_SETUP)
                 goto do_timeout;
-            return 1;
+            ret = 1;
+            goto out;
         case USB_RET_STALL:
             td->ctrl |= TD_CTRL_STALL;
             td->ctrl &= ~TD_CTRL_ACTIVE;
-            return 1;
+            ret = 1;
+            goto out;
         case USB_RET_BABBLE:
             td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL;
             td->ctrl &= ~TD_CTRL_ACTIVE;
             /* frame interrupted */
-            return -1;
-        }
-    }
+            ret = -1;
+            goto out;
+        }
+    }
+   
+out:
+    /* If TD is inactive and IOC bit set to 1 then update int_mask */ 
+    if ((td->ctrl & TD_CTRL_IOC) && (!(td->ctrl & TD_CTRL_ACTIVE))) {
+        *int_mask |= 0x01;
+    }
+    return ret;
 }
 
 static void uhci_frame_timer(void *opaque)
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/target-i386-dm/cpu.h
--- a/tools/ioemu/target-i386-dm/cpu.h  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/target-i386-dm/cpu.h  Fri Dec 08 09:09:18 2006 -0700
@@ -25,7 +25,8 @@
 #ifdef TARGET_X86_64
 #define TARGET_LONG_BITS 64
 #else
-#define TARGET_LONG_BITS 32
+/* #define TARGET_LONG_BITS 32 */
+#define TARGET_LONG_BITS 64 /* for Qemu map cache */
 #endif
 
 /* target supports implicit self modifying code */
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/target-i386-dm/exec-dm.c
--- a/tools/ioemu/target-i386-dm/exec-dm.c      Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/target-i386-dm/exec-dm.c      Fri Dec 08 09:09:18 2006 -0700
@@ -36,6 +36,7 @@
 
 #include "cpu.h"
 #include "exec-all.h"
+#include "vl.h"
 
 //#define DEBUG_TB_INVALIDATE
 //#define DEBUG_FLUSH
@@ -426,6 +427,12 @@ static inline int paddr_is_ram(target_ph
 #endif
 }
 
+#if defined(__i386__) || defined(__x86_64__)
+#define phys_ram_addr(x) (qemu_map_cache(x))
+#elif defined(__ia64__)
+#define phys_ram_addr(x) (phys_ram_base + (x))
+#endif
+
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 
                             int len, int is_write)
 {
@@ -438,7 +445,7 @@ void cpu_physical_memory_rw(target_phys_
         l = TARGET_PAGE_SIZE - (addr & ~TARGET_PAGE_MASK); 
         if (l > len)
             l = len;
-       
+
         io_index = iomem_index(addr);
         if (is_write) {
             if (io_index) {
@@ -460,9 +467,10 @@ void cpu_physical_memory_rw(target_phys_
                 }
             } else if (paddr_is_ram(addr)) {
                 /* Reading from RAM */
-                memcpy(phys_ram_base + addr, buf, l);
+                ptr = phys_ram_addr(addr);
+                memcpy(ptr, buf, l);
 #ifdef __ia64__
-                sync_icache((unsigned long)(phys_ram_base + addr), l);
+                sync_icache(ptr, l);
 #endif 
             }
         } else {
@@ -485,7 +493,8 @@ void cpu_physical_memory_rw(target_phys_
                 }
             } else if (paddr_is_ram(addr)) {
                 /* Reading from RAM */
-                memcpy(buf, phys_ram_base + addr, l);
+                ptr = phys_ram_addr(addr);
+                memcpy(buf, ptr, l);
             } else {
                 /* Neither RAM nor known MMIO space */
                 memset(buf, 0xff, len); 
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/vl.c  Fri Dec 08 09:09:18 2006 -0700
@@ -5807,6 +5807,92 @@ int set_mm_mapping(int xc_handle, uint32
 
     return 0;
 }
+
+#if defined(__i386__) || defined(__x86_64__)
+static struct map_cache *mapcache_entry;
+static unsigned long nr_buckets;
+
+static int qemu_map_cache_init(unsigned long nr_pages)
+{
+    unsigned long max_pages = MAX_MCACHE_SIZE >> PAGE_SHIFT;
+    int i;
+
+    if (nr_pages < max_pages)
+        max_pages = nr_pages;
+
+    nr_buckets = (max_pages << PAGE_SHIFT) >> MCACHE_BUCKET_SHIFT;
+
+    fprintf(logfile, "qemu_map_cache_init nr_buckets = %lx\n", nr_buckets);
+
+    mapcache_entry = malloc(nr_buckets * sizeof(struct map_cache));
+    if (mapcache_entry == NULL) {
+        errno = ENOMEM;
+        return -1;
+    }
+
+    memset(mapcache_entry, 0, nr_buckets * sizeof(struct map_cache));
+
+    /*
+     * To avoid ENOMEM from xc_map_foreign_batch() at runtime, we
+     * pre-fill all the map caches in advance.
+     */
+    for (i = 0; i < nr_buckets; i++)
+       (void)qemu_map_cache(((target_phys_addr_t)i) << MCACHE_BUCKET_SHIFT);
+
+    return 0;
+}
+
+uint8_t *qemu_map_cache(target_phys_addr_t phys_addr)
+{
+    struct map_cache *entry;
+    unsigned long address_index  = phys_addr >> MCACHE_BUCKET_SHIFT;
+    unsigned long address_offset = phys_addr & (MCACHE_BUCKET_SIZE-1);
+
+    /* For most cases (>99.9%), the page address is the same. */
+    static unsigned long last_address_index = ~0UL;
+    static uint8_t      *last_address_vaddr;
+
+    if (address_index == last_address_index)
+        return last_address_vaddr + address_offset;
+
+    entry = &mapcache_entry[address_index % nr_buckets];
+
+    if (entry->vaddr_base == NULL || entry->paddr_index != address_index)
+    { 
+        /* We need to remap a bucket. */
+        uint8_t *vaddr_base;
+        unsigned long pfns[MCACHE_BUCKET_SIZE >> PAGE_SHIFT];
+        unsigned int i;
+
+        if (entry->vaddr_base != NULL) {
+            errno = munmap(entry->vaddr_base, MCACHE_BUCKET_SIZE);
+            if (errno) {
+                fprintf(logfile, "unmap fails %d\n", errno);
+                exit(-1);
+            }
+        }
+
+        for (i = 0; i < MCACHE_BUCKET_SIZE >> PAGE_SHIFT; i++)
+            pfns[i] = (address_index << (MCACHE_BUCKET_SHIFT-PAGE_SHIFT)) + i;
+
+        vaddr_base = xc_map_foreign_batch(
+            xc_handle, domid, PROT_READ|PROT_WRITE,
+            pfns, MCACHE_BUCKET_SIZE >> PAGE_SHIFT);
+        if (vaddr_base == NULL) {
+            fprintf(logfile, "xc_map_foreign_batch error %d\n", errno);
+            exit(-1);
+        }
+
+        entry->vaddr_base  = vaddr_base;
+        entry->paddr_index = address_index;;
+    }
+
+    last_address_index = address_index;
+    last_address_vaddr = entry->vaddr_base;
+
+    return last_address_vaddr + address_offset;
+}
+#endif
 
 int main(int argc, char **argv)
 {
@@ -6130,6 +6216,7 @@ int main(int argc, char **argv)
                 break;
             case QEMU_OPTION_m:
                 ram_size = atol(optarg) * 1024 * 1024;
+                ram_size = (uint64_t)atol(optarg) * 1024 * 1024;
                 if (ram_size <= 0)
                     help();
 #ifndef CONFIG_DM
@@ -6404,49 +6491,40 @@ int main(int argc, char **argv)
         shared_page_nr = nr_pages - 1;
 #endif
 
+#if defined(__i386__) || defined(__x86_64__)
+
+    if ( qemu_map_cache_init(tmp_nr_pages) )
+    {
+        fprintf(logfile, "qemu_map_cache_init returned: error %d\n", errno);
+        exit(-1);
+    }
+
+    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                       PROT_READ|PROT_WRITE, shared_page_nr);
+    if (shared_page == NULL) {
+        fprintf(logfile, "map shared IO page returned error %d\n", errno);
+        exit(-1);
+    }
+
+    fprintf(logfile, "shared page at pfn:%lx\n", shared_page_nr);
+
+    buffered_io_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
+                                            PROT_READ|PROT_WRITE,
+                                            shared_page_nr - 2);
+    if (buffered_io_page == NULL) {
+        fprintf(logfile, "map buffered IO page returned error %d\n", errno);
+        exit(-1);
+    }
+
+    fprintf(logfile, "buffered io page at pfn:%lx\n", shared_page_nr - 2);
+
+#elif defined(__ia64__)
+
     page_array = (xen_pfn_t *)malloc(tmp_nr_pages * sizeof(xen_pfn_t));
     if (page_array == NULL) {
         fprintf(logfile, "malloc returned error %d\n", errno);
         exit(-1);
     }
-
-#if defined(__i386__) || defined(__x86_64__)
-    for ( i = 0; i < tmp_nr_pages; i++)
-        page_array[i] = i;
-
-    phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
-                                         PROT_READ|PROT_WRITE, page_array,
-                                         tmp_nr_pages);
-    if (phys_ram_base == NULL) {
-        fprintf(logfile, "batch map guest memory returned error %d\n", errno);
-        exit(-1);
-    }
-
-    shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                       PROT_READ|PROT_WRITE,
-                                       page_array[shared_page_nr]);
-    if (shared_page == NULL) {
-        fprintf(logfile, "map shared IO page returned error %d\n", errno);
-        exit(-1);
-    }
-
-    fprintf(logfile, "shared page at pfn:%lx, mfn: %"PRIx64"\n",
-            shared_page_nr, (uint64_t)(page_array[shared_page_nr]));
-
-    buffered_io_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
-                                            PROT_READ|PROT_WRITE,
-                                            page_array[shared_page_nr - 2]);
-    if (buffered_io_page == NULL) {
-        fprintf(logfile, "map buffered IO page returned error %d\n", errno);
-        exit(-1);
-    }
-
-    fprintf(logfile, "buffered io page at pfn:%lx, mfn: %"PRIx64"\n",
-            shared_page_nr - 2, (uint64_t)(page_array[shared_page_nr - 2]));
-
-    free(page_array);
-
-#elif defined(__ia64__)
 
     shared_page = xc_map_foreign_range(xc_handle, domid, PAGE_SIZE,
                                        PROT_READ|PROT_WRITE,
diff -r 968caf47b548 -r 970ff2ba748f tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/ioemu/vl.h  Fri Dec 08 09:09:18 2006 -0700
@@ -156,6 +156,26 @@ extern void *shared_vram;
 
 extern FILE *logfile;
 
+
+#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) 
+#define MAX_MCACHE_SIZE    0x40000000 /* 1GB max for x86 */
+#define MCACHE_BUCKET_SHIFT 16
+#elif defined(__x86_64__)
+#define MAX_MCACHE_SIZE    0x1000000000 /* 64GB max for x86_64 */
+#define MCACHE_BUCKET_SHIFT 20
+#endif
+
+#define MCACHE_BUCKET_SIZE (1UL << MCACHE_BUCKET_SHIFT)
+
+struct map_cache {
+    unsigned long paddr_index;
+    uint8_t      *vaddr_base;
+};
+
+uint8_t *qemu_map_cache(target_phys_addr_t phys_addr);
+#endif
+
 extern int xc_handle;
 extern int domid;
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/ia64/xc_ia64_linux_save.c
--- a/tools/libxc/ia64/xc_ia64_linux_save.c     Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/ia64/xc_ia64_linux_save.c     Fri Dec 08 09:09:18 2006 -0700
@@ -353,7 +353,7 @@ xc_linux_save(int xc_handle, int io_fd, 
                    It will be remarked dirty.
                    FIXME: to be tracked.  */
                 fprintf(stderr, "cannot map page %lx: %s\n",
-                        page_array[N], strerror (errno));
+                        page_array[N], safe_strerror(errno));
                 continue;
             }
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_core.c     Fri Dec 08 09:09:18 2006 -0700
@@ -140,7 +140,7 @@ static int local_file_dump(void *args, c
         bytes = write(da->fd, &buffer[offset], length-offset);
         if ( bytes <= 0 )
         {
-            PERROR("Failed to write buffer: %s", strerror(errno));
+            PERROR("Failed to write buffer");
             return -errno;
         }
     }
@@ -158,7 +158,7 @@ xc_domain_dumpcore(int xc_handle,
 
     if ( (da.fd = open(corename, O_CREAT|O_RDWR, S_IWUSR|S_IRUSR)) < 0 )
     {
-        PERROR("Could not open corefile %s: %s", corename, strerror(errno));
+        PERROR("Could not open corefile %s", corename);
         return -errno;
     }
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_domain.c   Fri Dec 08 09:09:18 2006 -0700
@@ -315,6 +315,52 @@ int xc_domain_setmaxmem(int xc_handle,
     domctl.u.max_mem.max_memkb = max_memkb;
     return do_domctl(xc_handle, &domctl);
 }
+
+#if defined(__i386__) || defined(__x86_64__)
+#include <xen/hvm/e820.h>
+int xc_domain_set_memmap_limit(int xc_handle,
+                               uint32_t domid,
+                               unsigned long map_limitkb)
+{
+    int rc;
+
+    struct xen_foreign_memory_map fmap = {
+        .domid = domid,
+        .map = { .nr_entries = 1 }
+    };
+
+    struct e820entry e820 = {
+        .addr = 0,
+        .size = (uint64_t)map_limitkb << 10,
+        .type = E820_RAM
+    };
+
+    set_xen_guest_handle(fmap.map.buffer, &e820);
+
+    if ( lock_pages(&fmap, sizeof(fmap)) || lock_pages(&e820, sizeof(e820)) )
+    {
+        PERROR("Could not lock memory for Xen hypercall");
+        rc = -1;
+        goto out;
+    }
+
+    rc = xc_memory_op(xc_handle, XENMEM_set_memory_map, &fmap);
+
+ out:
+    unlock_pages(&fmap, sizeof(fmap));
+    unlock_pages(&e820, sizeof(e820));
+    return rc;
+}
+#else
+int xc_domain_set_memmap_limit(int xc_handle,
+                               uint32_t domid,
+                               unsigned long map_limitkb)
+{
+    PERROR("Function not implemented");
+    errno = ENOSYS;
+    return -1;
+}
+#endif
 
 int xc_domain_set_time_offset(int xc_handle,
                               uint32_t domid,
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_hvm_build.c        Fri Dec 08 09:09:18 2006 -0700
@@ -285,7 +285,6 @@ static int xc_hvm_build_internal(int xc_
 
     if ( setup_guest(xc_handle, domid, memsize, image, image_size, &ctxt) < 0 )
     {
-        ERROR("Error constructing guest OS");
         goto error_out;
     }
 
@@ -329,26 +328,30 @@ static int parseelfimage(char *elfbase,
 
     if ( !IS_ELF(*ehdr) )
     {
-        ERROR("Kernel image does not have an ELF header.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel image does not have an ELF header.");
         return -EINVAL;
     }
 
     if ( (ehdr->e_phoff + (ehdr->e_phnum * ehdr->e_phentsize)) > elfsize )
     {
-        ERROR("ELF program headers extend beyond end of image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF program headers extend beyond end of image.");
         return -EINVAL;
     }
 
     if ( (ehdr->e_shoff + (ehdr->e_shnum * ehdr->e_shentsize)) > elfsize )
     {
-        ERROR("ELF section headers extend beyond end of image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF section headers extend beyond end of image.");
         return -EINVAL;
     }
 
     /* Find the section-header strings table. */
     if ( ehdr->e_shstrndx == SHN_UNDEF )
     {
-        ERROR("ELF image has no section-header strings table (shstrtab).");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF image has no section-header strings table 
(shstrtab).");
         return -EINVAL;
     }
     shdr = (Elf32_Shdr *)(elfbase + ehdr->e_shoff +
@@ -370,7 +373,8 @@ static int parseelfimage(char *elfbase,
          (ehdr->e_entry < kernstart) ||
          (ehdr->e_entry > kernend) )
     {
-        ERROR("Malformed ELF image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Malformed ELF image.");
         return -EINVAL;
     }
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_linux_build.c      Fri Dec 08 09:09:18 2006 -0700
@@ -120,7 +120,7 @@ static int probeimageformat(const char *
     if ( probe_elf(image, image_size, load_funcs) &&
          probe_bin(image, image_size, load_funcs) )
     {
-        ERROR( "Unrecognized image format" );
+        xc_set_error(XC_INVALID_KERNEL, "Not a valid ELF or raw kernel image");
         return -EINVAL;
     }
 
@@ -606,8 +606,8 @@ static int setup_guest(int xc_handle,
     /* shared_info page starts its life empty. */
     shared_info = xc_map_foreign_range(
         xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, shared_info_frame);
-    printf("shared_info = %p, err=%s frame=%lx\n",
-           shared_info, strerror (errno), shared_info_frame);
+    printf("shared_info = %p frame=%lx\n",
+           shared_info, shared_info_frame);
     //memset(shared_info, 0, PAGE_SIZE);
     /* Mask all upcalls... */
     for ( i = 0; i < MAX_VIRT_CPUS; i++ )
@@ -631,17 +631,20 @@ static int compat_check(int xc_handle, s
     xen_capabilities_info_t xen_caps = "";
 
     if (xc_version(xc_handle, XENVER_capabilities, &xen_caps) != 0) {
-        ERROR("Cannot determine host capabilities.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Cannot determine host capabilities.");
         return 0;
     }
 
     if (strstr(xen_caps, "xen-3.0-x86_32p")) {
         if (dsi->pae_kernel == PAEKERN_no) {
-            ERROR("Non PAE-kernel on PAE host.");
+            xc_set_error(XC_INVALID_KERNEL,
+                         "Non PAE-kernel on PAE host.");
             return 0;
         }
     } else if (dsi->pae_kernel != PAEKERN_no) {
-        ERROR("PAE-kernel on non-PAE host.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "PAE-kernel on non-PAE host.");
         return 0;
     }
 
@@ -1154,7 +1157,6 @@ static int xc_linux_build_internal(int x
                      console_evtchn, console_mfn,
                      features_bitmap) < 0 )
     {
-        ERROR("Error constructing guest OS");
         goto error_out;
     }
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_load_elf.c Fri Dec 08 09:09:18 2006 -0700
@@ -29,20 +29,46 @@ loadelfsymtab(
  */
 #if defined(__ia64__)
 #define ELFCLASS   ELFCLASS64
+#define ELFCLASS_DESC "64-bit"
+
 #define ELFDATA    ELFDATA2LSB
+#define ELFDATA_DESC "Little-Endian"
+
 #define ELFMACHINE EM_IA_64
+#define ELFMACHINE_DESC "ia64"
+
+
 #elif defined(__i386__)
 #define ELFCLASS   ELFCLASS32
+#define ELFCLASS_DESC "32-bit"
+
 #define ELFDATA    ELFDATA2LSB
+#define ELFDATA_DESC "Little-Endian"
+
 #define ELFMACHINE EM_386
+#define ELFMACHINE_DESC "i386"
+
+
 #elif defined(__x86_64__)
 #define ELFCLASS   ELFCLASS64
+#define ELFCLASS_DESC "64-bit"
+
 #define ELFDATA    ELFDATA2LSB
+#define ELFDATA_DESC "Little-Endian"
+
 #define ELFMACHINE EM_X86_64
+#define ELFMACHINE_DESC "x86_64"
+
+
 #elif defined(__powerpc__)
 #define ELFCLASS   ELFCLASS64
+#define ELFCLASS_DESC "64-bit"
+
 #define ELFDATA    ELFDATA2MSB
+#define ELFDATA_DESC "Big-Endian"
+
 #define ELFMACHINE EM_PPC64
+#define ELFMACHINE_DESC "ppc64"
 #endif
 
 int probe_elf(const char *image,
@@ -231,7 +257,8 @@ unsigned long long xen_elfnote_numeric(s
         *defined = 1;
         return *(uint64_t*)ELFNOTE_DESC(note);
     default:
-        ERROR("elfnotes: unknown data size %#x for numeric type note %#x\n",
+        xc_set_error(XC_INVALID_KERNEL,
+                     "elfnotes: unknown data size %#x for numeric type note 
%#x\n",
               note->descsz, type);
         return 0;
     }
@@ -250,35 +277,59 @@ static int parseelfimage(const char *ima
 
     if ( !IS_ELF(*ehdr) )
     {
-        ERROR("Kernel image does not have an ELF header.");
-        return -EINVAL;
-    }
-
-    if ( (ehdr->e_ident[EI_CLASS] != ELFCLASS) ||
-         (ehdr->e_machine != ELFMACHINE) ||
-         (ehdr->e_ident[EI_DATA] != ELFDATA) ||
-         (ehdr->e_type != ET_EXEC) )
-    {
-        ERROR("Kernel not a Xen-compatible Elf image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel image does not have an ELF header.");
+        return -EINVAL;
+    }
+
+    if (ehdr->e_machine != ELFMACHINE)
+    {
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel ELF architecture '%d' does not match Xen 
architecture '%d' (%s)",
+                     ehdr->e_machine, ELFMACHINE, ELFMACHINE_DESC);
+        return -EINVAL;
+    }
+    if (ehdr->e_ident[EI_CLASS] != ELFCLASS)
+    {
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel ELF wordsize '%d' does not match Xen wordsize 
'%d' (%s)",
+                     ehdr->e_ident[EI_CLASS], ELFCLASS, ELFCLASS_DESC);
+        return -EINVAL;
+    }
+    if (ehdr->e_ident[EI_DATA] != ELFDATA)
+    {
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel ELF endianness '%d' does not match Xen endianness 
'%d' (%s)",
+                     ehdr->e_ident[EI_DATA], ELFDATA, ELFDATA_DESC);
+        return -EINVAL;
+    }
+    if (ehdr->e_type != ET_EXEC)
+    {
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Kernel ELF type '%d' does not match Xen type '%d'",
+                     ehdr->e_type, ET_EXEC);
         return -EINVAL;
     }
 
     if ( (ehdr->e_phoff + (ehdr->e_phnum*ehdr->e_phentsize)) > image_len )
     {
-        ERROR("ELF program headers extend beyond end of image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF program headers extend beyond end of image.");
         return -EINVAL;
     }
 
     if ( (ehdr->e_shoff + (ehdr->e_shnum*ehdr->e_shentsize)) > image_len )
     {
-        ERROR("ELF section headers extend beyond end of image.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF section headers extend beyond end of image.");
         return -EINVAL;
     }
 
     /* Find the section-header strings table. */
     if ( ehdr->e_shstrndx == SHN_UNDEF )
     {
-        ERROR("ELF image has no section-header strings table (shstrtab).");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF image has no section-header strings table 
(shstrtab).");
         return -EINVAL;
     }
     shdr = (Elf_Shdr *)(image + ehdr->e_shoff +
@@ -325,22 +376,25 @@ static int parseelfimage(const char *ima
         if ( ( loader == NULL || strncmp(loader, "generic", 7) ) &&
              ( guest_os == NULL || strncmp(guest_os, "linux", 5) ) )
         {
-            ERROR("Will only load images built for the generic loader "
-                  "or Linux images");
+            xc_set_error(XC_INVALID_KERNEL,
+                         "Will only load images built for the generic loader "
+                         "or Linux images");
             return -EINVAL;
         }
 
         if ( xen_version == NULL || strncmp(xen_version, "xen-3.0", 7) )
         {
-            ERROR("Will only load images built for Xen v3.0");
+            xc_set_error(XC_INVALID_KERNEL,
+                         "Will only load images built for Xen v3.0");
             return -EINVAL;
         }
     }
     else
     {
 #if defined(__x86_64__) || defined(__i386__)
-        ERROR("Not a Xen-ELF image: "
-              "No ELF notes or '__xen_guest' section found.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Not a Xen-ELF image: "
+                     "No ELF notes or '__xen_guest' section found.");
         return -EINVAL;
 #endif
     }
@@ -396,8 +450,9 @@ static int parseelfimage(const char *ima
 
     if ( elf_pa_off_defined && !virt_base_defined )
     {
-        ERROR("Neither ELF_PADDR_OFFSET nor VIRT_BASE found in ELF "
-              " notes or __xen_guest section.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "Neither ELF_PADDR_OFFSET nor VIRT_BASE found in ELF "
+                     " notes or __xen_guest section.");
         return -EINVAL;
     }
 
@@ -409,7 +464,8 @@ static int parseelfimage(const char *ima
         vaddr = phdr->p_paddr - dsi->elf_paddr_offset + dsi->v_start;
         if ( (vaddr + phdr->p_memsz) < vaddr )
         {
-            ERROR("ELF program header %d is too large.", h);
+            xc_set_error(XC_INVALID_KERNEL,
+                         "ELF program header %d is too large.", h);
             return -EINVAL;
         }
 
@@ -431,7 +487,8 @@ static int parseelfimage(const char *ima
          (dsi->v_kernentry > kernend) ||
          (dsi->v_start > kernstart) )
     {
-        ERROR("ELF start or entries are out of bounds.");
+        xc_set_error(XC_INVALID_KERNEL,
+                     "ELF start or entries are out of bounds.");
         return -EINVAL;
     }
 
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_private.c  Fri Dec 08 09:09:18 2006 -0700
@@ -7,6 +7,82 @@
 #include <inttypes.h>
 #include "xc_private.h"
 #include "xg_private.h"
+
+#include <stdarg.h>
+
+static __thread xc_error last_error = { XC_ERROR_NONE, ""};
+#if DEBUG
+static xc_error_handler error_handler = xc_default_error_handler;
+#else
+static xc_error_handler error_handler = NULL;
+#endif
+
+void xc_default_error_handler(const xc_error const *err)
+{
+    const char *desc = xc_error_code_to_desc(err->code);
+    fprintf(stderr, "ERROR %s: %s\n", desc, err->message);
+}
+
+const xc_error const *xc_get_last_error(void)
+{
+    return &last_error;
+}
+
+void xc_clear_last_error(void)
+{
+    last_error.code = XC_ERROR_NONE;
+    last_error.message[0] = '\0';
+}
+
+const char *xc_error_code_to_desc(int code)
+{
+    /* Sync to members of xc_error_code enumeration in xenctrl.h */
+    switch ( code )
+    {
+    case XC_ERROR_NONE:
+        return "No error details";
+    case XC_INTERNAL_ERROR:
+        return "Internal error";
+    case XC_INVALID_KERNEL:
+        return "Invalid kernel";
+    }
+
+    return "Unknown error code";
+}
+
+xc_error_handler xc_set_error_handler(xc_error_handler handler)
+{
+    xc_error_handler old = error_handler;
+    error_handler = handler;
+    return old;
+}
+
+
+static void _xc_set_error(int code, const char *msg)
+{
+    last_error.code = code;
+    strncpy(last_error.message, msg, XC_MAX_ERROR_MSG_LEN - 1);
+    last_error.message[XC_MAX_ERROR_MSG_LEN-1] = '\0';
+}
+
+void xc_set_error(int code, const char *fmt, ...)
+{
+    int saved_errno = errno;
+    char msg[XC_MAX_ERROR_MSG_LEN];
+    va_list args;
+
+    va_start(args, fmt);
+    vsnprintf(msg, XC_MAX_ERROR_MSG_LEN-1, fmt, args);
+    msg[XC_MAX_ERROR_MSG_LEN-1] = '\0';
+    va_end(args);
+
+    _xc_set_error(code, msg);
+
+    errno = saved_errno;
+
+    if ( error_handler != NULL )
+        error_handler(&last_error);
+}
 
 int lock_pages(void *addr, size_t len)
 {
@@ -407,6 +483,19 @@ unsigned long xc_make_page_below_4G(
     return new_mfn;
 }
 
+char *safe_strerror(int errcode)
+{
+    static __thread char errbuf[32];
+#ifdef __GLIBC__
+    /* Broken GNU definition of strerror_r may not use our supplied buffer. */
+    return strerror_r(errcode, errbuf, sizeof(errbuf));
+#else
+    /* Assume we have the POSIX definition of strerror_r. */
+    strerror_r(errcode, errbuf, sizeof(errbuf));
+    return errbuf;
+#endif
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xc_private.h
--- a/tools/libxc/xc_private.h  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xc_private.h  Fri Dec 08 09:09:18 2006 -0700
@@ -59,23 +59,15 @@
 #define PPRINTF(_f, _a...)
 #endif
 
-#define ERROR(_m, _a...)                        \
-do {                                            \
-    int __saved_errno = errno;                  \
-    DPRINTF("ERROR: " _m "\n" , ## _a );        \
-    errno = __saved_errno;                      \
-} while (0)
+char *safe_strerror(int errcode);
+void xc_set_error(int code, const char *fmt, ...);
+
+#define ERROR(_m, _a...)  xc_set_error(XC_INTERNAL_ERROR, _m , ## _a )
+#define PERROR(_m, _a...) xc_set_error(XC_INTERNAL_ERROR, _m " (%d = %s)", \
+                                       ## _a , errno, safe_strerror(errno))
 
 int lock_pages(void *addr, size_t len);
 void unlock_pages(void *addr, size_t len);
-
-#define PERROR(_m, _a...)                               \
-do {                                                    \
-    int __saved_errno = errno;                          \
-    DPRINTF("ERROR: " _m " (%d = %s)\n" , ## _a ,       \
-            __saved_errno, strerror(__saved_errno));    \
-    errno = __saved_errno;                              \
-} while (0)
 
 static inline void safe_munlock(const void *addr, size_t len)
 {
diff -r 968caf47b548 -r 970ff2ba748f tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/libxc/xenctrl.h     Fri Dec 08 09:09:18 2006 -0700
@@ -419,6 +419,10 @@ int xc_domain_setmaxmem(int xc_handle,
                         uint32_t domid,
                         unsigned int max_memkb);
 
+int xc_domain_set_memmap_limit(int xc_handle,
+                               uint32_t domid,
+                               unsigned long map_limitkb);
+
 int xc_domain_set_time_offset(int xc_handle,
                               uint32_t domid,
                               int32_t time_offset_seconds);
@@ -682,4 +686,46 @@ int xc_hvm_set_pci_link_route(
 int xc_hvm_set_pci_link_route(
     int xc_handle, domid_t dom, uint8_t link, uint8_t isa_irq);
 
+
+typedef enum {
+  XC_ERROR_NONE = 0,
+  XC_INTERNAL_ERROR = 1,
+  XC_INVALID_KERNEL = 2,
+} xc_error_code;
+
+#define XC_MAX_ERROR_MSG_LEN 1024
+typedef struct {
+  int code;
+  char message[XC_MAX_ERROR_MSG_LEN];
+} xc_error;
+
+/*
+ * Return a pointer to the last error. This pointer and the
+ * data pointed to are only valid until the next call to
+ * libxc.
+ */
+const xc_error const *xc_get_last_error(void);
+
+/*
+ * Clear the last error
+ */
+void xc_clear_last_error(void);
+
+typedef void (*xc_error_handler)(const xc_error const* err);
+
+/*
+ * The default error handler which prints to stderr
+ */
+void xc_default_error_handler(const xc_error const* err);
+
+/*
+ * Convert an error code into a text description
+ */
+const char *xc_error_code_to_desc(int code);
+
+/*
+ * Registers a callback to handle errors
+ */
+xc_error_handler xc_set_error_handler(xc_error_handler handler);
+
 #endif
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Dec 08 09:09:18 2006 -0700
@@ -29,7 +29,7 @@
 #define PKG "xen.lowlevel.xc"
 #define CLS "xc"
 
-static PyObject *xc_error, *zero;
+static PyObject *xc_error_obj, *zero;
 
 typedef struct {
     PyObject_HEAD;
@@ -40,6 +40,26 @@ static PyObject *dom_op(XcObject *self, 
 static PyObject *dom_op(XcObject *self, PyObject *args,
                         int (*fn)(int, uint32_t));
 
+static PyObject *pyxc_error_to_exception(void)
+{
+    PyObject *pyerr;
+    const xc_error const *err = xc_get_last_error();
+    const char *desc = xc_error_code_to_desc(err->code);
+
+    if (err->code == XC_ERROR_NONE)
+        return PyErr_SetFromErrno(xc_error_obj);
+
+    if (err->message[0] != '\0')
+       pyerr = Py_BuildValue("(iss)", err->code, desc, err->message);
+    else
+       pyerr = Py_BuildValue("(is)", err->code, desc);
+
+    xc_clear_last_error();
+
+    PyErr_SetObject(xc_error_obj, pyerr);
+
+    return NULL;
+}
 
 static PyObject *pyxc_domain_dumpcore(XcObject *self, PyObject *args)
 {
@@ -53,7 +73,7 @@ static PyObject *pyxc_domain_dumpcore(Xc
         return NULL;
 
     if (xc_domain_dumpcore(self->xc_handle, dom, corefile) != 0)
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -101,13 +121,13 @@ static PyObject *pyxc_domain_create(XcOb
 
     if ( (ret = xc_domain_create(self->xc_handle, ssidref,
                                  handle, flags, &dom)) < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return PyInt_FromLong(dom);
 
 out_exception:
     errno = EINVAL;
-    PyErr_SetFromErrno(xc_error);
+    PyErr_SetFromErrno(xc_error_obj);
     return NULL;
 }
 
@@ -119,7 +139,7 @@ static PyObject *pyxc_domain_max_vcpus(X
       return NULL;
 
     if (xc_domain_max_vcpus(self->xc_handle, dom, max) != 0)
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -164,7 +184,7 @@ static PyObject *pyxc_vcpu_setaffinity(X
     }
   
     if ( xc_vcpu_setaffinity(self->xc_handle, dom, vcpu, cpumap) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -184,7 +204,7 @@ static PyObject *pyxc_domain_setcpuweigh
         return NULL;
 
     if ( xc_domain_setcpuweight(self->xc_handle, dom, cpuweight) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -215,14 +235,13 @@ static PyObject *pyxc_domain_sethandle(X
     }
 
     if (xc_domain_sethandle(self->xc_handle, dom, handle) < 0)
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
 
 out_exception:
-    errno = EINVAL;
-    PyErr_SetFromErrno(xc_error);
+    PyErr_SetFromErrno(xc_error_obj);
     return NULL;
 }
 
@@ -251,7 +270,7 @@ static PyObject *pyxc_domain_getinfo(XcO
     if (nr_doms < 0)
     {
         free(info);
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     }
 
     list = PyList_New(nr_doms);
@@ -306,10 +325,10 @@ static PyObject *pyxc_vcpu_getinfo(XcObj
 
     rc = xc_vcpu_getinfo(self->xc_handle, dom, vcpu, &info);
     if ( rc < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     rc = xc_vcpu_getaffinity(self->xc_handle, dom, vcpu, &cpumap);
     if ( rc < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     info_dict = Py_BuildValue("{s:i,s:i,s:i,s:L,s:i}",
                               "online",   info.online,
@@ -360,9 +379,7 @@ static PyObject *pyxc_linux_build(XcObje
                         ramdisk, cmdline, features, flags,
                         store_evtchn, &store_mfn,
                         console_evtchn, &console_mfn) != 0 ) {
-        if (!errno)
-             errno = EINVAL;
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     }
     return Py_BuildValue("{s:i,s:i}", 
                          "store_mfn", store_mfn,
@@ -396,7 +413,7 @@ static PyObject *pyxc_hvm_build(XcObject
     xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_VCPUS, vcpus);
 #endif
     if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
 #if !defined(__ia64__)
     /* Set up the HVM info table. */
@@ -404,7 +421,7 @@ static PyObject *pyxc_hvm_build(XcObject
                                   PROT_READ | PROT_WRITE,
                                   HVM_INFO_PFN);
     if ( va_map == NULL )
-        return PyErr_SetFromErrno(xc_error);
+        return PyErr_SetFromErrno(xc_error_obj);
     va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET);
     memset(va_hvm, 0, sizeof(*va_hvm));
     strncpy(va_hvm->signature, "HVM INFO", 8);
@@ -442,7 +459,7 @@ static PyObject *pyxc_evtchn_alloc_unbou
         return NULL;
 
     if ( (port = xc_evtchn_alloc_unbound(self->xc_handle, dom, remote_dom)) < 
0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return PyInt_FromLong(port);
 }
@@ -463,7 +480,7 @@ static PyObject *pyxc_physdev_pci_access
     ret = xc_physdev_pci_access_modify(
         self->xc_handle, dom, bus, dev, func, enable);
     if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -485,7 +502,7 @@ static PyObject *pyxc_readconsolering(Xc
 
     ret = xc_readconsolering(self->xc_handle, &str, &count, clear);
     if ( ret < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return PyString_FromStringAndSize(str, count);
 }
@@ -515,7 +532,7 @@ static PyObject *pyxc_physinfo(XcObject 
     int i;
     
     if ( xc_physinfo(self->xc_handle, &info) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     *q=0;
     for(i=0;i<sizeof(info.hw_cap)/4;i++)
@@ -553,25 +570,25 @@ static PyObject *pyxc_xeninfo(XcObject *
     xen_version = xc_version(self->xc_handle, XENVER_version, NULL);
 
     if ( xc_version(self->xc_handle, XENVER_extraversion, &xen_extra) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     if ( xc_version(self->xc_handle, XENVER_compile_info, &xen_cc) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     if ( xc_version(self->xc_handle, XENVER_changeset, &xen_chgset) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     if ( xc_version(self->xc_handle, XENVER_capabilities, &xen_caps) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     if ( xc_version(self->xc_handle, XENVER_platform_parameters, &p_parms) != 
0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     sprintf(str, "virt_start=0x%lx", p_parms.virt_start);
 
     xen_pagesize = xc_version(self->xc_handle, XENVER_pagesize, NULL);
     if (xen_pagesize < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return Py_BuildValue("{s:i,s:i,s:s,s:s,s:i,s:s,s:s,s:s,s:s,s:s,s:s}",
                          "xen_major", xen_version >> 16,
@@ -604,7 +621,7 @@ static PyObject *pyxc_sedf_domain_set(Xc
         return NULL;
    if ( xc_sedf_domain_set(self->xc_handle, domid, period,
                            slice, latency, extratime,weight) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -621,7 +638,7 @@ static PyObject *pyxc_sedf_domain_get(Xc
     
     if (xc_sedf_domain_get(self->xc_handle, domid, &period,
                            &slice,&latency,&extratime,&weight))
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return Py_BuildValue("{s:i,s:L,s:L,s:L,s:i,s:i}",
                          "domid",    domid,
@@ -649,7 +666,7 @@ static PyObject *pyxc_shadow_control(PyO
     
     if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, NULL, 0, NULL) 
          < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -679,7 +696,7 @@ static PyObject *pyxc_shadow_mem_control
         op = XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION;
     }
     if ( xc_shadow_control(xc->xc_handle, dom, op, NULL, 0, &mb, 0, NULL) < 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     mbarg = mb;
     return Py_BuildValue("i", mbarg);
@@ -689,7 +706,7 @@ static PyObject *pyxc_sched_id_get(XcObj
     
     int sched_id;
     if (xc_sched_id(self->xc_handle, &sched_id) != 0)
-        return PyErr_SetFromErrno(xc_error);
+        return PyErr_SetFromErrno(xc_error_obj);
 
     return Py_BuildValue("i", sched_id);
 }
@@ -715,7 +732,7 @@ static PyObject *pyxc_sched_credit_domai
     sdom.cap = cap;
 
     if ( xc_sched_credit_domain_set(self->xc_handle, domid, &sdom) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -730,7 +747,7 @@ static PyObject *pyxc_sched_credit_domai
         return NULL;
     
     if ( xc_sched_credit_domain_get(self->xc_handle, domid, &sdom) != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     return Py_BuildValue("{s:H,s:H}",
                          "weight",  sdom.weight,
@@ -746,7 +763,22 @@ static PyObject *pyxc_domain_setmaxmem(X
         return NULL;
 
     if (xc_domain_setmaxmem(self->xc_handle, dom, maxmem_kb) != 0)
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
+    
+    Py_INCREF(zero);
+    return zero;
+}
+
+static PyObject *pyxc_domain_set_memmap_limit(XcObject *self, PyObject *args)
+{
+    uint32_t dom;
+    unsigned int maplimit_kb;
+
+    if ( !PyArg_ParseTuple(args, "ii", &dom, &maplimit_kb) )
+        return NULL;
+
+    if ( xc_domain_set_memmap_limit(self->xc_handle, dom, maplimit_kb) != 0 )
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -773,7 +805,7 @@ static PyObject *pyxc_domain_memory_incr
     if ( xc_domain_memory_increase_reservation(self->xc_handle, dom, 
                                                nr_extents, extent_order, 
                                                address_bits, NULL) )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
     
     Py_INCREF(zero);
     return zero;
@@ -795,7 +827,7 @@ static PyObject *pyxc_domain_ioport_perm
     ret = xc_domain_ioport_permission(
         self->xc_handle, dom, first_port, nr_ports, allow_access);
     if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -818,7 +850,7 @@ static PyObject *pyxc_domain_irq_permiss
     ret = xc_domain_irq_permission(
         xc->xc_handle, dom, pirq, allow_access);
     if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -841,7 +873,7 @@ static PyObject *pyxc_domain_iomem_permi
     ret = xc_domain_iomem_permission(
         xc->xc_handle, dom, first_pfn, nr_pfns, allow_access);
     if ( ret != 0 )
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -881,7 +913,7 @@ static PyObject *dom_op(XcObject *self, 
         return NULL;
 
     if (fn(self->xc_handle, dom) != 0)
-        return PyErr_SetFromErrno(xc_error);
+        return pyxc_error_to_exception();
 
     Py_INCREF(zero);
     return zero;
@@ -1135,6 +1167,14 @@ static PyMethodDef pyxc_methods[] = {
       " maxmem_kb [int]: .\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
+    { "domain_set_memmap_limit", 
+      (PyCFunction)pyxc_domain_set_memmap_limit, 
+      METH_VARARGS, "\n"
+      "Set a domain's physical memory mappping limit\n"
+      " dom [int]: Identifier of domain.\n"
+      " map_limitkb [int]: .\n"
+      "Returns: [int] 0 on success; -1 on error.\n" },
+
     { "domain_memory_increase_reservation", 
       (PyCFunction)pyxc_domain_memory_increase_reservation, 
       METH_VARARGS | METH_KEYWORDS, "\n"
@@ -1210,7 +1250,7 @@ PyXc_init(XcObject *self, PyObject *args
 PyXc_init(XcObject *self, PyObject *args, PyObject *kwds)
 {
     if ((self->xc_handle = xc_interface_open()) == -1) {
-        PyErr_SetFromErrno(xc_error);
+        pyxc_error_to_exception();
         return -1;
     }
 
@@ -1283,7 +1323,7 @@ PyMODINIT_FUNC initxc(void)
     if (m == NULL)
       return;
 
-    xc_error = PyErr_NewException(PKG ".Error", PyExc_RuntimeError, NULL);
+    xc_error_obj = PyErr_NewException(PKG ".Error", PyExc_RuntimeError, NULL);
     zero = PyInt_FromLong(0);
 
     /* KAF: This ensures that we get debug output in a timely manner. */
@@ -1293,8 +1333,8 @@ PyMODINIT_FUNC initxc(void)
     Py_INCREF(&PyXcType);
     PyModule_AddObject(m, CLS, (PyObject *)&PyXcType);
 
-    Py_INCREF(xc_error);
-    PyModule_AddObject(m, "Error", xc_error);
+    Py_INCREF(xc_error_obj);
+    PyModule_AddObject(m, "Error", xc_error_obj);
 
     /* Expose some libxc constants to Python */
     PyModule_AddIntConstant(m, "XEN_SCHEDULER_SEDF", XEN_SCHEDULER_SEDF);
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/web/httpserver.py
--- a/tools/python/xen/web/httpserver.py        Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/web/httpserver.py        Fri Dec 08 09:09:18 2006 -0700
@@ -264,7 +264,32 @@ class HttpServerRequest(http.HttpRequest
             s += x + "/"
             self.write(' <a href="%s">%s</a>/' % (s, x))
         self.write("</h1>")
-        
+
+class HttpServerClient:
+
+    def __init__(self, server, sock, addr):
+        self.server = server
+        self.sock = sock
+        self.addr = addr
+
+    def process(self):
+        thread = threading.Thread(target=self.doProcess)
+        thread.setDaemon(True)
+        thread.start()
+
+    def doProcess(self):
+        try:
+            rp = RequestProcessor(self.server, self.sock, self.addr)
+            rp.process()
+        except SystemExit:
+            raise
+        except Exception, ex:
+            print 'HttpServer>processRequest> exception: ', ex
+            try:
+                self.sock.close()
+            except:
+                pass
+
 class HttpServer:
 
     backlog = 5
@@ -286,8 +311,8 @@ class HttpServer:
 
         while not self.closed:
             (sock, addr) = self.accept()
-            self.processRequest(sock, addr)
-
+            cl = HttpServerClient(self, sock, addr)
+            cl.process()
 
     def stop(self):
         self.close()
@@ -313,19 +338,6 @@ class HttpServer:
             self.socket.close()
         except:
             pass
-
-    def processRequest(self, sock, addr):
-        try:
-            rp = RequestProcessor(self, sock, addr)
-            rp.process()
-        except SystemExit:
-            raise
-        except Exception, ex:
-            print 'HttpServer>processRequest> exception: ', ex
-            try:
-                sock.close()
-            except:
-                pass
 
     def getServerAddr(self):
         return (socket.gethostname(), self.port)
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/XendAPI.py  Fri Dec 08 09:09:18 2006 -0700
@@ -821,8 +821,9 @@ class XendAPI:
         dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
         return xen_api_todo()
     
-    def VM_set_name_label(self, session, vm_ref):
-        dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+    def VM_set_name_label(self, session, vm_ref, label):
+        dom = XendDomain.instance().get_vm_by_uuid(vm_ref)
+        dom.setName(label)
         return xen_api_success_void()
     
     def VM_set_name_description(self, session, vm_ref):
@@ -1035,8 +1036,8 @@ class XendAPI:
     #       regular xm created VBDs
 
     VBD_attr_ro = ['image',
-                   'IO_bandwidth_incoming_kbs',
-                   'IO_bandwidth_outgoing_kbs']
+                   'io_read_kbs',
+                   'io_write_kbs']
     VBD_attr_rw = ['VM',
                    'VDI',
                    'device',
@@ -1056,7 +1057,16 @@ class XendAPI:
         cfg = vm.get_dev_xenapi_config('vbd', vbd_ref)
         if not cfg:
             return xen_api_error(XEND_ERROR_VBD_INVALID)
-        return xen_api_success(cfg)
+
+        valid_vbd_keys = self.VBD_attr_ro + self.VBD_attr_rw + \
+                         self.Base_attr_ro + self.Base_attr_rw
+
+        return_cfg = {}
+        for k in cfg.keys():
+            if k in valid_vbd_keys:
+                return_cfg[k] = cfg[k]
+                
+        return xen_api_success(return_cfg)
 
     def VBD_media_change(self, session, vbd_ref, vdi_ref):
         return xen_api_error(XEND_ERROR_UNSUPPORTED)
@@ -1112,10 +1122,8 @@ class XendAPI:
     # Xen API: Class VIF
     # ----------------------------------------------------------------
 
-    VIF_attr_ro = ['network_read_kbs',
-                   'network_write_kbs',
-                   'IO_bandwidth_incoming_kbs',
-                   'IO_bandwidth_outgoing_kbs']
+    VIF_attr_ro = ['io_read_kbs',
+                   'io_write_kbs']
     VIF_attr_rw = ['name',
                    'type',
                    'device',
@@ -1135,13 +1143,16 @@ class XendAPI:
         cfg = vm.get_dev_xenapi_config('vif', vif_ref)
         if not cfg:
             return xen_api_error(XEND_ERROR_VIF_INVALID)
+        
         valid_vif_keys = self.VIF_attr_ro + self.VIF_attr_rw + \
                          self.Base_attr_ro + self.Base_attr_rw
+
+        return_cfg = {}
         for k in cfg.keys():
-            if k not in valid_vif_keys:
-                del cfg[k]
+            if k in valid_vif_keys:
+                return_cfg[k] = cfg[k]
             
-        return xen_api_success(cfg)
+        return xen_api_success(return_cfg)
 
     # class methods
     def VIF_create(self, session, vif_struct):
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/XendCheckpoint.py   Fri Dec 08 09:09:18 2006 -0700
@@ -137,7 +137,6 @@ def restore(xd, fd, dominfo = None, paus
     vmconfig = p.get_val()
 
     if dominfo:
-        dominfo.update(XendConfig(sxp_obj = vmconfig), refresh = False)
         dominfo.resume()
     else:
         dominfo = xd.restore_(vmconfig)
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/XendConfig.py       Fri Dec 08 09:09:18 2006 -0700
@@ -41,6 +41,39 @@ def reverse_dict(adict):
 
 def bool0(v):
     return v != '0' and bool(v)
+
+# Recursively copy a data struct, scrubbing out VNC passwords.
+# Will scrub any dict entry with a key of 'vncpasswd' or any
+# 2-element list whose first member is 'vncpasswd'. It will
+# also scrub a string matching '(vncpasswd XYZ)'. Everything
+# else is no-op passthrough
+def scrub_password(data):
+    if type(data) == dict or type(data) == XendConfig:
+        scrubbed = {}
+        for key in data.keys():
+            if key == "vncpasswd":
+                scrubbed[key] = "XXXXXXXX"
+            else:
+                scrubbed[key] = scrub_password(data[key])
+        return scrubbed
+    elif type(data) == list:
+        if len(data) == 2 and type(data[0]) == str and data[0] == 'vncpasswd':
+            return ['vncpasswd', 'XXXXXXXX']
+        else:
+            scrubbed = []
+            for entry in data:
+                scrubbed.append(scrub_password(entry))
+            return scrubbed
+    elif type(data) == tuple:
+        scrubbed = []
+        for entry in data:
+            scrubbed.append(scrub_password(entry))
+        return tuple(scrubbed)
+    elif type(data) == str:
+        return re.sub(r'\(vncpasswd\s+[^\)]+\)','(vncpasswd XXXXXX)', data)
+    else:
+        return data
+
 
 # Mapping from XendConfig configuration keys to the old
 # legacy configuration keys that map directly.
@@ -269,7 +302,7 @@ class XendConfig(dict):
             # output from xc.domain_getinfo
             self._dominfo_to_xapi(dominfo)
 
-        log.debug('XendConfig.init: %s' % self)
+        log.debug('XendConfig.init: %s' % scrub_password(self))
 
         # validators go here
         self.validate()
@@ -353,10 +386,15 @@ class XendConfig(dict):
         if self['builder'] not in ('hvm', 'linux'):
             raise XendConfigError('Invalid builder configuration')
 
+    def _vcpus_sanity_check(self):
+        if self.get('vcpus_number') != None:
+            self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
+
     def validate(self):
         self._memory_sanity_check()
         self._actions_sanity_check()
         self._builder_sanity_check()
+        self._vcpus_sanity_check()
 
     def _dominfo_to_xapi(self, dominfo):
         self['domid'] = dominfo['domid']
@@ -471,14 +509,8 @@ class XendConfig(dict):
                 
                 log.debug("XendConfig: reading device: %s" % pci_devs)
             else:
-                for opt, val in config[1:]:
-                    dev_info[opt] = val
-                log.debug("XendConfig: reading device: %s" % dev_info)
-                # create uuid if it doesn't
-                dev_uuid = dev_info.get('uuid', uuid.createString())
-                dev_info['uuid'] = dev_uuid
-                cfg['devices'][dev_uuid] = (dev_type, dev_info)
-
+                self.device_add(dev_type, cfg_sxp = config, target = cfg)
+                log.debug("XendConfig: reading device: %s" % 
scrub_password(dev_info))
 
         # Extract missing data from configuration entries
         image_sxp = sxp.child_value(sxp_cfg, 'image', [])
@@ -600,6 +632,9 @@ class XendConfig(dict):
         self['memory_dynamic_max'] = self['memory_static_max']
         self['memory_dynamic_min'] = self['memory_static_min']
 
+        # make sure max_vcpu_id is set correctly
+        self['max_vcpu_id'] = self['vcpus_number'] - 1
+
         # set device references in the configuration
         self['devices'] = cfg.get('devices', {})
         
@@ -675,13 +710,14 @@ class XendConfig(dict):
                 else:
                     self[sxp_arg] = val
 
+        _set_cfg_if_exists('bootloader')
         _set_cfg_if_exists('shadow_memory')
         _set_cfg_if_exists('security')
         _set_cfg_if_exists('features')
         _set_cfg_if_exists('on_xend_stop')
         _set_cfg_if_exists('on_xend_start')
         _set_cfg_if_exists('vcpu_avail')
-        _set_cfg_if_exists('max_vcpu_id') # TODO, deprecated?
+        _set_cfg_if_exists('max_vcpu_id') # needed for vcpuDomDetails
         
         # Parse and store runtime configuration 
         _set_cfg_if_exists('start_time')
@@ -828,7 +864,8 @@ class XendConfig(dict):
 
         return sxpr    
     
-    def device_add(self, dev_type, cfg_sxp = None, cfg_xenapi = None):
+    def device_add(self, dev_type, cfg_sxp = None, cfg_xenapi = None,
+                   target = None):
         """Add a device configuration in SXP format or XenAPI struct format.
 
         For SXP, it could be either:
@@ -843,9 +880,14 @@ class XendConfig(dict):
         @param cfg_sxp: SXP configuration object
         @type cfg_xenapi: dict
         @param cfg_xenapi: A device configuration from Xen API (eg. vbd,vif)
+        @param target: write device information to
+        @type target: None or a dictionary
         @rtype: string
         @return: Assigned UUID of the device.
         """
+        if target == None:
+            target = self
+        
         if dev_type not in XendDevices.valid_devices() and \
            dev_type not in XendDevices.pseudo_devices():        
             raise XendConfigError("XendConfig: %s not a valid device type" %
@@ -875,10 +917,12 @@ class XendConfig(dict):
             except ValueError:
                 pass # SXP has no options for this device
 
-            
-            def _get_config_ipaddr(config):
+
+            # Special handling for certain device parameters.
+
+            def _get_config_ipaddr(cfg):
                 val = []
-                for ipaddr in sxp.children(config, elt='ip'):
+                for ipaddr in sxp.children(cfg, elt='ip'):
                     val.append(sxp.child0(ipaddr))
                 return val
 
@@ -897,11 +941,18 @@ class XendConfig(dict):
             dev_info['uuid'] = dev_uuid
 
             # store dev references by uuid for certain device types
-            self['devices'][dev_uuid] = (dev_type, dev_info)
+            target['devices'][dev_uuid] = (dev_type, dev_info)
             if dev_type in ('vif', 'vbd', 'vtpm'):
-                self['%s_refs' % dev_type].append(dev_uuid)
+                param = '%s_refs' % dev_type
+                if param not in target:
+                    target[param] = []
+                if dev_uuid not in target[param]:
+                    target[param].append(dev_uuid)
             elif dev_type in ('tap',):
-                self['vbd_refs'].append(dev_uuid)
+                if 'vbd_refs' not in target:
+                    target['vbd_refs'] = []
+                if dev_uuid not in target['vbd_refs']:
+                    target['vbd_refs'].append(dev_uuid)
 
             return dev_uuid
 
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/XendDomain.py       Fri Dec 08 09:09:18 2006 -0700
@@ -641,17 +641,22 @@ class XendDomain:
         return (self.get_vm_with_dev_uuid(klass, dev_uuid) != None)
 
     def do_legacy_api_with_uuid(self, fn, vm_uuid, *args, **kwargs):
+        dom = self.uuid_to_dom(vm_uuid)
+        fn(dom, *args, **kwargs)
+
+    def uuid_to_dom(self, vm_uuid):
         self.domains_lock.acquire()
         try:
             for domid, dom in self.domains.items():
-                if dom.get_uuid == vm_uuid:
-                    return fn(domid, *args, **kwargs)
+                if dom.get_uuid() == vm_uuid:
+                    return domid
                     
             if vm_uuid in self.managed_domains:
                 domid = self.managed_domains[vm_uuid].getDomid()
-                if domid == None:
-                    domid = self.managed_domains[vm_uuid].getName()
-                return fn(domid, *args, **kwargs)
+                if domid is None:
+                    return self.managed_domains[vm_uuid].getName()
+                else:
+                    return domid
             
             raise XendInvalidDomain("Domain does not exist")
         finally:
@@ -808,7 +813,7 @@ class XendDomain:
                     raise XendError("Cannot save privileged domain %s" % 
domname)
 
                 if dominfo.state != DOM_STATE_HALTED:
-                    raise XendError("Cannot suspend domain that is not 
running.")
+                    raise XendError("Cannot resume domain that is not halted.")
 
                 dom_uuid = dominfo.get_uuid()
                 chkpath = self._managed_check_point_path(dom_uuid)
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 08 09:09:18 2006 -0700
@@ -40,6 +40,7 @@ from xen.xend import balloon, sxp, uuid,
 from xen.xend import balloon, sxp, uuid, image, arch
 from xen.xend import XendRoot, XendNode, XendConfig
 
+from xen.xend.XendConfig import scrub_password
 from xen.xend.XendBootloader import bootloader
 from xen.xend.XendError import XendError, VmError
 from xen.xend.XendDevices import XendDevices
@@ -148,7 +149,7 @@ def create(config):
     @raise VmError: Invalid configuration or failure to start.
     """
 
-    log.debug("XendDomainInfo.create(%s)", config)
+    log.debug("XendDomainInfo.create(%s)", scrub_password(config))
     vm = XendDomainInfo(XendConfig.XendConfig(sxp_obj = config))
     try:
         vm.start()
@@ -175,7 +176,7 @@ def recreate(info, priv):
     @raise XendError: Errors with configuration.
     """
 
-    log.debug("XendDomainInfo.recreate(%s)", info)
+    log.debug("XendDomainInfo.recreate(%s)", scrub_password(info))
 
     assert not info['dying']
 
@@ -257,7 +258,7 @@ def restore(config):
     @raise XendError: Errors with configuration.
     """
 
-    log.debug("XendDomainInfo.restore(%s)", config)
+    log.debug("XendDomainInfo.restore(%s)", scrub_password(config))
     vm = XendDomainInfo(XendConfig.XendConfig(sxp_obj = config),
                         resume = True)
     try:
@@ -280,7 +281,7 @@ def createDormant(domconfig):
     @raise XendError: Errors with configuration.    
     """
     
-    log.debug("XendDomainInfo.createDormant(%s)", domconfig)
+    log.debug("XendDomainInfo.createDormant(%s)", scrub_password(domconfig))
     
     # domid does not make sense for non-running domains.
     domconfig.pop('domid', None)
@@ -520,11 +521,11 @@ class XendDomainInfo:
         @param dev_config: device configuration
         @type  dev_config: SXP object (parsed config)
         """
-        log.debug("XendDomainInfo.device_create: %s" % dev_config)
+        log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config))
         dev_type = sxp.name(dev_config)
         dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config)
         dev_config_dict = self.info['devices'][dev_uuid][1]
-        log.debug("XendDomainInfo.device_create: %s" % dev_config_dict)
+        log.debug("XendDomainInfo.device_create: %s" % 
scrub_password(dev_config_dict))
         devid = self._createDevice(dev_type, dev_config_dict)
         self._waitForDevice(dev_type, devid)
         return self.getDeviceController(dev_type).sxpr(devid)
@@ -746,7 +747,7 @@ class XendDomainInfo:
 
         to_store.update(self._vcpuDomDetails())
 
-        log.debug("Storing domain details: %s", to_store)
+        log.debug("Storing domain details: %s", scrub_password(to_store))
 
         self._writeDom(to_store)
 
@@ -875,10 +876,18 @@ class XendDomainInfo:
 
     def setVCpuCount(self, vcpus):
         self.info['vcpu_avail'] = (1 << vcpus) - 1
-        self.info['vcpus_number'] = vcpus
         self.storeVm('vcpu_avail', self.info['vcpu_avail'])
-        self.storeVm('vcpus', self.info['vcpus_number'])
-        self._writeDom(self._vcpuDomDetails())
+        # update dom differently depending on whether we are adjusting
+        # vcpu number up or down, otherwise _vcpuDomDetails does not
+        # disable the vcpus
+        if self.info['vcpus_number'] > vcpus:
+            # decreasing
+            self._writeDom(self._vcpuDomDetails())
+            self.info['vcpus_number'] = vcpus
+        else:
+            # same or increasing
+            self.info['vcpus_number'] = vcpus
+            self._writeDom(self._vcpuDomDetails())
 
     def getLabel(self):
         return security.get_security_info(self.info, 'label')
@@ -1188,7 +1197,7 @@ class XendDomainInfo:
         """
         for (devclass, config) in self.info.get('devices', {}).values():
             if devclass in XendDevices.valid_devices():            
-                log.info("createDevice: %s : %s" % (devclass, config))
+                log.info("createDevice: %s : %s" % (devclass, 
scrub_password(config)))
                 self._createDevice(devclass, config)
 
         if self.image:
@@ -1326,7 +1335,7 @@ class XendDomainInfo:
 
         # if we have a boot loader but no image, then we need to set things
         # up by running the boot loader non-interactively
-        if self.info.get('bootloader') and self.info.get('image'):
+        if self.info.get('bootloader'):
             self._configureBootloader()
 
         if not self._infoIsSet('image'):
@@ -1532,11 +1541,17 @@ class XendDomainInfo:
         if not self.info.get('bootloader'):
             return
         blcfg = None
+
         # FIXME: this assumes that we want to use the first disk device
-        for devuuid, (devtype, devinfo) in self.info.all_devices_sxpr():
+        for (devtype, devinfo) in self.info.all_devices_sxpr():
             if not devtype or not devinfo or devtype not in ('vbd', 'tap'):
                 continue
-            disk = devinfo.get('uname')
+            disk = None
+            for param in devinfo:
+                if param[0] == 'uname':
+                    disk = param[1]
+                    break
+
             if disk is None:
                 continue
             fn = blkdev_uname_to_file(disk)
@@ -1661,7 +1676,7 @@ class XendDomainInfo:
         if not self._readVm('xend/restart_count'):
             to_store['xend/restart_count'] = str(0)
 
-        log.debug("Storing VM details: %s", to_store)
+        log.debug("Storing VM details: %s", scrub_password(to_store))
 
         self._writeVm(to_store)
         self._setVmPermissions()
@@ -1773,13 +1788,13 @@ class XendDomainInfo:
         return dom_uuid
     
     def get_memory_static_max(self):
-        return self.info.get('memory_static_max')
+        return self.info.get('memory_static_max', 0)
     def get_memory_static_min(self):
-        return self.info.get('memory_static_min')
+        return self.info.get('memory_static_min', 0)
     def get_memory_dynamic_max(self):
-        return self.info.get('memory_dynamic_min')
+        return self.info.get('memory_dynamic_max', 0)
     def get_memory_dynamic_min(self):
-        return self.info.get('memory_dynamic_max')
+        return self.info.get('memory_dynamic_min', 0)
     
     
     def get_vcpus_policy(self):
@@ -1813,7 +1828,7 @@ class XendDomainInfo:
     def get_builder(self):
         return self.info.get('builder', 0)
     def get_boot_method(self):
-        return self.info.get('boot_method', '')
+        return self.info.get('boot_method', XEN_API_BOOT_TYPE[2])
     def get_kernel_image(self):
         return self.info.get('kernel_kernel', '')
     def get_kernel_initrd(self):
@@ -1823,7 +1838,7 @@ class XendDomainInfo:
     def get_grub_cmdline(self):
         return '' # TODO
     def get_pci_bus(self):
-        return 0 # TODO
+        return '' # TODO
     def get_tools_version(self):
         return {} # TODO
     def get_other_config(self):
@@ -1918,18 +1933,16 @@ class XendDomainInfo:
                     
             config['network'] = '' # Invalid for Xend
             config['MTU'] = 1500 # TODO
-            config['network_read_kbs'] = 0.0
-            config['network_write_kbs'] = 0.0
-            config['IO_bandwidth_incoming_kbs'] = 0.0
-            config['IO_bandwidth_outgoing_kbs'] = 0.0
+            config['io_read_kbs'] = 0.0
+            config['io_write_kbs'] = 0.0
 
         if dev_class == 'vbd':
-            config['VDI'] = '' # TODO
+            config['VDI'] = config.get('VDI', '')
             config['device'] = config.get('dev', '')
             config['driver'] = 'paravirtualised' # TODO
             config['image'] = config.get('uname', '')
-            config['IO_bandwidth_incoming_kbs'] = 0.0
-            config['IO_bandwidth_outgoing_kbs'] = 0.0
+            config['io_read_kbs'] = 0.0
+            config['io_write_kbs'] = 0.0
             if config['mode'] == 'r':
                 config['mode'] = 'RO'
             else:
@@ -2043,27 +2056,7 @@ class XendDomainInfo:
         return dev_uuid
 
     def has_device(self, dev_class, dev_uuid):
-        return (dev_uuid in self.info['%s_refs' % dev_class])
-
-    """
-        def stateChar(name):
-            if name in self.info:
-                if self.info[name]:
-                    return name[0]
-                else:
-                    return '-'
-            else:
-                return '?'
-
-        state = reduce(lambda x, y: x + y, map(stateChar, DOM_STATES_OLD))
-
-        sxpr.append(['state', state])
-
-        if self.store_mfn:
-            sxpr.append(['store_mfn', self.store_mfn])
-        if self.console_mfn:
-            sxpr.append(['console_mfn', self.console_mfn])
-    """
+        return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
 
     def __str__(self):
         return '<domain id=%s name=%s memory=%s state=%s>' % \
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/image.py    Fri Dec 08 09:09:18 2006 -0700
@@ -338,7 +338,7 @@ class HVMImageHandler(ImageHandler):
         
         for devuuid, (devtype, devinfo) in deviceConfig.items():
             if devtype == 'vbd':
-                uname = devinfo['uname']
+                uname = devinfo.get('uname')
                 if uname is not None and 'file:' in uname:
                     (_, vbdparam) = string.split(uname, ':', 1)
                     if not os.path.isfile(vbdparam):
@@ -548,6 +548,14 @@ class X86_HVM_ImageHandler(HVMImageHandl
         return max(4 * (256 * self.vm.getVCpuCount() + 2 * (maxmem_kb / 1024)),
                    shadow_mem_kb)
 
+class X86_Linux_ImageHandler(LinuxImageHandler):
+
+    def buildDomain(self):
+        # set physical mapping limit
+        # add an 8MB slack to balance backend allocations.
+        mem_kb = self.getRequiredInitialReservation() + (8 * 1024)
+        xc.domain_set_memmap_limit(self.vm.getDomid(), mem_kb)
+        return LinuxImageHandler.buildDomain(self)
 
 _handlers = {
     "powerpc": {
@@ -558,7 +566,7 @@ _handlers = {
         "hvm": IA64_HVM_ImageHandler,
     },
     "x86": {
-        "linux": LinuxImageHandler,
+        "linux": X86_Linux_ImageHandler,
         "hvm": X86_HVM_ImageHandler,
     },
 }
diff -r 968caf47b548 -r 970ff2ba748f 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Thu Dec 07 16:18:55 
2006 -0700
+++ b/tools/python/xen/xend/server/DevController.py     Fri Dec 08 09:09:18 
2006 -0700
@@ -226,9 +226,11 @@ class DevController:
         for key, val in configDict.items():
             if isinstance(val, (types.ListType, types.TupleType)):
                 for v in val:
-                    sxpr.append([key, v])
+                    if v != None:
+                        sxpr.append([key, v])
             else:
-                sxpr.append([key, val])
+                if val != None:
+                    sxpr.append([key, val])
         return sxpr
 
     def sxprs(self):
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/server/SrvDaemon.py Fri Dec 08 09:09:18 2006 -0700
@@ -278,6 +278,8 @@ class Daemon:
             modulename = m.group(1)
             if re.search('sxp.py', modulename):
                 return None
+            if re.search('SrvServer.py', modulename):
+                return None
             self.traceindent += 1
             self.print_trace("> %s:%s\n"
                              % (modulename, code.co_name))
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/server/SrvDomain.py Fri Dec 08 09:09:18 2006 -0700
@@ -21,6 +21,7 @@ from xen.xend import sxp
 from xen.xend import sxp
 from xen.xend import XendDomain
 from xen.xend.Args import FormFn
+from xen.xend.XendLogging import log
 
 from xen.web.SrvDir import SrvDir
 
@@ -62,6 +63,18 @@ class SrvDomain(SrvDir):
     def op_shutdown(self, _, req):
         self.acceptCommand(req)
         return self.dom.shutdown(req.args['reason'][0])
+
+    def op_delete(self, _, req):
+        self.acceptCommand(req)
+        return self.xd.domain_delete(self.dom.getName())
+
+    def op_start(self, _, req):
+        self.acceptCommand(req)
+        paused = False
+        if 'paused' in req.args and req.args['paused'] == [1]:
+            paused = True
+        log.debug("Starting domain " + self.dom.getName() + " " + str(paused))
+        return self.xd.domain_start(self.dom.getName(), paused)
 
     def op_sysrq(self, _, req):
         self.acceptCommand(req)
diff -r 968caf47b548 -r 970ff2ba748f 
tools/python/xen/xend/server/SrvDomainDir.py
--- a/tools/python/xen/xend/server/SrvDomainDir.py      Thu Dec 07 16:18:55 
2006 -0700
+++ b/tools/python/xen/xend/server/SrvDomainDir.py      Fri Dec 08 09:09:18 
2006 -0700
@@ -25,6 +25,8 @@ from xen.xend.XendDomainInfo import Xend
 from xen.xend.XendDomainInfo import XendDomainInfo
 from xen.xend.Args import FormFn
 from xen.xend.XendError import XendError
+from xen.xend.XendLogging import log
+from xen.xend.XendConstants import DOM_STATE_RUNNING
 
 from xen.web.SrvDir import SrvDir
 from SrvDomain import SrvDomain
@@ -101,6 +103,35 @@ class SrvDomainDir(SrvDir):
             out.close()
             return val
 
+    def op_new(self, _, req):
+        """Define a new domain.
+        Expects the domain config in request parameter 'config' in SXP format.
+        """
+        ok = 0
+        errmsg = ''
+        try:
+            configstring = req.args.get('config')[0]
+            #print 'op_create>', 'config:', configstring
+            pin = sxp.Parser()
+            pin.input(configstring)
+            pin.input_eof()
+            config = pin.get_val()
+            ok = 1
+        except sxp.ParseError, ex:
+            errmsg = 'Invalid configuration ' + str(ex)
+        except Exception, ex:
+            print 'op_create> Exception in config', ex
+            traceback.print_exc()
+            errmsg = 'Configuration error ' + str(ex)
+        if not ok:
+            raise XendError(errmsg)
+        try:
+            self.xd.domain_new(config)
+        except Exception, ex:
+            print 'op_create> Exception creating domain:'
+            traceback.print_exc()
+            raise XendError("Error creating domain: " + str(ex))
+
     def op_restore(self, op, req):
         """Restore a domain from file.
 
@@ -159,16 +190,19 @@ class SrvDomainDir(SrvDir):
             if detail:
                 sxp.show(map(XendDomainInfo.sxpr, self.xd.list()), out=req)
             else:
-                sxp.show(self.xd.list_names(), out=req)
+                state = DOM_STATE_RUNNING
+                if 'state' in req.args and len(req.args['state']) > 0:
+                    state = req.args['state'][0]
+                log.debug("Listing domains in state " + str(state))
+                sxp.show(self.xd.list_names(state), out=req)
         else:
             domains = self.xd.list_sorted()
             req.write('<ul>')
             for d in domains:
                 req.write(
-                    '<li><a href="%s%s">Domain %s</a>: id = %s, memory = %d, '
-                    'ssidref = %d.'
+                    '<li><a href="%s%s">Domain %s</a>: id = %s, memory = %d'
                     % (url, d.getName(), d.getName(), d.getDomid(),
-                       d.getMemoryTarget(), d.getSsidref()))
+                       d.getMemoryTarget()))
                 req.write('</li>')
             req.write('</ul>')
 
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/server/SrvServer.py
--- a/tools/python/xen/xend/server/SrvServer.py Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/server/SrvServer.py Fri Dec 08 09:09:18 2006 -0700
@@ -62,8 +62,9 @@ xroot = XendRoot.instance()
 
 class XendServers:
 
-    def __init__(self):
+    def __init__(self, root):
         self.servers = []
+        self.root = root
         self.cleaningUp = False
         self.reloadingConfig = False
 
@@ -101,6 +102,9 @@ class XendServers:
         while True:
             threads = []
             for server in self.servers:
+                if server.ready:
+                    continue
+
                 thread = Thread(target=server.run, 
name=server.__class__.__name__)
                 if isinstance(server, HttpServer):
                     thread.setDaemon(True)
@@ -156,21 +160,23 @@ class XendServers:
                     pass
 
             if self.reloadingConfig:
-                log.info("Restarting all servers...")
+                log.info("Restarting all XML-RPC and Xen-API servers...")
                 self.cleaningUp = False
                 self.reloadingConfig = False
                 xroot.set_config()
-                self.servers = []
-                _loadConfig(self)
+                new_servers = [x for x in self.servers
+                               if isinstance(x, HttpServer)]
+                self.servers = new_servers
+                _loadConfig(self, self.root, True)
             else:
                 break
 
-def _loadConfig(servers):
-    if xroot.get_xend_http_server():
+def _loadConfig(servers, root, reload):
+    if not reload and xroot.get_xend_http_server():
         servers.add(HttpServer(root,
                                xroot.get_xend_address(),
                                xroot.get_xend_port()))
-    if xroot.get_xend_unix_server():
+    if not reload and xroot.get_xend_unix_server():
         path = xroot.get_xend_unix_path()
         log.info('unix path=' + path)
         servers.add(UnixHttpServer(root, path))
@@ -218,6 +224,6 @@ def create():
 def create():
     root = SrvDir()
     root.putChild('xend', SrvRoot())
-    servers = XendServers()
-    _loadConfig(servers)
+    servers = XendServers(root)
+    _loadConfig(servers, root, False)
     return servers
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xend/server/blkif.py     Fri Dec 08 09:09:18 2006 -0700
@@ -124,6 +124,8 @@ class BlkifController(DevController):
             config['dev'] = dev
         if typ and params:
             config['uname'] = typ +':' + params
+        else:
+            config['uname'] = None
         if mode:
             config['mode'] = mode
         if uuid:
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xm/create.py     Fri Dec 08 09:09:18 2006 -0700
@@ -29,13 +29,13 @@ from xen.xend import sxp
 from xen.xend import sxp
 from xen.xend import PrettyPrint
 import xen.xend.XendClient
-from xen.xend.XendClient import server
 from xen.xend.XendBootloader import bootloader
 from xen.util import blkif
 from xen.util import security
 
 from xen.xm.opts import *
 
+from main import server
 import console
 
 
@@ -704,8 +704,10 @@ def configure_hvm(config_image, vals):
     config_image.append(['vncpasswd', vals.vncpasswd])
 
 def run_bootloader(vals, config_image):
+    if not os.access(vals.bootloader, os.F_OK):
+        err("Bootloader '%s' does not exist" % vals.bootloader)
     if not os.access(vals.bootloader, os.X_OK):
-        err("Bootloader isn't executable")
+        err("Bootloader '%s' isn't executable" % vals.bootloader)
     if len(vals.disk) < 1:
         err("No disks configured and boot loader requested")
     (uname, dev, mode, backend) = vals.disk[0]
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xm/main.py       Fri Dec 08 09:09:18 2006 -0700
@@ -21,6 +21,7 @@
 
 """Grand unified management application for Xen.
 """
+import atexit
 import os
 import sys
 import re
@@ -29,8 +30,10 @@ import traceback
 import traceback
 import xmlrpclib
 import traceback
+import time
 import datetime
 from select import select
+import xml.dom.minidom
 
 import warnings
 warnings.filterwarnings('ignore', category=FutureWarning)
@@ -38,18 +41,26 @@ from xen.xend import PrettyPrint
 from xen.xend import PrettyPrint
 from xen.xend import sxp
 from xen.xend import XendClient
-from xen.xend.XendClient import server
 from xen.xend.XendConstants import *
 
 from xen.xm.opts import OptionError, Opts, wrap, set_true
 from xen.xm import console
 from xen.util import security
+from xen.util.xmlrpclib2 import ServerProxy
+
+import XenAPI
 
 # getopt.gnu_getopt is better, but only exists in Python 2.3+.  Use
 # getopt.getopt if gnu_getopt is not available.  This will mean that options
 # may only be specified before positional arguments.
 if not hasattr(getopt, 'gnu_getopt'):
     getopt.gnu_getopt = getopt.getopt
+
+XM_CONFIG_FILE = '/etc/xen/xm-config.xml'
+
+# Supported types of server
+SERVER_LEGACY_XMLRPC = 'LegacyXMLRPC'
+SERVER_XEN_API = 'Xen-API'
 
 # General help message
 
@@ -319,6 +330,40 @@ all_commands = (domain_commands + host_c
 all_commands = (domain_commands + host_commands + scheduler_commands +
                 device_commands + vnet_commands + acm_commands)
 
+
+##
+# Configuration File Parsing
+##
+
+config = None
+if os.path.isfile(XM_CONFIG_FILE):
+    try:
+        config = xml.dom.minidom.parse(XM_CONFIG_FILE)
+    except:
+        print >>sys.stderr, ('Ignoring invalid configuration file %s.' %
+                             XM_CONFIG_FILE)
+
+def parseServer():
+    if config:
+        server = config.getElementsByTagName('server')
+        if server:
+            st = server[0].getAttribute('type')
+            if st != SERVER_XEN_API and st != SERVER_LEGACY_XMLRPC:
+                print >>sys.stderr, ('Invalid server type %s; using %s.' %
+                                     (st, SERVER_LEGACY_XMLRPC))
+                st = SERVER_LEGACY_XMLRPC
+            return (st, server[0].getAttribute('uri'))
+
+    return SERVER_LEGACY_XMLRPC, XendClient.uri
+
+def parseAuthentication():
+    server = config.getElementsByTagName('server')[0]
+    return (server.getAttribute('username'),
+            server.getAttribute('password'))
+
+serverType, serverURI = parseServer()
+
+
 ####################################################################
 #
 #  Help/usage printing functions
@@ -469,6 +514,16 @@ def err(msg):
     print >>sys.stderr, "Error:", msg
 
 
+def get_single_vm(dom):
+    uuids = server.xenapi.VM.get_by_name_label(dom)
+    n = len(uuids)
+    if n == 1:
+        return uuids[0]
+    else:
+        dominfo = server.xend.domain(dom, False)
+        return dominfo['uuid']
+
+
 #########################################################################
 #
 #  Main xm functions
@@ -577,15 +632,21 @@ def parse_doms_info(info):
 
     def get_status(n, t, d):
         return DOM_STATES[t(sxp.child_value(info, n, d))]
-    
+
+    start_time = get_info('start_time', float, -1)
+    if start_time == -1:
+        up_time = float(-1)
+    else:
+        up_time = time.time() - start_time
+
     return {
         'domid'    : get_info('domid',        str,   ''),
         'name'     : get_info('name',         str,   '??'),
         'mem'      : get_info('memory_dynamic_min', int,   0),
-        'vcpus'    : get_info('vcpus',        int,   0),
+        'vcpus'    : get_info('online_vcpus',        int,   0),
         'state'    : get_info('state',        str,    ''),
         'cpu_time' : get_info('cpu_time',     float, 0),
-        'up_time'  : get_info('up_time',      float, -1),
+        'up_time'  : up_time,
         'seclabel' : security.get_security_printlabel(info),
         }
 
@@ -767,17 +828,26 @@ def xm_start(args):
         sys.exit(1)
 
     dom = params[0]
-    server.xend.domain.start(dom, paused)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.start(get_single_vm(dom), paused)
+    else:
+        server.xend.domain.start(dom, paused)
 
 def xm_delete(args):
     arg_check(args, "delete", 1)
     dom = args[0]
-    server.xend.domain.delete(dom)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.destroy(get_single_vm(dom))
+    else:
+        server.xend.domain.delete(dom)
 
 def xm_suspend(args):
     arg_check(args, "suspend", 1)
     dom = args[0]
-    server.xend.domain.suspend(dom)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.suspend(get_single_vm(dom))
+    else:
+        server.xend.domain.suspend(dom)
 
 def xm_resume(args):
     arg_check(args, "resume", 1, 2)
@@ -799,7 +869,10 @@ def xm_resume(args):
         sys.exit(1)
 
     dom = params[0]
-    server.xend.domain.resume(dom, paused)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.resume(get_single_vm(dom), paused)
+    else:
+        server.xend.domain.resume(dom, paused)
     
 def xm_reboot(args):
     arg_check(args, "reboot", 1, 3)
@@ -815,13 +888,19 @@ def xm_pause(args):
     arg_check(args, "pause", 1)
     dom = args[0]
 
-    server.xend.domain.pause(dom)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.pause(get_single_vm(dom))
+    else:
+        server.xend.domain.pause(dom)
 
 def xm_unpause(args):
     arg_check(args, "unpause", 1)
     dom = args[0]
 
-    server.xend.domain.unpause(dom)
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.unpause(get_single_vm(dom))
+    else:
+        server.xend.domain.unpause(dom)
 
 def xm_dump_core(args):
     live = False
@@ -862,7 +941,10 @@ def xm_rename(args):
 def xm_rename(args):
     arg_check(args, "rename", 2)
         
-    server.xend.domain.setName(args[0], args[1])
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.set_name_label(get_single_vm(args[0]), args[1])
+    else:
+        server.xend.domain.setName(args[0], args[1])
 
 def xm_importcommand(command, args):
     cmd = __import__(command, globals(), locals(), 'xen.xm')
@@ -920,7 +1002,12 @@ def xm_vcpu_set(args):
 
 def xm_destroy(args):
     arg_check(args, "destroy", 1)
-    server.xend.domain.destroy(args[0])
+
+    dom = args[0]
+    if serverType == SERVER_XEN_API:
+        server.xenapi.VM.hard_shutdown(get_single_vm(dom))
+    else:
+        server.xend.domain.destroy(dom)
 
 
 def xm_domid(args):
@@ -1134,7 +1221,7 @@ def xm_uptime(args):
 
     for dom in doms:
         d = parse_doms_info(dom)
-        if d['domid'] > 0:
+        if int(d['domid']) > 0:
             uptime = int(round(d['up_time']))
         else:
             f=open('/proc/uptime', 'r')
@@ -1161,10 +1248,10 @@ def xm_uptime(args):
         if short_mode:
             now = datetime.datetime.now()
             upstring = now.strftime(" %H:%M:%S") + " up " + upstring
-            upstring += ", " + d['name'] + " (" + str(d['domid']) + ")"
+            upstring += ", " + d['name'] + " (" + d['domid'] + ")"
         else:
             upstring += ':%(seconds)02d' % vars()
-            upstring = ("%(name)-32s %(domid)3d " % d) + upstring
+            upstring = ("%(name)-32s %(domid)3s " % d) + upstring
 
         print upstring
 
@@ -1577,6 +1664,8 @@ def deprecated(old,new):
         "Command %s is deprecated.  Please use xm %s instead." % (old, new))
 
 def main(argv=sys.argv):
+    global server
+
     if len(argv) < 2:
         usage()
 
@@ -1595,6 +1684,19 @@ def main(argv=sys.argv):
     args = argv[2:]
     if cmd:
         try:
+            if serverType == SERVER_XEN_API:
+                server = XenAPI.Session(serverURI)
+                username, password = parseAuthentication()
+                server.login_with_password(username, password)
+                def logout():
+                    try:
+                        server.xenapi.session.logout()
+                    except:
+                        pass
+                atexit.register(logout)
+            else:
+                server = ServerProxy(serverURI)
+
             rc = cmd(args)
             if rc:
                 usage()
@@ -1614,6 +1716,9 @@ def main(argv=sys.argv):
                 err("Unable to connect to xend: %s." % ex[1])
             sys.exit(1)
         except SystemExit:
+            sys.exit(1)
+        except XenAPI.Failure, exn:
+            err(str(exn))
             sys.exit(1)
         except xmlrpclib.Fault, ex:
             if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN:
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xm/migrate.py
--- a/tools/python/xen/xm/migrate.py    Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xm/migrate.py    Fri Dec 08 09:09:18 2006 -0700
@@ -21,8 +21,9 @@
 
 import sys
 
-from xen.xend.XendClient import server
 from xen.xm.opts import *
+
+from main import server
 
 gopts = Opts(use="""[options] DOM HOST
 
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xm/new.py
--- a/tools/python/xen/xm/new.py        Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xm/new.py        Fri Dec 08 09:09:18 2006 -0700
@@ -21,10 +21,9 @@ from xen.xend import PrettyPrint
 from xen.xend import PrettyPrint
 from xen.xend import sxp
 from xen.xend import XendClient
-from xen.xend.XendClient import server
 
-from xen.xm.opts import *
-from xen.xm.create import *
+from opts import *
+from create import *
 
 def make_unstarted_domain(opts, config):
     """Create an unstarted domain.
diff -r 968caf47b548 -r 970ff2ba748f tools/python/xen/xm/shutdown.py
--- a/tools/python/xen/xm/shutdown.py   Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/python/xen/xm/shutdown.py   Fri Dec 08 09:09:18 2006 -0700
@@ -19,9 +19,9 @@
 """
 import time
 
-from xen.xend.XendClient import server
 from xen.xend import sxp
-from xen.xm.opts import *
+from opts import *
+from main import server
 
 gopts = Opts(use="""[options] [DOM]
 
diff -r 968caf47b548 -r 970ff2ba748f tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am Thu Dec 07 16:18:55 2006 -0700
+++ b/tools/xm-test/ramdisk/Makefile.am Fri Dec 08 09:09:18 2006 -0700
@@ -34,6 +34,7 @@ HVM_SCRIPT = bin/create_disk_image
 
 XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 
's/(\d+)\.(\d+)\.\d+/\1.\2/')
 XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER)-$(BR_ARCH).img
+XMTEST_DL_IMG = $(shell echo $(XMTEST_VER_IMG) | sed -e 's/x86_64/i386/g')
 
 EXTRA_ROOT_DIRS = sys
 
@@ -83,7 +84,12 @@ disk.img: existing
 
 existing:
        @if [ -n "$(INITRD)" ] && [ ! -f $(XMTEST_VER_IMG) ] ; then \
-               wget $(INITRD)/$(XMTEST_VER_IMG); \
+                if [ ! -f $(XMTEST_DL_IMG) ] ; then \
+                       wget $(INITRD)/$(XMTEST_DL_IMG); \
+                fi; \
+                if [ "$(XMTEST_DL_IMG)" != "$(XMTEST_VER_IMG)" ] ; then \
+                        ln -s $(XMTEST_DL_IMG) $(XMTEST_VER_IMG); \
+                fi \
        fi
        @if [ -f $(XMTEST_VER_IMG) ] ; then \
                ln -sf $(XMTEST_VER_IMG) initrd.img; \
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/boot/x86_32.S
--- a/xen/arch/x86/boot/x86_32.S        Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/boot/x86_32.S        Fri Dec 08 09:09:18 2006 -0700
@@ -1,4 +1,5 @@
 #include <xen/config.h>
+#include <xen/multiboot.h>
 #include <public/xen.h>
 #include <asm/asm_defns.h>
 #include <asm/desc.h>
@@ -17,12 +18,14 @@ ENTRY(_stext)
         .align 4
 
 /*** MULTIBOOT HEADER ****/
+#define MULTIBOOT_HEADER_FLAGS (MULTIBOOT_HEADER_MODS_ALIGNED | \
+                                MULTIBOOT_HEADER_WANT_MEMORY)
         /* Magic number indicating a Multiboot header. */
-        .long 0x1BADB002
+        .long MULTIBOOT_HEADER_MAGIC
         /* Flags to bootloader (see Multiboot spec). */
-        .long 0x00000003
+        .long MULTIBOOT_HEADER_FLAGS
         /* Checksum: must be the negated sum of the first two fields. */
-        .long -0x1BADB005
+        .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
         
 not_multiboot_msg:
         .asciz "ERR: Not a Multiboot bootloader!"
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/boot/x86_64.S
--- a/xen/arch/x86/boot/x86_64.S        Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/boot/x86_64.S        Fri Dec 08 09:09:18 2006 -0700
@@ -1,4 +1,5 @@
 #include <xen/config.h>
+#include <xen/multiboot.h>
 #include <public/xen.h>
 #include <asm/asm_defns.h>
 #include <asm/desc.h>
@@ -19,12 +20,14 @@ ENTRY(_stext)
 
         .org    0x004
 /*** MULTIBOOT HEADER ****/
+#define MULTIBOOT_HEADER_FLAGS (MULTIBOOT_HEADER_MODS_ALIGNED | \
+                                MULTIBOOT_HEADER_WANT_MEMORY)
         /* Magic number indicating a Multiboot header. */
-        .long   0x1BADB002
+        .long   MULTIBOOT_HEADER_MAGIC
         /* Flags to bootloader (see Multiboot spec). */
-        .long   0x00000003
+        .long   MULTIBOOT_HEADER_FLAGS
         /* Checksum: must be the negated sum of the first two fields. */
-        .long   -0x1BADB005
+        .long   -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
 
 .Lbad_cpu_msg: .asciz "ERR: Not a 64-bit CPU!"
 .Lbad_ldr_msg: .asciz "ERR: Not a Multiboot bootloader!"
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/crash.c
--- a/xen/arch/x86/crash.c      Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/crash.c      Fri Dec 08 09:09:18 2006 -0700
@@ -27,7 +27,6 @@
 #include <public/xen.h>
 #include <asm/hvm/hvm.h>
 
-#ifdef CONFIG_SMP
 static atomic_t waiting_for_crash_ipi;
 
 static int crash_nmi_callback(struct cpu_user_regs *regs, int cpu)
@@ -71,9 +70,7 @@ static void nmi_shootdown_cpus(void)
     atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
     /* Would it be better to replace the trap vector here? */
     set_nmi_callback(crash_nmi_callback);
-    /* Ensure the new callback function is set before sending
-     * out the NMI
-     */
+    /* Ensure the new callback function is set before sending out the NMI. */
     wmb();
 
     smp_send_nmi_allbutself();
@@ -88,7 +85,6 @@ static void nmi_shootdown_cpus(void)
     /* Leave the nmi callback set */
     disable_local_APIC();
 }
-#endif
 
 static void crash_save_xen_notes(void)
 {
@@ -102,16 +98,12 @@ static void crash_save_xen_notes(void)
 
 void machine_crash_shutdown(void)
 {
-    printk("machine_crash_shutdown: %d\n", smp_processor_id());
     local_irq_disable();
 
-#ifdef CONFIG_SMP
     nmi_shootdown_cpus();
-#endif
 
-#ifdef CONFIG_X86_IO_APIC
     disable_IO_APIC();
-#endif
+
     hvm_disable();
 
     crash_save_xen_notes();
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/domain.c     Fri Dec 08 09:09:18 2006 -0700
@@ -134,6 +134,8 @@ int vcpu_initialise(struct vcpu *v)
 
     v->arch.flags = TF_kernel_mode;
 
+    pae_l3_cache_init(&v->arch.pae_l3_cache);
+
     if ( is_hvm_domain(d) )
     {
         if ( (rc = hvm_vcpu_initialise(v)) != 0 )
@@ -154,8 +156,6 @@ int vcpu_initialise(struct vcpu *v)
 
     v->arch.perdomain_ptes =
         d->arch.mm_perdomain_pt + (v->vcpu_id << GDT_LDT_VCPU_SHIFT);
-
-    pae_l3_cache_init(&v->arch.pae_l3_cache);
 
     return 0;
 }
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/mm.c Fri Dec 08 09:09:18 2006 -0700
@@ -335,7 +335,7 @@ void make_cr3(struct vcpu *v, unsigned l
     cache->high_mfn   = mfn;
 
     /* Map the guest L3 table and copy to the chosen low-memory cache. */
-    *(fix_pae_highmem_pl1e - cpu) = l1e_from_pfn(mfn, __PAGE_HYPERVISOR);
+    l1e_write(fix_pae_highmem_pl1e-cpu, l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
     /* First check the previous high mapping can't be in the TLB. 
      * (i.e. have we loaded CR3 since we last did this?) */
     if ( unlikely(this_cpu(make_cr3_timestamp) == this_cpu(tlbflush_time)) )
@@ -343,7 +343,7 @@ void make_cr3(struct vcpu *v, unsigned l
     highmem_l3tab = (l3_pgentry_t *)fix_to_virt(FIX_PAE_HIGHMEM_0 + cpu);
     lowmem_l3tab  = cache->table[cache->inuse_idx];
     memcpy(lowmem_l3tab, highmem_l3tab, sizeof(cache->table[0]));
-    *(fix_pae_highmem_pl1e - cpu) = l1e_empty();
+    l1e_write(fix_pae_highmem_pl1e-cpu, l1e_empty());
     this_cpu(make_cr3_timestamp) = this_cpu(tlbflush_time);
 
     v->arch.cr3 = __pa(lowmem_l3tab);
@@ -380,7 +380,7 @@ void invalidate_shadow_ldt(struct vcpu *
     {
         pfn = l1e_get_pfn(v->arch.perdomain_ptes[i]);
         if ( pfn == 0 ) continue;
-        v->arch.perdomain_ptes[i] = l1e_empty();
+        l1e_write(&v->arch.perdomain_ptes[i], l1e_empty());
         page = mfn_to_page(pfn);
         ASSERT_PAGE_IS_TYPE(page, PGT_ldt_page);
         ASSERT_PAGE_IS_DOMAIN(page, v->domain);
@@ -449,7 +449,7 @@ int map_ldt_shadow_page(unsigned int off
 
     nl1e = l1e_from_pfn(mfn, l1e_get_flags(l1e) | _PAGE_RW);
 
-    v->arch.perdomain_ptes[off + 16] = nl1e;
+    l1e_write(&v->arch.perdomain_ptes[off + 16], nl1e);
     v->arch.shadow_ldt_mapcnt++;
 
     return 1;
@@ -851,7 +851,7 @@ static int create_pae_xen_mappings(l3_pg
 static int create_pae_xen_mappings(l3_pgentry_t *pl3e)
 {
     struct page_info *page;
-    l2_pgentry_t    *pl2e;
+    l2_pgentry_t    *pl2e, l2e;
     l3_pgentry_t     l3e3;
     int              i;
 
@@ -892,15 +892,19 @@ static int create_pae_xen_mappings(l3_pg
            &idle_pg_table_l2[L2_PAGETABLE_FIRST_XEN_SLOT],
            L2_PAGETABLE_XEN_SLOTS * sizeof(l2_pgentry_t));
     for ( i = 0; i < PDPT_L2_ENTRIES; i++ )
-        pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i] =
-            l2e_from_page(
-                virt_to_page(page_get_owner(page)->arch.mm_perdomain_pt) + i,
-                __PAGE_HYPERVISOR);
+    {
+        l2e = l2e_from_page(
+            virt_to_page(page_get_owner(page)->arch.mm_perdomain_pt) + i,
+            __PAGE_HYPERVISOR);
+        l2e_write(&pl2e[l2_table_offset(PERDOMAIN_VIRT_START) + i], l2e);
+    }
     for ( i = 0; i < (LINEARPT_MBYTES >> (L2_PAGETABLE_SHIFT - 20)); i++ )
-        pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + i] =
-            (l3e_get_flags(pl3e[i]) & _PAGE_PRESENT) ?
-            l2e_from_pfn(l3e_get_pfn(pl3e[i]), __PAGE_HYPERVISOR) :
-        l2e_empty();
+    {
+        l2e = l2e_empty();
+        if ( l3e_get_flags(pl3e[i]) & _PAGE_PRESENT )
+            l2e = l2e_from_pfn(l3e_get_pfn(pl3e[i]), __PAGE_HYPERVISOR);
+        l2e_write(&pl2e[l2_table_offset(LINEAR_PT_VIRT_START) + i], l2e);
+    }
     unmap_domain_page(pl2e);
 
     return 1;
@@ -2760,7 +2764,7 @@ void destroy_gdt(struct vcpu *v)
     {
         if ( (pfn = l1e_get_pfn(v->arch.perdomain_ptes[i])) != 0 )
             put_page_and_type(mfn_to_page(pfn));
-        v->arch.perdomain_ptes[i] = l1e_empty();
+        l1e_write(&v->arch.perdomain_ptes[i], l1e_empty());
         v->arch.guest_context.gdt_frames[i] = 0;
     }
 }
@@ -2794,8 +2798,8 @@ long set_gdt(struct vcpu *v,
     for ( i = 0; i < nr_pages; i++ )
     {
         v->arch.guest_context.gdt_frames[i] = frames[i];
-        v->arch.perdomain_ptes[i] =
-            l1e_from_pfn(frames[i], __PAGE_HYPERVISOR);
+        l1e_write(&v->arch.perdomain_ptes[i],
+                  l1e_from_pfn(frames[i], __PAGE_HYPERVISOR));
     }
 
     return 0;
@@ -2974,9 +2978,54 @@ long arch_memory_op(int op, XEN_GUEST_HA
         break;
     }
 
+    case XENMEM_set_memory_map:
+    {
+        struct xen_foreign_memory_map fmap;
+        struct domain *d;
+        int rc;
+
+        if ( copy_from_guest(&fmap, arg, 1) )
+            return -EFAULT;
+
+        if ( fmap.map.nr_entries > ARRAY_SIZE(d->arch.e820) )
+            return -EINVAL;
+
+        if ( fmap.domid == DOMID_SELF )
+        {
+            d = current->domain;
+            get_knownalive_domain(d);
+        }
+        else if ( !IS_PRIV(current->domain) )
+            return -EPERM;
+        else if ( (d = find_domain_by_id(fmap.domid)) == NULL )
+            return -ESRCH;
+
+        rc = copy_from_guest(&d->arch.e820[0], fmap.map.buffer,
+                             fmap.map.nr_entries) ? -EFAULT : 0;
+        d->arch.nr_e820 = fmap.map.nr_entries;
+
+        put_domain(d);
+        return rc;
+    }
+
     case XENMEM_memory_map:
     {
-        return -ENOSYS;
+        struct xen_memory_map map;
+        struct domain *d = current->domain;
+
+        /* Backwards compatibility. */
+        if ( d->arch.nr_e820 == 0 )
+            return -ENOSYS;
+
+        if ( copy_from_guest(&map, arg, 1) )
+            return -EFAULT;
+
+        map.nr_entries = min(map.nr_entries, d->arch.nr_e820);
+        if ( copy_to_guest(map.buffer, &d->arch.e820[0], map.nr_entries) ||
+             copy_to_guest(arg, &map, 1) )
+            return -EFAULT;
+
+        return 0;
     }
 
     case XENMEM_machine_memory_map:
@@ -3298,8 +3347,8 @@ int map_pages_to_xen(
              !map_small_pages )
         {
             /* Super-page mapping. */
-            ol2e  = *pl2e;
-            *pl2e = l2e_from_pfn(mfn, flags|_PAGE_PSE);
+            ol2e = *pl2e;
+            l2e_write(pl2e, l2e_from_pfn(mfn, flags|_PAGE_PSE));
 
             if ( (l2e_get_flags(ol2e) & _PAGE_PRESENT) )
             {
@@ -3319,22 +3368,24 @@ int map_pages_to_xen(
             {
                 pl1e = page_to_virt(alloc_xen_pagetable());
                 clear_page(pl1e);
-                *pl2e = l2e_from_page(virt_to_page(pl1e), __PAGE_HYPERVISOR);
+                l2e_write(pl2e, l2e_from_page(virt_to_page(pl1e),
+                                              __PAGE_HYPERVISOR));
             }
             else if ( l2e_get_flags(*pl2e) & _PAGE_PSE )
             {
                 pl1e = page_to_virt(alloc_xen_pagetable());
                 for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
-                    pl1e[i] = l1e_from_pfn(
-                        l2e_get_pfn(*pl2e) + i,
-                        l2e_get_flags(*pl2e) & ~_PAGE_PSE);
-                *pl2e = l2e_from_page(virt_to_page(pl1e), __PAGE_HYPERVISOR);
+                    l1e_write(&pl1e[i],
+                              l1e_from_pfn(l2e_get_pfn(*pl2e) + i,
+                                           l2e_get_flags(*pl2e) & ~_PAGE_PSE));
+                l2e_write(pl2e, l2e_from_page(virt_to_page(pl1e),
+                                              __PAGE_HYPERVISOR));
                 local_flush_tlb_pge();
             }
 
             pl1e  = l2e_to_l1e(*pl2e) + l1_table_offset(virt);
             ol1e  = *pl1e;
-            *pl1e = l1e_from_pfn(mfn, flags);
+            l1e_write(pl1e, l1e_from_pfn(mfn, flags));
             if ( (l1e_get_flags(ol1e) & _PAGE_PRESENT) )
                 local_flush_tlb_one(virt);
 
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c   Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/mm/shadow/common.c   Fri Dec 08 09:09:18 2006 -0700
@@ -1280,7 +1280,7 @@ sh_gfn_to_mfn_foreign(struct domain *d, 
          * Instead, just count the number of l3es from zero.  It's safe
          * to do this because we already checked that the gfn is within
          * the bounds of the p2m. */
-        l3e += (((addr) & VADDR_MASK) >> L3_PAGETABLE_SHIFT);
+        l3e += (addr >> L3_PAGETABLE_SHIFT);
 #else
         l3e += l3_table_offset(addr);        
 #endif
@@ -2433,11 +2433,10 @@ void sh_update_paging_modes(struct vcpu 
                 }
         }
 
-        if ( pagetable_get_pfn(v->arch.monitor_table) == 0 )
+        if ( pagetable_is_null(v->arch.monitor_table) )
         {
             mfn_t mmfn = shadow_make_monitor_table(v);
             v->arch.monitor_table = pagetable_from_mfn(mmfn);
-            v->arch.monitor_vtable = sh_map_domain_page(mmfn);
         } 
 
         if ( v->arch.shadow.mode != old_mode )
@@ -2467,12 +2466,10 @@ void sh_update_paging_modes(struct vcpu 
                     return;
                 }
 
-                sh_unmap_domain_page(v->arch.monitor_vtable);
                 old_mfn = pagetable_get_mfn(v->arch.monitor_table);
                 v->arch.monitor_table = pagetable_null();
                 new_mfn = v->arch.shadow.mode->make_monitor_table(v);          
  
                 v->arch.monitor_table = pagetable_from_mfn(new_mfn);
-                v->arch.monitor_vtable = sh_map_domain_page(new_mfn);
                 SHADOW_PRINTK("new monitor table %"SH_PRI_mfn "\n",
                                mfn_x(new_mfn));
 
@@ -3272,7 +3269,8 @@ void shadow_audit_p2m(struct domain *d)
 
     //SHADOW_PRINTK("p2m audit starts\n");
 
-    test_linear = ( (d == current->domain) && current->arch.monitor_vtable );
+    test_linear = ( (d == current->domain) 
+                    && !pagetable_is_null(current->arch.monitor_table) );
     if ( test_linear )
         local_flush_tlb(); 
 
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c    Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/mm/shadow/multi.c    Fri Dec 08 09:09:18 2006 -0700
@@ -851,7 +851,9 @@ static inline void safe_write_entry(void
      * then writing the high word before the low word. */
     BUILD_BUG_ON(sizeof (shadow_l1e_t) != 2 * sizeof (unsigned long));
     d[0] = 0;
+    wmb();
     d[1] = s[1];
+    wmb();
     d[0] = s[0];
 #else
     /* In 32-bit and 64-bit, sizeof(pte) == sizeof(ulong) == 1 word,
@@ -2760,6 +2762,7 @@ static int sh_page_fault(struct vcpu *v,
          * shadow_set_l*e(), which will have crashed the guest.  
          * Get out of the fault handler immediately. */
         ASSERT(test_bit(_DOMF_dying, &d->domain_flags));
+        unmap_walk(v, &gw); 
         shadow_unlock(d);
         return 0;
     }
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/setup.c      Fri Dec 08 09:09:18 2006 -0700
@@ -305,6 +305,9 @@ void __init __start_xen(multiboot_info_t
         .stop_bits = 1
     };
 
+    extern void early_page_fault(void);
+    set_intr_gate(TRAP_page_fault, &early_page_fault);
+
     /* Parse the command-line options. */
     if ( (mbi->flags & MBI_CMDLINE) && (mbi->cmdline != 0) )
         cmdline = __va(mbi->cmdline);
@@ -501,21 +504,19 @@ void __init __start_xen(multiboot_info_t
         kdump_start >>= PAGE_SHIFT;
         kdump_size >>= PAGE_SHIFT;
 
-        /* allocate pages for Kdump memory area */
+        /* Allocate pages for Kdump memory area. */
 
         k = alloc_boot_pages_at(kdump_size, kdump_start);
-
         if ( k != kdump_start )
             panic("Unable to reserve Kdump memory\n");
 
-        /* allocate pages for relocated initial images */
+        /* Allocate pages for relocated initial images. */
 
         k = ((initial_images_end - initial_images_start) & ~PAGE_MASK) ? 1 : 0;
         k += (initial_images_end - initial_images_start) >> PAGE_SHIFT;
 
         k = alloc_boot_pages(k, 1);
-
-        if ( !k )
+        if ( k == 0 )
             panic("Unable to allocate initial images memory\n");
 
         move_memory(k << PAGE_SHIFT, initial_images_start, initial_images_end);
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/traps.c      Fri Dec 08 09:09:18 2006 -0700
@@ -935,6 +935,37 @@ asmlinkage int do_page_fault(struct cpu_
     return 0;
 }
 
+/*
+ * Early handler to deal with spurious page faults. For example, consider a 
+ * routine that uses a mapping immediately after installing it (making it 
+ * present). The CPU may speculatively execute the memory access before 
+ * executing the PTE write. The instruction will then be marked to cause a 
+ * page fault when it is retired, despite the fact that the PTE is present and 
+ * correct at that point in time.
+ */
+asmlinkage int do_early_page_fault(struct cpu_user_regs *regs)
+{
+    static int stuck;
+    static unsigned long prev_eip, prev_cr2;
+    unsigned long cr2 = read_cr2();
+
+    BUG_ON(smp_processor_id() != 0);
+
+    if ( (regs->eip != prev_eip) || (cr2 != prev_cr2) )
+    {
+        prev_eip = regs->eip;
+        prev_cr2 = cr2;
+        stuck    = 0;
+        return EXCRET_not_a_fault;
+    }
+
+    if ( stuck++ == 1000 )
+        panic("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n", 
+              regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
+
+    return EXCRET_not_a_fault;
+}
+
 long do_fpu_taskswitch(int set)
 {
     struct vcpu *v = current;
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/x86_32/domain_page.c
--- a/xen/arch/x86/x86_32/domain_page.c Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/x86_32/domain_page.c Fri Dec 08 09:09:18 2006 -0700
@@ -107,7 +107,7 @@ void *map_domain_page(unsigned long mfn)
 
     spin_unlock(&cache->lock);
 
-    cache->l1tab[idx] = l1e_from_pfn(mfn, __PAGE_HYPERVISOR);
+    l1e_write(&cache->l1tab[idx], l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
 
  out:
     va = MAPCACHE_VIRT_START + (idx << PAGE_SHIFT);
@@ -147,7 +147,7 @@ void unmap_domain_page(void *va)
         {
             /* /First/, zap the PTE. */
             ASSERT(l1e_get_pfn(cache->l1tab[hashent->idx]) == hashent->mfn);
-            cache->l1tab[hashent->idx] = l1e_empty();
+            l1e_write(&cache->l1tab[hashent->idx], l1e_empty());
             /* /Second/, mark as garbage. */
             set_bit(hashent->idx, cache->garbage);
         }
@@ -159,7 +159,7 @@ void unmap_domain_page(void *va)
     else
     {
         /* /First/, zap the PTE. */
-        cache->l1tab[idx] = l1e_empty();
+        l1e_write(&cache->l1tab[idx], l1e_empty());
         /* /Second/, mark as garbage. */
         set_bit(idx, cache->garbage);
     }
@@ -229,7 +229,7 @@ void *map_domain_page_global(unsigned lo
 
     pl2e = virt_to_xen_l2e(va);
     pl1e = l2e_to_l1e(*pl2e) + l1_table_offset(va);
-    *pl1e = l1e_from_pfn(mfn, __PAGE_HYPERVISOR);
+    l1e_write(pl1e, l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
 
     return (void *)va;
 }
@@ -246,35 +246,9 @@ void unmap_domain_page_global(void *va)
     /* /First/, we zap the PTE. */
     pl2e = virt_to_xen_l2e(__va);
     pl1e = l2e_to_l1e(*pl2e) + l1_table_offset(__va);
-    *pl1e = l1e_empty();
+    l1e_write(pl1e, l1e_empty());
 
     /* /Second/, we add to the garbage map. */
     idx = (__va - IOREMAP_VIRT_START) >> PAGE_SHIFT;
     set_bit(idx, garbage);
 }
-
-paddr_t maddr_from_mapped_domain_page(void *va) 
-{
-    unsigned long __va = (unsigned long)va;
-    l2_pgentry_t *pl2e;
-    l1_pgentry_t *pl1e;
-    unsigned int idx;
-    struct mapcache *cache;
-    unsigned long mfn;
-
-    if ( (__va >= MAPCACHE_VIRT_START) && (__va < MAPCACHE_VIRT_END) )
-    {
-        cache = &mapcache_current_vcpu()->domain->arch.mapcache;
-        idx = ((unsigned long)va - MAPCACHE_VIRT_START) >> PAGE_SHIFT;
-        mfn = l1e_get_pfn(cache->l1tab[idx]);
-    }
-    else
-    {
-        ASSERT(__va >= IOREMAP_VIRT_START);
-        pl2e = virt_to_xen_l2e(__va);
-        pl1e = l2e_to_l1e(*pl2e) + l1_table_offset(__va);
-        mfn = l1e_get_pfn(*pl1e);
-    }
-    
-    return ((paddr_t)mfn << PAGE_SHIFT) | ((unsigned long)va & ~PAGE_MASK);
-}
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S       Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/x86_32/entry.S       Fri Dec 08 09:09:18 2006 -0700
@@ -536,6 +536,14 @@ ENTRY(spurious_interrupt_bug)
         pushl $TRAP_spurious_int<<16
         jmp   handle_exception
 
+ENTRY(early_page_fault)
+        SAVE_ALL_NOSEGREGS(a)
+        movl  %esp,%edx
+        pushl %edx
+        call  do_early_page_fault
+        addl  $4,%esp
+        jmp   restore_all_xen
+
 ENTRY(nmi)
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
         # NMI entry protocol is incompatible with guest kernel in ring 0.
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/x86_32/mm.c  Fri Dec 08 09:09:18 2006 -0700
@@ -99,11 +99,12 @@ void __init paging_init(void)
     {
         if ( (pg = alloc_domheap_pages(NULL, PAGETABLE_ORDER, 0)) == NULL )
             panic("Not enough memory to bootstrap Xen.\n");
-        idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i] =
-            l2e_from_page(pg, PAGE_HYPERVISOR | _PAGE_PSE);
+        l2e_write(&idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i],
+                  l2e_from_page(pg, PAGE_HYPERVISOR | _PAGE_PSE));
         /* NB. Cannot be GLOBAL as shadow_mode_translate reuses this area. */
-        idle_pg_table_l2[l2_linear_offset(RO_MPT_VIRT_START) + i] =
-            l2e_from_page(pg, (__PAGE_HYPERVISOR | _PAGE_PSE) & ~_PAGE_RW);
+        l2e_write(&idle_pg_table_l2[l2_linear_offset(RO_MPT_VIRT_START) + i],
+                  l2e_from_page(
+                      pg, (__PAGE_HYPERVISOR | _PAGE_PSE) & ~_PAGE_RW));
     }
 
     /* Fill with an obvious debug pattern. */
@@ -115,8 +116,8 @@ void __init paging_init(void)
     {
         ioremap_pt = alloc_xenheap_page();
         clear_page(ioremap_pt);
-        idle_pg_table_l2[l2_linear_offset(IOREMAP_VIRT_START) + i] =
-            l2e_from_page(virt_to_page(ioremap_pt), __PAGE_HYPERVISOR);
+        l2e_write(&idle_pg_table_l2[l2_linear_offset(IOREMAP_VIRT_START) + i],
+                  l2e_from_page(virt_to_page(ioremap_pt), __PAGE_HYPERVISOR));
     }
 }
 
@@ -125,10 +126,10 @@ void __init setup_idle_pagetable(void)
     int i;
 
     for ( i = 0; i < PDPT_L2_ENTRIES; i++ )
-        idle_pg_table_l2[l2_linear_offset(PERDOMAIN_VIRT_START) + i] =
-            l2e_from_page(virt_to_page(idle_vcpu[0]->domain->
-                                       arch.mm_perdomain_pt) + i,
-                          __PAGE_HYPERVISOR);
+        l2e_write(&idle_pg_table_l2[l2_linear_offset(PERDOMAIN_VIRT_START)+i],
+                  l2e_from_page(virt_to_page(idle_vcpu[0]->domain->
+                                             arch.mm_perdomain_pt) + i,
+                                __PAGE_HYPERVISOR));
 }
 
 void __init zap_low_mappings(l2_pgentry_t *base)
@@ -136,14 +137,16 @@ void __init zap_low_mappings(l2_pgentry_
     int i;
     u32 addr;
 
-    for (i = 0; ; i++) {
-        addr = (i << L2_PAGETABLE_SHIFT);
-        if (addr >= HYPERVISOR_VIRT_START)
+    for ( i = 0; ; i++ )
+    {
+        addr = i << L2_PAGETABLE_SHIFT;
+        if ( addr >= HYPERVISOR_VIRT_START )
             break;
-        if (l2e_get_paddr(base[i]) != addr)
+        if ( l2e_get_paddr(base[i]) != addr )
             continue;
-        base[i] = l2e_empty();
-    }
+        l2e_write(&base[i], l2e_empty());
+    }
+
     flush_tlb_all_pge();
 }
 
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/x86_64/entry.S       Fri Dec 08 09:09:18 2006 -0700
@@ -478,6 +478,12 @@ ENTRY(double_fault)
         call  do_double_fault
         ud2
 
+ENTRY(early_page_fault)
+        SAVE_ALL
+        movq  %rsp,%rdi
+        call  do_early_page_fault
+        jmp   restore_all_xen
+
 ENTRY(nmi)
         pushq $0
         SAVE_ALL
diff -r 968caf47b548 -r 970ff2ba748f xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c  Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/arch/x86/x86_64/mm.c  Fri Dec 08 09:09:18 2006 -0700
@@ -59,7 +59,7 @@ l2_pgentry_t *virt_to_xen_l2e(unsigned l
     {
         pl3e = page_to_virt(alloc_xen_pagetable());
         clear_page(pl3e);
-        *pl4e = l4e_from_paddr(__pa(pl3e), __PAGE_HYPERVISOR);
+        l4e_write(pl4e, l4e_from_paddr(__pa(pl3e), __PAGE_HYPERVISOR));
     }
     
     pl3e = l4e_to_l3e(*pl4e) + l3_table_offset(v);
@@ -67,7 +67,7 @@ l2_pgentry_t *virt_to_xen_l2e(unsigned l
     {
         pl2e = page_to_virt(alloc_xen_pagetable());
         clear_page(pl2e);
-        *pl3e = l3e_from_paddr(__pa(pl2e), __PAGE_HYPERVISOR);
+        l3e_write(pl3e, l3e_from_paddr(__pa(pl2e), __PAGE_HYPERVISOR));
     }
     
     pl2e = l3e_to_l2e(*pl3e) + l2_table_offset(v);
@@ -85,8 +85,8 @@ void __init paging_init(void)
     if ( (l2_pg = alloc_domheap_page(NULL)) == NULL )
         goto nomem;
     l3_ro_mpt = clear_page(page_to_virt(l2_pg));
-    idle_pg_table[l4_table_offset(RO_MPT_VIRT_START)] =
-        l4e_from_page(l2_pg, __PAGE_HYPERVISOR | _PAGE_USER);
+    l4e_write(&idle_pg_table[l4_table_offset(RO_MPT_VIRT_START)],
+              l4e_from_page(l2_pg, __PAGE_HYPERVISOR | _PAGE_USER));
 
     /*
      * Allocate and map the machine-to-phys table.
@@ -111,18 +111,19 @@ void __init paging_init(void)
                 goto nomem;
             va = RO_MPT_VIRT_START + (i << L2_PAGETABLE_SHIFT);
             l2_ro_mpt = clear_page(page_to_virt(l2_pg));
-            l3_ro_mpt[l3_table_offset(va)] =
-                l3e_from_page(l2_pg, __PAGE_HYPERVISOR | _PAGE_USER);
+            l3e_write(&l3_ro_mpt[l3_table_offset(va)],
+                      l3e_from_page(l2_pg, __PAGE_HYPERVISOR | _PAGE_USER));
             l2_ro_mpt += l2_table_offset(va);
         }
         /* NB. Cannot be GLOBAL as shadow_mode_translate reuses this area. */
-        *l2_ro_mpt++ = l2e_from_page(
-            l1_pg, /*_PAGE_GLOBAL|*/_PAGE_PSE|_PAGE_USER|_PAGE_PRESENT);
+        l2e_write(l2_ro_mpt, l2e_from_page(
+            l1_pg, /*_PAGE_GLOBAL|*/_PAGE_PSE|_PAGE_USER|_PAGE_PRESENT));
+        l2_ro_mpt++;
     }
 
     /* Set up linear page table mapping. */
-    idle_pg_table[l4_table_offset(LINEAR_PT_VIRT_START)] =
-        l4e_from_paddr(__pa(idle_pg_table), __PAGE_HYPERVISOR);
+    l4e_write(&idle_pg_table[l4_table_offset(LINEAR_PT_VIRT_START)],
+              l4e_from_paddr(__pa(idle_pg_table), __PAGE_HYPERVISOR));
     return;
 
  nomem:
@@ -132,15 +133,15 @@ void __init setup_idle_pagetable(void)
 void __init setup_idle_pagetable(void)
 {
     /* Install per-domain mappings for idle domain. */
-    idle_pg_table[l4_table_offset(PERDOMAIN_VIRT_START)] =
-        l4e_from_page(
-            virt_to_page(idle_vcpu[0]->domain->arch.mm_perdomain_l3),
-            __PAGE_HYPERVISOR);
+    l4e_write(&idle_pg_table[l4_table_offset(PERDOMAIN_VIRT_START)],
+              l4e_from_page(
+                  virt_to_page(idle_vcpu[0]->domain->arch.mm_perdomain_l3),
+                  __PAGE_HYPERVISOR));
 }
 
 void __init zap_low_mappings(void)
 {
-    idle_pg_table[0] = l4e_empty();
+    l4e_write(&idle_pg_table[0], l4e_empty());
     flush_tlb_all_pge();
 }
 
diff -r 968caf47b548 -r 970ff2ba748f xen/common/domctl.c
--- a/xen/common/domctl.c       Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/common/domctl.c       Fri Dec 08 09:09:18 2006 -0700
@@ -126,7 +126,7 @@ void getdomaininfo(struct domain *d, str
     
     info->tot_pages         = d->tot_pages;
     info->max_pages         = d->max_pages;
-    info->shared_info_frame = __pa(d->shared_info) >> PAGE_SHIFT;
+    info->shared_info_frame = mfn_to_gmfn(d, __pa(d->shared_info)>>PAGE_SHIFT);
 
     memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
 }
diff -r 968caf47b548 -r 970ff2ba748f xen/common/kexec.c
--- a/xen/common/kexec.c        Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/common/kexec.c        Fri Dec 08 09:09:18 2006 -0700
@@ -160,13 +160,9 @@ static int kexec_get_reserve(xen_kexec_r
 
 extern unsigned long _text;
 
-static int kexec_get_xen(xen_kexec_range_t *range, int get_ma)
-{
-    if ( get_ma )
-        range->start = virt_to_maddr(&_text);
-    else
-        range->start = (unsigned long) &_text;
-
+static int kexec_get_xen(xen_kexec_range_t *range)
+{
+    range->start = virt_to_maddr(&_text);
     range->size = (unsigned long)&_end - (unsigned long)&_text;
     return 0;
 }
@@ -195,10 +191,7 @@ static int kexec_get_range(XEN_GUEST_HAN
         ret = kexec_get_reserve(&range);
         break;
     case KEXEC_RANGE_MA_XEN:
-        ret = kexec_get_xen(&range, 1);
-        break;
-    case KEXEC_RANGE_VA_XEN:
-        ret = kexec_get_xen(&range, 0);
+        ret = kexec_get_xen(&range);
         break;
     case KEXEC_RANGE_MA_CPU:
         ret = kexec_get_cpu(&range);
diff -r 968caf47b548 -r 970ff2ba748f xen/include/asm-x86/domain.h
--- a/xen/include/asm-x86/domain.h      Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/asm-x86/domain.h      Fri Dec 08 09:09:18 2006 -0700
@@ -5,6 +5,7 @@
 #include <xen/mm.h>
 #include <asm/hvm/vcpu.h>
 #include <asm/hvm/domain.h>
+#include <asm/e820.h>
 
 struct trap_bounce {
     unsigned long  error_code;
@@ -100,11 +101,7 @@ struct arch_domain
     /* I/O-port admin-specified access capabilities. */
     struct rangeset *ioport_caps;
 
-    /* HVM stuff */
-    struct hvm_domain   hvm_domain;
-
-    /* Shadow-translated guest: Pseudophys base address of reserved area. */
-    unsigned long first_reserved_pfn;
+    struct hvm_domain hvm_domain;
 
     struct shadow_domain shadow;
 
@@ -113,6 +110,9 @@ struct arch_domain
     /* Highest guest frame that's ever been mapped in the p2m */
     unsigned long max_mapped_pfn;
 
+    /* Pseudophysical e820 map (XENMEM_memory_map).  */
+    struct e820entry e820[3];
+    unsigned int nr_e820;
 } __cacheline_aligned;
 
 #ifdef CONFIG_X86_PAE
@@ -196,7 +196,6 @@ struct arch_vcpu
     unsigned long cr3;                     /* (MA) value to install in HW CR3 
*/
 
     void *guest_vtable;                 /* virtual addr of pagetable */
-    root_pgentry_t *monitor_vtable;            /* virtual addr of 
monitor_table */
 
     /* Current LDT details. */
     unsigned long shadow_ldt_mapcnt;
diff -r 968caf47b548 -r 970ff2ba748f xen/include/asm-x86/page.h
--- a/xen/include/asm-x86/page.h        Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/asm-x86/page.h        Fri Dec 08 09:09:18 2006 -0700
@@ -33,9 +33,18 @@
 
 /* Write a pte atomically to memory. */
 #define l1e_write_atomic(l1ep, l1e) pte_write_atomic(l1ep, l1e_get_intpte(l1e))
-#define l2e_write_atomic(l2ep, l2e) pte_write_atomic(l2ep, l1e_get_intpte(l2e))
-#define l3e_write_atomic(l3ep, l3e) pte_write_atomic(l3ep, l1e_get_intpte(l3e))
-#define l4e_write_atomic(l4ep, l4e) pte_write_atomic(l4ep, l1e_get_intpte(l4e))
+#define l2e_write_atomic(l2ep, l2e) pte_write_atomic(l2ep, l2e_get_intpte(l2e))
+#define l3e_write_atomic(l3ep, l3e) pte_write_atomic(l3ep, l3e_get_intpte(l3e))
+#define l4e_write_atomic(l4ep, l4e) pte_write_atomic(l4ep, l4e_get_intpte(l4e))
+
+/*
+ * Write a pte safely but non-atomically to memory.
+ * The PTE may become temporarily not-present during the update.
+ */
+#define l1e_write(l1ep, l1e) pte_write(l1ep, l1e_get_intpte(l1e))
+#define l2e_write(l2ep, l2e) pte_write(l2ep, l2e_get_intpte(l2e))
+#define l3e_write(l3ep, l3e) pte_write(l3ep, l3e_get_intpte(l3e))
+#define l4e_write(l4ep, l4e) pte_write(l4ep, l4e_get_intpte(l4e))
 
 /* Get direct integer representation of a pte's contents (intpte_t). */
 #define l1e_get_intpte(x)          ((x).l1)
diff -r 968caf47b548 -r 970ff2ba748f xen/include/asm-x86/x86_32/page-2level.h
--- a/xen/include/asm-x86/x86_32/page-2level.h  Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/asm-x86/x86_32/page-2level.h  Fri Dec 08 09:09:18 2006 -0700
@@ -29,7 +29,8 @@ typedef l2_pgentry_t root_pgentry_t;
 #endif /* !__ASSEMBLY__ */
 
 #define pte_read_atomic(ptep)       (*(intpte_t *)(ptep))
-#define pte_write_atomic(ptep, pte) (*(intpte_t *)(ptep)) = (pte))
+#define pte_write_atomic(ptep, pte) ((*(intpte_t *)(ptep)) = (pte))
+#define pte_write(ptep, pte)        ((*(intpte_t *)(ptep)) = (pte))
 
 /* root table */
 #define root_get_pfn              l2e_get_pfn
diff -r 968caf47b548 -r 970ff2ba748f xen/include/asm-x86/x86_32/page-3level.h
--- a/xen/include/asm-x86/x86_32/page-3level.h  Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/asm-x86/x86_32/page-3level.h  Fri Dec 08 09:09:18 2006 -0700
@@ -48,6 +48,13 @@ typedef l3_pgentry_t root_pgentry_t;
     while ( (__npte = cmpxchg((intpte_t *)(ptep), __pte, (pte))) != __pte ) \
         __pte = __npte;                                                     \
 } while ( 0 )
+#define pte_write(ptep, pte) do {               \
+    *((u32 *)(ptep)+0) = 0;                     \
+    wmb();                                      \
+    *((u32 *)(ptep)+1) = (pte) >> 32;           \
+    wmb();                                      \
+    *((u32 *)(ptep)+0) = (pte) >>  0;           \
+} while ( 0 )
 
 /* root table */
 #define root_get_pfn              l3e_get_pfn
diff -r 968caf47b548 -r 970ff2ba748f xen/include/asm-x86/x86_64/page.h
--- a/xen/include/asm-x86/x86_64/page.h Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/asm-x86/x86_64/page.h Fri Dec 08 09:09:18 2006 -0700
@@ -44,7 +44,8 @@ typedef l4_pgentry_t root_pgentry_t;
 #endif /* !__ASSEMBLY__ */
 
 #define pte_read_atomic(ptep)       (*(intpte_t *)(ptep))
-#define pte_write_atomic(ptep, pte) (*(intpte_t *)(ptep)) = (pte))
+#define pte_write_atomic(ptep, pte) ((*(intpte_t *)(ptep)) = (pte))
+#define pte_write(ptep, pte)        ((*(intpte_t *)(ptep)) = (pte))
 
 /* Given a virtual address, get an entry offset into a linear page table. */
 #define l1_linear_offset(_a) (((_a) & VADDR_MASK) >> L1_PAGETABLE_SHIFT)
diff -r 968caf47b548 -r 970ff2ba748f xen/include/public/domctl.h
--- a/xen/include/public/domctl.h       Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/public/domctl.h       Fri Dec 08 09:09:18 2006 -0700
@@ -93,7 +93,7 @@ struct xen_domctl_getdomaininfo {
     uint32_t flags;              /* XEN_DOMINF_* */
     uint64_t tot_pages;
     uint64_t max_pages;
-    uint64_t shared_info_frame;  /* MFN of shared_info struct */
+    uint64_t shared_info_frame;  /* GMFN of shared_info struct */
     uint64_t cpu_time;
     uint32_t nr_online_vcpus;    /* Number of VCPUs currently online. */
     uint32_t max_vcpu_id;        /* Maximum VCPUID in use by this domain. */
diff -r 968caf47b548 -r 970ff2ba748f xen/include/public/kexec.h
--- a/xen/include/public/kexec.h        Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/public/kexec.h        Fri Dec 08 09:09:18 2006 -0700
@@ -107,8 +107,7 @@ typedef struct xen_kexec_load {
 
 #define KEXEC_RANGE_MA_CRASH 0   /* machine address and size of crash area */
 #define KEXEC_RANGE_MA_XEN   1   /* machine address and size of Xen itself */
-#define KEXEC_RANGE_VA_XEN   2   /* virtual adrress and size of Xen itself */
-#define KEXEC_RANGE_MA_CPU   3   /* machine address and size of a CPU note */
+#define KEXEC_RANGE_MA_CPU   2   /* machine address and size of a CPU note */
 
 /*
  * Find the address and size of certain memory areas
diff -r 968caf47b548 -r 970ff2ba748f xen/include/public/memory.h
--- a/xen/include/public/memory.h       Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/public/memory.h       Fri Dec 08 09:09:18 2006 -0700
@@ -222,7 +222,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_translate_gp
 
 /*
  * Returns the pseudo-physical memory map as it was when the domain
- * was started.
+ * was started (specified by XENMEM_set_memory_map).
+ * arg == addr of xen_memory_map_t.
  */
 #define XENMEM_memory_map           9
 struct xen_memory_map {
@@ -245,8 +246,22 @@ DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t
 /*
  * Returns the real physical memory map. Passes the same structure as
  * XENMEM_memory_map.
+ * arg == addr of xen_memory_map_t.
  */
 #define XENMEM_machine_memory_map      10
+
+/*
+ * Set the pseudo-physical memory map of a domain, as returned by
+ * XENMEM_memory_map.
+ * arg == addr of xen_foreign_memory_map_t.
+ */
+#define XENMEM_set_memory_map       13
+struct xen_foreign_memory_map {
+    domid_t domid;
+    struct xen_memory_map map;
+};
+typedef struct xen_foreign_memory_map xen_foreign_memory_map_t;
+DEFINE_XEN_GUEST_HANDLE(xen_foreign_memory_map_t);
 
 #endif /* __XEN_PUBLIC_MEMORY_H__ */
 
diff -r 968caf47b548 -r 970ff2ba748f xen/include/xen/domain_page.h
--- a/xen/include/xen/domain_page.h     Thu Dec 07 16:18:55 2006 -0700
+++ b/xen/include/xen/domain_page.h     Fri Dec 08 09:09:18 2006 -0700
@@ -33,13 +33,6 @@ void unmap_domain_page(void *va);
  */
 void *map_domain_page_global(unsigned long mfn);
 void unmap_domain_page_global(void *va);
-
-/* 
- * Convert a VA (within a page previously mapped in the context of the
- * currently-executing VCPU via a call to map_domain_page(), or via a
- * previous call to map_domain_page_global()) to the mapped machine address.
- */
-paddr_t maddr_from_mapped_domain_page(void *va);
 
 #define DMCACHE_ENTRY_VALID 1U
 #define DMCACHE_ENTRY_HELD  2U
@@ -109,8 +102,6 @@ domain_mmap_cache_destroy(struct domain_
 #define map_domain_page_global(mfn)         maddr_to_virt((mfn)<<PAGE_SHIFT)
 #define unmap_domain_page_global(va)        ((void)(va))
 

_______________________________________________
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®.