ia64/xen-unstable

changeset 13772:6d38ae7927cf

merge with xen-unstable.hg
author awilliam@xenbuild2.aw
date Wed Jan 31 10:30:54 2007 -0700 (2007-01-31)
parents f4395e945393 3cccf8e64296
children ef646312685f
files buildconfigs/linux-defconfig_xen0_ia64 buildconfigs/linux-defconfig_xen_ia64 tools/libxen/include/xen_cpu_feature.h tools/libxen/include/xen_cpu_feature_internal.h tools/libxen/include/xen_driver_type.h tools/libxen/include/xen_driver_type_internal.h tools/libxen/src/xen_cpu_feature.c tools/libxen/src/xen_driver_type.c xen/arch/ia64/xen/dom_fw.c xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/xensetup.c
line diff
     1.1 --- a/Makefile	Tue Jan 30 23:35:32 2007 -0700
     1.2 +++ b/Makefile	Wed Jan 31 10:30:54 2007 -0700
     1.3 @@ -22,7 +22,7 @@ endif
     1.4  install: install-xen install-kernels install-tools install-docs
     1.5  
     1.6  .PHONY: build
     1.7 -build: kernels build-headers
     1.8 +build: kernels
     1.9  	$(MAKE) -C xen build
    1.10  	$(MAKE) -C tools build
    1.11  	$(MAKE) -C docs build
    1.12 @@ -59,11 +59,11 @@ prep-kernels:
    1.13  	for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
    1.14  
    1.15  .PHONY: install-xen
    1.16 -install-xen: build-headers
    1.17 +install-xen:
    1.18  	$(MAKE) -C xen install
    1.19  
    1.20  .PHONY: install-tools
    1.21 -install-tools: build-headers
    1.22 +install-tools:
    1.23  	$(MAKE) -C tools install
    1.24  
    1.25  .PHONY: install-kernels
    1.26 @@ -82,11 +82,6 @@ dev-docs:
    1.27  .PHONY: kbuild
    1.28  kbuild: kernels
    1.29  
    1.30 -# generate header files
    1.31 -.PHONY: build-headers
    1.32 -build-headers:
    1.33 -	$(MAKE) -C xen/include/public/foreign
    1.34 -
    1.35  # Delete the kernel build trees entirely
    1.36  .PHONY: kdelete
    1.37  kdelete:
     2.1 --- a/buildconfigs/linux-defconfig_xen0_ia64	Tue Jan 30 23:35:32 2007 -0700
     2.2 +++ b/buildconfigs/linux-defconfig_xen0_ia64	Wed Jan 31 10:30:54 2007 -0700
     2.3 @@ -1639,7 +1639,7 @@ CONFIG_XEN_PCIDEV_BACKEND=y
     2.4  # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
     2.5  CONFIG_XEN_PCIDEV_BACKEND_SLOT=y
     2.6  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
     2.7 -# CONFIG_XEN_TPMDEV_BACKEND is not set
     2.8 +CONFIG_XEN_TPMDEV_BACKEND=m
     2.9  CONFIG_XEN_BLKDEV_FRONTEND=y
    2.10  CONFIG_XEN_NETDEV_FRONTEND=y
    2.11  # CONFIG_XEN_FRAMEBUFFER is not set
     3.1 --- a/buildconfigs/linux-defconfig_xen0_x86_32	Tue Jan 30 23:35:32 2007 -0700
     3.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_32	Wed Jan 31 10:30:54 2007 -0700
     3.3 @@ -1404,7 +1404,7 @@ CONFIG_XEN_PCIDEV_BACKEND=y
     3.4  CONFIG_XEN_PCIDEV_BACKEND_PASS=y
     3.5  # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
     3.6  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
     3.7 -# CONFIG_XEN_TPMDEV_BACKEND is not set
     3.8 +CONFIG_XEN_TPMDEV_BACKEND=m
     3.9  CONFIG_XEN_BLKDEV_FRONTEND=y
    3.10  CONFIG_XEN_NETDEV_FRONTEND=y
    3.11  CONFIG_XEN_SCRUB_PAGES=y
     4.1 --- a/buildconfigs/linux-defconfig_xen0_x86_64	Tue Jan 30 23:35:32 2007 -0700
     4.2 +++ b/buildconfigs/linux-defconfig_xen0_x86_64	Wed Jan 31 10:30:54 2007 -0700
     4.3 @@ -1354,7 +1354,7 @@ CONFIG_XEN_PCIDEV_BACKEND=y
     4.4  CONFIG_XEN_PCIDEV_BACKEND_PASS=y
     4.5  # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
     4.6  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
     4.7 -# CONFIG_XEN_TPMDEV_BACKEND is not set
     4.8 +CONFIG_XEN_TPMDEV_BACKEND=m
     4.9  CONFIG_XEN_BLKDEV_FRONTEND=y
    4.10  CONFIG_XEN_NETDEV_FRONTEND=y
    4.11  CONFIG_XEN_SCRUB_PAGES=y
     5.1 --- a/buildconfigs/linux-defconfig_xen_ia64	Tue Jan 30 23:35:32 2007 -0700
     5.2 +++ b/buildconfigs/linux-defconfig_xen_ia64	Wed Jan 31 10:30:54 2007 -0700
     5.3 @@ -1639,7 +1639,7 @@ CONFIG_XEN_PCIDEV_BACKEND=y
     5.4  # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
     5.5  CONFIG_XEN_PCIDEV_BACKEND_SLOT=y
     5.6  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
     5.7 -# CONFIG_XEN_TPMDEV_BACKEND is not set
     5.8 +CONFIG_XEN_TPMDEV_BACKEND=m
     5.9  CONFIG_XEN_BLKDEV_FRONTEND=y
    5.10  CONFIG_XEN_NETDEV_FRONTEND=y
    5.11  CONFIG_XEN_FRAMEBUFFER=y
     6.1 --- a/buildconfigs/linux-defconfig_xen_x86_32	Tue Jan 30 23:35:32 2007 -0700
     6.2 +++ b/buildconfigs/linux-defconfig_xen_x86_32	Wed Jan 31 10:30:54 2007 -0700
     6.3 @@ -3261,7 +3261,7 @@ CONFIG_XEN_PCIDEV_BACKEND_VPCI=y
     6.4  # CONFIG_XEN_PCIDEV_BACKEND_PASS is not set
     6.5  # CONFIG_XEN_PCIDEV_BACKEND_SLOT is not set
     6.6  # CONFIG_XEN_PCIDEV_BE_DEBUG is not set
     6.7 -# CONFIG_XEN_TPMDEV_BACKEND is not set
     6.8 +CONFIG_XEN_TPMDEV_BACKEND=m
     6.9  CONFIG_XEN_BLKDEV_FRONTEND=y
    6.10  CONFIG_XEN_NETDEV_FRONTEND=y
    6.11  CONFIG_XEN_FRAMEBUFFER=y
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/docs/Docs.mk	Wed Jan 31 10:30:54 2007 -0700
     7.3 @@ -0,0 +1,12 @@
     7.4 +PS2PDF		:= ps2pdf
     7.5 +DVIPS		:= dvips
     7.6 +LATEX		:= latex
     7.7 +FIG2DEV		:= fig2dev
     7.8 +LATEX2HTML	:= latex2html
     7.9 +DOXYGEN		:= doxygen
    7.10 +POD2MAN		:= pod2man
    7.11 +DOT		:= dot
    7.12 +
    7.13 +pkgdocdir	:= /usr/share/doc/xen
    7.14 +mandir		:= /usr/share/man
    7.15 +
     8.1 --- a/docs/Makefile	Tue Jan 30 23:35:32 2007 -0700
     8.2 +++ b/docs/Makefile	Wed Jan 31 10:30:54 2007 -0700
     8.3 @@ -2,20 +2,10 @@
     8.4  
     8.5  XEN_ROOT=..
     8.6  include $(XEN_ROOT)/Config.mk
     8.7 +include $(XEN_ROOT)/docs/Docs.mk
     8.8  
     8.9  VERSION		= xen-unstable
    8.10  
    8.11 -PS2PDF		:= ps2pdf
    8.12 -DVIPS		:= dvips
    8.13 -LATEX		:= latex
    8.14 -FIG2DEV		:= fig2dev
    8.15 -LATEX2HTML	:= latex2html
    8.16 -DOXYGEN		:= doxygen
    8.17 -POD2MAN		:= pod2man
    8.18 -
    8.19 -pkgdocdir	:= /usr/share/doc/xen
    8.20 -mandir		:= /usr/share/man
    8.21 -
    8.22  DOC_MAN5SRC	:= $(wildcard man/*.pod.5)
    8.23  DOC_MAN1SRC	:= $(wildcard man/*.pod.1)
    8.24  DOC_MAN1	:= $(patsubst man/%.pod.1,man1/%.1,$(DOC_MAN1SRC))
    8.25 @@ -32,6 +22,9 @@ all: build
    8.26  
    8.27  .PHONY: build
    8.28  build: ps pdf html man-pages
    8.29 +	@if which $(DOT) 1>/dev/null 2>/dev/null ; then              \
    8.30 +	$(MAKE) -C xen-api build ; else                              \
    8.31 +        echo "Graphviz (dot) not installed; skipping xen-api." ; fi
    8.32  	rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
    8.33  
    8.34  .PHONY: dev-docs
    8.35 @@ -74,6 +67,7 @@ man5/%.5: man/%.pod.5 Makefile
    8.36  
    8.37  .PHONY: clean
    8.38  clean:
    8.39 +	$(MAKE) -C xen-api clean
    8.40  	rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
    8.41  	rm -rf *.ilg *.log *.ind *.toc *.bak core
    8.42  	rm -rf $(GFX) ps pdf html
    8.43 @@ -88,6 +82,9 @@ distclean: clean
    8.44  install: all
    8.45  	rm -rf $(DESTDIR)$(pkgdocdir)
    8.46  	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
    8.47 +
    8.48 +	$(MAKE) -C xen-api install
    8.49 +
    8.50  	cp -dR ps $(DESTDIR)$(pkgdocdir)
    8.51  	cp -dR pdf $(DESTDIR)$(pkgdocdir)
    8.52  	$(INSTALL_DIR) $(DESTDIR)$(mandir)
     9.1 --- a/docs/xen-api/Makefile	Tue Jan 30 23:35:32 2007 -0700
     9.2 +++ b/docs/xen-api/Makefile	Wed Jan 31 10:30:54 2007 -0700
     9.3 @@ -1,22 +1,41 @@
     9.4 +#!/usr/bin/make -f
     9.5 +
     9.6 +XEN_ROOT=../..
     9.7 +include $(XEN_ROOT)/Config.mk
     9.8 +include $(XEN_ROOT)/docs/Docs.mk
     9.9 +
    9.10 +
    9.11  TEX := $(wildcard *.tex)
    9.12  EPS := $(wildcard *.eps)
    9.13  EPSDOT := $(patsubst %.dot,%.eps,$(wildcard *.dot))
    9.14  
    9.15  .PHONY: all
    9.16 -all: xenapi.pdf xenapi.ps
    9.17 +all: build
    9.18 +
    9.19 +.PHONY: build
    9.20 +build: xenapi.pdf xenapi.ps
    9.21 +
    9.22 +install:
    9.23 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)/ps
    9.24 +	$(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)/pdf
    9.25 +
    9.26 +	cp xenapi.ps $(DESTDIR)$(pkgdocdir)/ps
    9.27 +	cp xenapi.pdf $(DESTDIR)$(pkgdocdir)/pdf
    9.28 +
    9.29  
    9.30  xenapi.dvi: $(TEX) $(EPS) $(EPSDOT)
    9.31 -	latex xenapi.tex
    9.32 -	latex xenapi.tex
    9.33 +	$(LATEX) xenapi.tex
    9.34 +	$(LATEX) xenapi.tex
    9.35 +	rm -f *.aux *.log
    9.36  
    9.37  %.pdf: %.ps
    9.38 -	ps2pdf $< $@
    9.39 +	$(PS2PDF) $< $@
    9.40  
    9.41  %.ps: %.dvi
    9.42 -	dvips $< -o $@
    9.43 +	$(DVIPS) $< -o $@
    9.44  
    9.45  %.eps: %.dot
    9.46 -	dot -Tps $< >$@
    9.47 +	$(DOT) -Tps $< >$@
    9.48  
    9.49  .PHONY: clean
    9.50  clean:
    10.1 --- a/docs/xen-api/xenapi-datamodel.tex	Tue Jan 30 23:35:32 2007 -0700
    10.2 +++ b/docs/xen-api/xenapi-datamodel.tex	Wed Jan 31 10:30:54 2007 -0700
    10.3 @@ -25,14 +25,19 @@ Name & Description \\
    10.4  {\tt session} & A session \\
    10.5  {\tt task} & A long-running asynchronous task \\
    10.6  {\tt VM} & A virtual machine (or 'guest') \\
    10.7 +{\tt VM\_metrics} & The metrics associated with a VM \\
    10.8  {\tt host} & A physical host \\
    10.9 +{\tt host\_metrics} & The metrics associated with a host \\
   10.10  {\tt host\_cpu} & A physical CPU \\
   10.11  {\tt network} & A virtual network \\
   10.12  {\tt VIF} & A virtual network interface \\
   10.13  {\tt PIF} & A physical network interface (note separate VLANs are represented as several PIFs) \\
   10.14 +{\tt PIF\_metrics} & The metrics associated with a physical network interface \\
   10.15  {\tt SR} & A storage repository \\
   10.16  {\tt VDI} & A virtual disk image \\
   10.17  {\tt VBD} & A virtual block device \\
   10.18 +{\tt PBD} & The physical block devices through which hosts access SRs \\
   10.19 +{\tt crashdump} & A VM crashdump \\
   10.20  {\tt VTPM} & A virtual TPM device \\
   10.21  {\tt console} & A console \\
   10.22  {\tt user} & A user of the system \\
   10.23 @@ -46,11 +51,17 @@ Fields that are bound together are shown
   10.24  {\em object.field} & {\em object.field} & {\em relationship} \\
   10.25  
   10.26  \hline
   10.27 +host.PBDs & PBD.host & many-to-one\\
   10.28 +SR.PBDs & PBD.SR & many-to-one\\
   10.29  VDI.VBDs & VBD.VDI & many-to-one\\
   10.30 -VDI.parent & VDI.children & one-to-many\\
   10.31 +VDI.crash\_dumps & crashdump.VDI & many-to-one\\
   10.32  VBD.VM & VM.VBDs & one-to-many\\
   10.33 +crashdump.VM & VM.crash\_dumps & one-to-many\\
   10.34  VIF.VM & VM.VIFs & one-to-many\\
   10.35  VIF.network & network.VIFs & one-to-many\\
   10.36 +host.metrics & host\_metrics.host & one-to-one\\
   10.37 +PIF.metrics & PIF\_metrics.PIF & one-to-one\\
   10.38 +VM.metrics & VM\_metrics.VM & one-to-one\\
   10.39  PIF.host & host.PIFs & one-to-many\\
   10.40  PIF.network & network.PIFs & one-to-many\\
   10.41  SR.VDIs & VDI.SR & many-to-one\\
   10.42 @@ -117,6 +128,8 @@ The following enumeration types are used
   10.43  \hspace{0.5cm}{\tt system} & a disk that may be replaced on upgrade \\
   10.44  \hspace{0.5cm}{\tt user} & a disk that is always preserved on upgrade \\
   10.45  \hspace{0.5cm}{\tt ephemeral} & a disk that may be reformatted on upgrade \\
   10.46 +\hspace{0.5cm}{\tt suspend} & a disk that stores a suspend image \\
   10.47 +\hspace{0.5cm}{\tt crashdump} & a disk that stores VM crashdump information \\
   10.48  \hline
   10.49  \end{longtable}
   10.50  
   10.51 @@ -137,83 +150,22 @@ The following enumeration types are used
   10.52  \vspace{1cm}
   10.53  \begin{longtable}{|ll|}
   10.54  \hline
   10.55 -{\tt enum task\_status\_type} & \\
   10.56 -\hline
   10.57 -\hspace{0.5cm}{\tt pending} & task is in progress \\
   10.58 -\hspace{0.5cm}{\tt success} & task was completed successfully \\
   10.59 -\hspace{0.5cm}{\tt failure} & task has failed \\
   10.60 +{\tt enum task\_allowed\_operations} & \\
   10.61 +\hline
   10.62 +\hspace{0.5cm}{\tt Cancel} & Cancel \\
   10.63  \hline
   10.64  \end{longtable}
   10.65  
   10.66  \vspace{1cm}
   10.67  \begin{longtable}{|ll|}
   10.68  \hline
   10.69 -{\tt enum cpu\_feature} & \\
   10.70 -\hline
   10.71 -\hspace{0.5cm}{\tt FPU} &  Onboard FPU  \\
   10.72 -\hspace{0.5cm}{\tt VME} &  Virtual Mode Extensions  \\
   10.73 -\hspace{0.5cm}{\tt DE} &  Debugging Extensions  \\
   10.74 -\hspace{0.5cm}{\tt PSE} &  Page Size Extensions  \\
   10.75 -\hspace{0.5cm}{\tt TSC} &  Time Stamp Counter  \\
   10.76 -\hspace{0.5cm}{\tt MSR} &  Model-Specific Registers, RDMSR, WRMSR  \\
   10.77 -\hspace{0.5cm}{\tt PAE} &  Physical Address Extensions  \\
   10.78 -\hspace{0.5cm}{\tt MCE} &  Machine Check Architecture  \\
   10.79 -\hspace{0.5cm}{\tt CX8} &  CMPXCHG8 instruction  \\
   10.80 -\hspace{0.5cm}{\tt APIC} &  Onboard APIC  \\
   10.81 -\hspace{0.5cm}{\tt SEP} &  SYSENTER/SYSEXIT  \\
   10.82 -\hspace{0.5cm}{\tt MTRR} &  Memory Type Range Registers  \\
   10.83 -\hspace{0.5cm}{\tt PGE} &  Page Global Enable  \\
   10.84 -\hspace{0.5cm}{\tt MCA} &  Machine Check Architecture  \\
   10.85 -\hspace{0.5cm}{\tt CMOV} &  CMOV instruction (FCMOVCC and FCOMI too if FPU present)  \\
   10.86 -\hspace{0.5cm}{\tt PAT} &  Page Attribute Table  \\
   10.87 -\hspace{0.5cm}{\tt PSE36} &  36-bit PSEs  \\
   10.88 -\hspace{0.5cm}{\tt PN} &  Processor serial number  \\
   10.89 -\hspace{0.5cm}{\tt CLFLSH} &  Supports the CLFLUSH instruction  \\
   10.90 -\hspace{0.5cm}{\tt DTES} &  Debug Trace Store  \\
   10.91 -\hspace{0.5cm}{\tt ACPI} &  ACPI via MSR  \\
   10.92 -\hspace{0.5cm}{\tt MMX} &  Multimedia Extensions  \\
   10.93 -\hspace{0.5cm}{\tt FXSR} &  FXSAVE and FXRSTOR instructions (fast save and restore  \\
   10.94 -\hspace{0.5cm}{\tt XMM} &  Streaming SIMD Extensions  \\
   10.95 -\hspace{0.5cm}{\tt XMM2} &  Streaming SIMD Extensions-2  \\
   10.96 -\hspace{0.5cm}{\tt SELFSNOOP} &  CPU self snoop  \\
   10.97 -\hspace{0.5cm}{\tt HT} &  Hyper-Threading  \\
   10.98 -\hspace{0.5cm}{\tt ACC} &  Automatic clock control  \\
   10.99 -\hspace{0.5cm}{\tt IA64} &  IA-64 processor  \\
  10.100 -\hspace{0.5cm}{\tt SYSCALL} &  SYSCALL/SYSRET  \\
  10.101 -\hspace{0.5cm}{\tt MP} &  MP Capable.  \\
  10.102 -\hspace{0.5cm}{\tt NX} &  Execute Disable  \\
  10.103 -\hspace{0.5cm}{\tt MMXEXT} &  AMD MMX extensions  \\
  10.104 -\hspace{0.5cm}{\tt LM} &  Long Mode (x86-64)  \\
  10.105 -\hspace{0.5cm}{\tt THREEDNOWEXT} &  AMD 3DNow! extensions  \\
  10.106 -\hspace{0.5cm}{\tt THREEDNOW} &  3DNow!  \\
  10.107 -\hspace{0.5cm}{\tt RECOVERY} &  CPU in recovery mode  \\
  10.108 -\hspace{0.5cm}{\tt LONGRUN} &  Longrun power control  \\
  10.109 -\hspace{0.5cm}{\tt LRTI} &  LongRun table interface  \\
  10.110 -\hspace{0.5cm}{\tt CXMMX} &  Cyrix MMX extensions  \\
  10.111 -\hspace{0.5cm}{\tt K6\_MTRR} &  AMD K6 nonstandard MTRRs  \\
  10.112 -\hspace{0.5cm}{\tt CYRIX\_ARR} &  Cyrix ARRs (= MTRRs)  \\
  10.113 -\hspace{0.5cm}{\tt CENTAUR\_MCR} &  Centaur MCRs (= MTRRs)  \\
  10.114 -\hspace{0.5cm}{\tt K8} &  Opteron, Athlon64  \\
  10.115 -\hspace{0.5cm}{\tt K7} &  Athlon  \\
  10.116 -\hspace{0.5cm}{\tt P3} &  P3  \\
  10.117 -\hspace{0.5cm}{\tt P4} &  P4  \\
  10.118 -\hspace{0.5cm}{\tt CONSTANT\_TSC} &  TSC ticks at a constant rate  \\
  10.119 -\hspace{0.5cm}{\tt FXSAVE\_LEAK} &  FXSAVE leaks FOP/FIP/FOP  \\
  10.120 -\hspace{0.5cm}{\tt XMM3} &  Streaming SIMD Extensions-3  \\
  10.121 -\hspace{0.5cm}{\tt MWAIT} &  Monitor/Mwait support  \\
  10.122 -\hspace{0.5cm}{\tt DSCPL} &  CPL Qualified Debug Store  \\
  10.123 -\hspace{0.5cm}{\tt EST} &  Enhanced SpeedStep  \\
  10.124 -\hspace{0.5cm}{\tt TM2} &  Thermal Monitor 2  \\
  10.125 -\hspace{0.5cm}{\tt CID} &  Context ID  \\
  10.126 -\hspace{0.5cm}{\tt CX16} &  CMPXCHG16B  \\
  10.127 -\hspace{0.5cm}{\tt XTPR} &  Send Task Priority Messages  \\
  10.128 -\hspace{0.5cm}{\tt XSTORE} &  on-CPU RNG present (xstore insn)  \\
  10.129 -\hspace{0.5cm}{\tt XSTORE\_EN} &  on-CPU RNG enabled  \\
  10.130 -\hspace{0.5cm}{\tt XCRYPT} &  on-CPU crypto (xcrypt insn)  \\
  10.131 -\hspace{0.5cm}{\tt XCRYPT\_EN} &  on-CPU crypto enabled  \\
  10.132 -\hspace{0.5cm}{\tt LAHF\_LM} &  LAHF/SAHF in long mode  \\
  10.133 -\hspace{0.5cm}{\tt CMP\_LEGACY} &  If yes HyperThreading not valid  \\
  10.134 -\hspace{0.5cm}{\tt VMX} &  VMX instruction set  \\
  10.135 +{\tt enum task\_status\_type} & \\
  10.136 +\hline
  10.137 +\hspace{0.5cm}{\tt pending} & task is in progress \\
  10.138 +\hspace{0.5cm}{\tt success} & task was completed successfully \\
  10.139 +\hspace{0.5cm}{\tt failure} & task has failed \\
  10.140 +\hspace{0.5cm}{\tt cancelling} & task is being cancelled \\
  10.141 +\hspace{0.5cm}{\tt cancelled} & task has been cancelled \\
  10.142  \hline
  10.143  \end{longtable}
  10.144  
  10.145 @@ -262,16 +214,6 @@ The following enumeration types are used
  10.146  \end{longtable}
  10.147  
  10.148  \vspace{1cm}
  10.149 -\begin{longtable}{|ll|}
  10.150 -\hline
  10.151 -{\tt enum driver\_type} & \\
  10.152 -\hline
  10.153 -\hspace{0.5cm}{\tt ioemu} & use hardware emulation \\
  10.154 -\hspace{0.5cm}{\tt paravirtualised} & use paravirtualised driver \\
  10.155 -\hline
  10.156 -\end{longtable}
  10.157 -
  10.158 -\vspace{1cm}
  10.159  
  10.160  \newpage
  10.161  \section{Class: session}
  10.162 @@ -279,13 +221,14 @@ The following enumeration types are used
  10.163  \begin{longtable}{|lllp{0.38\textwidth}|}
  10.164  \hline
  10.165  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf session} \\
  10.166 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A session}} \\
  10.167 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
  10.168 +session.}} \\
  10.169  \hline
  10.170  Quals & Field & Type & Description \\
  10.171  \hline
  10.172  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
  10.173 -$\mathit{RO}_\mathit{ins}$ &  {\tt this\_host} & host ref & Currently connected host \\
  10.174 -$\mathit{RO}_\mathit{ins}$ &  {\tt this\_user} & user ref & Currently connected user \\
  10.175 +$\mathit{RO}_\mathit{run}$ &  {\tt this\_host} & host ref & Currently connected host \\
  10.176 +$\mathit{RO}_\mathit{run}$ &  {\tt this\_user} & user ref & Currently connected user \\
  10.177  $\mathit{RO}_\mathit{run}$ &  {\tt last\_active} & int & Timestamp for last time session was active \\
  10.178  \hline
  10.179  \end{longtable}
  10.180 @@ -293,7 +236,7 @@ Quals & Field & Type & Description \\
  10.181  \subsubsection{RPC name:~login\_with\_password}
  10.182  
  10.183  {\bf Overview:} 
  10.184 -Attempt to authenticate the user, returning a session\_id if successful
  10.185 +Attempt to authenticate the user, returning a session\_id if successful.
  10.186  
  10.187   \noindent {\bf Signature:} 
  10.188  \begin{verbatim} (session ref) login_with_password (string uname, string pwd)\end{verbatim}
  10.189 @@ -327,7 +270,7 @@ ID of newly created session
  10.190  \subsubsection{RPC name:~logout}
  10.191  
  10.192  {\bf Overview:} 
  10.193 -Log out of a session
  10.194 +Log out of a session.
  10.195  
  10.196   \noindent {\bf Signature:} 
  10.197  \begin{verbatim} void logout (session_id s)\end{verbatim}
  10.198 @@ -545,23 +488,63 @@ all fields from the object
  10.199  \begin{longtable}{|lllp{0.38\textwidth}|}
  10.200  \hline
  10.201  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf task} \\
  10.202 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A long-running asynchronous task}} \\
  10.203 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
  10.204 +long-running asynchronous task.}} \\
  10.205  \hline
  10.206  Quals & Field & Type & Description \\
  10.207  \hline
  10.208  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
  10.209 -$\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
  10.210 -$\mathit{RW}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
  10.211 +$\mathit{RO}_\mathit{run}$ &  {\tt name/label} & string & a human-readable name \\
  10.212 +$\mathit{RO}_\mathit{run}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
  10.213  $\mathit{RO}_\mathit{run}$ &  {\tt status} & task\_status\_type & current status of the task \\
  10.214 +$\mathit{RO}_\mathit{run}$ &  {\tt session} & session ref & the session that created the task \\
  10.215  $\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. \\
  10.216 -$\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. \\
  10.217  $\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. \\
  10.218  $\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. \\
  10.219  $\mathit{RO}_\mathit{run}$ &  {\tt error\_code} & int & if the task has failed, this field contains the error code. Undefined otherwise. \\
  10.220  $\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. \\
  10.221 +$\mathit{RO}_\mathit{run}$ &  {\tt allowed\_operations} & (task\_allowed\_operations) Set & Operations allowed on this task \\
  10.222  \hline
  10.223  \end{longtable}
  10.224  \subsection{Additional RPCs associated with class: task}
  10.225 +\subsubsection{RPC name:~cancel}
  10.226 +
  10.227 +{\bf Overview:} 
  10.228 +Cancel this task.  If task.allowed\_operations does not contain Cancel,
  10.229 +then this will fail with OPERATION\_NOT\_ALLOWED.  The task will show the
  10.230 +status 'cancelling', and you should continue to check its status until it
  10.231 +shows 'cancelled'.  There is no guarantee as to the time within which this
  10.232 +task will be cancelled.
  10.233 +
  10.234 + \noindent {\bf Signature:} 
  10.235 +\begin{verbatim} void cancel (session_id s, task ref task)\end{verbatim}
  10.236 +
  10.237 +
  10.238 +\noindent{\bf Arguments:}
  10.239 +
  10.240 + 
  10.241 +\vspace{0.3cm}
  10.242 +\begin{tabular}{|c|c|p{7cm}|}
  10.243 + \hline
  10.244 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.245 +{\tt task ref } & task & The task \\ \hline 
  10.246 +
  10.247 +\end{tabular}
  10.248 +
  10.249 +\vspace{0.3cm}
  10.250 +
  10.251 + \noindent {\bf Return Type:} 
  10.252 +{\tt 
  10.253 +void
  10.254 +}
  10.255 +
  10.256 +
  10.257 +
  10.258 +\vspace{0.3cm}
  10.259 +
  10.260 +\noindent{\bf Possible Error Codes:} {\tt OPERATION\_NOT\_ALLOWED}
  10.261 +
  10.262 +\vspace{0.6cm}
  10.263  \subsubsection{RPC name:~get\_all}
  10.264  
  10.265  {\bf Overview:} 
  10.266 @@ -647,40 +630,6 @@ value of the field
  10.267  \vspace{0.3cm}
  10.268  \vspace{0.3cm}
  10.269  \vspace{0.3cm}
  10.270 -\subsubsection{RPC name:~set\_name\_label}
  10.271 -
  10.272 -{\bf Overview:} 
  10.273 -Set the name/label field of the given task.
  10.274 -
  10.275 - \noindent {\bf Signature:} 
  10.276 -\begin{verbatim} void set_name_label (session_id s, task ref self, string value)\end{verbatim}
  10.277 -
  10.278 -
  10.279 -\noindent{\bf Arguments:}
  10.280 -
  10.281 - 
  10.282 -\vspace{0.3cm}
  10.283 -\begin{tabular}{|c|c|p{7cm}|}
  10.284 - \hline
  10.285 -{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.286 -{\tt task ref } & self & reference to the object \\ \hline 
  10.287 -
  10.288 -{\tt string } & value & New value to set \\ \hline 
  10.289 -
  10.290 -\end{tabular}
  10.291 -
  10.292 -\vspace{0.3cm}
  10.293 -
  10.294 - \noindent {\bf Return Type:} 
  10.295 -{\tt 
  10.296 -void
  10.297 -}
  10.298 -
  10.299 -
  10.300 -
  10.301 -\vspace{0.3cm}
  10.302 -\vspace{0.3cm}
  10.303 -\vspace{0.3cm}
  10.304  \subsubsection{RPC name:~get\_name\_description}
  10.305  
  10.306  {\bf Overview:} 
  10.307 @@ -713,40 +662,6 @@ value of the field
  10.308  \vspace{0.3cm}
  10.309  \vspace{0.3cm}
  10.310  \vspace{0.3cm}
  10.311 -\subsubsection{RPC name:~set\_name\_description}
  10.312 -
  10.313 -{\bf Overview:} 
  10.314 -Set the name/description field of the given task.
  10.315 -
  10.316 - \noindent {\bf Signature:} 
  10.317 -\begin{verbatim} void set_name_description (session_id s, task ref self, string value)\end{verbatim}
  10.318 -
  10.319 -
  10.320 -\noindent{\bf Arguments:}
  10.321 -
  10.322 - 
  10.323 -\vspace{0.3cm}
  10.324 -\begin{tabular}{|c|c|p{7cm}|}
  10.325 - \hline
  10.326 -{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.327 -{\tt task ref } & self & reference to the object \\ \hline 
  10.328 -
  10.329 -{\tt string } & value & New value to set \\ \hline 
  10.330 -
  10.331 -\end{tabular}
  10.332 -
  10.333 -\vspace{0.3cm}
  10.334 -
  10.335 - \noindent {\bf Return Type:} 
  10.336 -{\tt 
  10.337 -void
  10.338 -}
  10.339 -
  10.340 -
  10.341 -
  10.342 -\vspace{0.3cm}
  10.343 -\vspace{0.3cm}
  10.344 -\vspace{0.3cm}
  10.345  \subsubsection{RPC name:~get\_status}
  10.346  
  10.347  {\bf Overview:} 
  10.348 @@ -779,6 +694,38 @@ value of the field
  10.349  \vspace{0.3cm}
  10.350  \vspace{0.3cm}
  10.351  \vspace{0.3cm}
  10.352 +\subsubsection{RPC name:~get\_session}
  10.353 +
  10.354 +{\bf Overview:} 
  10.355 +Get the session field of the given task.
  10.356 +
  10.357 + \noindent {\bf Signature:} 
  10.358 +\begin{verbatim} (session ref) get_session (session_id s, task ref self)\end{verbatim}
  10.359 +
  10.360 +
  10.361 +\noindent{\bf Arguments:}
  10.362 +
  10.363 + 
  10.364 +\vspace{0.3cm}
  10.365 +\begin{tabular}{|c|c|p{7cm}|}
  10.366 + \hline
  10.367 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.368 +{\tt task ref } & self & reference to the object \\ \hline 
  10.369 +
  10.370 +\end{tabular}
  10.371 +
  10.372 +\vspace{0.3cm}
  10.373 +
  10.374 + \noindent {\bf Return Type:} 
  10.375 +{\tt 
  10.376 +session ref
  10.377 +}
  10.378 +
  10.379 +
  10.380 +value of the field
  10.381 +\vspace{0.3cm}
  10.382 +\vspace{0.3cm}
  10.383 +\vspace{0.3cm}
  10.384  \subsubsection{RPC name:~get\_progress}
  10.385  
  10.386  {\bf Overview:} 
  10.387 @@ -811,38 +758,6 @@ value of the field
  10.388  \vspace{0.3cm}
  10.389  \vspace{0.3cm}
  10.390  \vspace{0.3cm}
  10.391 -\subsubsection{RPC name:~get\_eta}
  10.392 -
  10.393 -{\bf Overview:} 
  10.394 -Get the eta field of the given task.
  10.395 -
  10.396 - \noindent {\bf Signature:} 
  10.397 -\begin{verbatim} datetime get_eta (session_id s, task ref self)\end{verbatim}
  10.398 -
  10.399 -
  10.400 -\noindent{\bf Arguments:}
  10.401 -
  10.402 - 
  10.403 -\vspace{0.3cm}
  10.404 -\begin{tabular}{|c|c|p{7cm}|}
  10.405 - \hline
  10.406 -{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.407 -{\tt task ref } & self & reference to the object \\ \hline 
  10.408 -
  10.409 -\end{tabular}
  10.410 -
  10.411 -\vspace{0.3cm}
  10.412 -
  10.413 - \noindent {\bf Return Type:} 
  10.414 -{\tt 
  10.415 -datetime
  10.416 -}
  10.417 -
  10.418 -
  10.419 -value of the field
  10.420 -\vspace{0.3cm}
  10.421 -\vspace{0.3cm}
  10.422 -\vspace{0.3cm}
  10.423  \subsubsection{RPC name:~get\_type}
  10.424  
  10.425  {\bf Overview:} 
  10.426 @@ -971,6 +886,38 @@ value of the field
  10.427  \vspace{0.3cm}
  10.428  \vspace{0.3cm}
  10.429  \vspace{0.3cm}
  10.430 +\subsubsection{RPC name:~get\_allowed\_operations}
  10.431 +
  10.432 +{\bf Overview:} 
  10.433 +Get the allowed\_operations field of the given task.
  10.434 +
  10.435 + \noindent {\bf Signature:} 
  10.436 +\begin{verbatim} ((task_allowed_operations) Set) get_allowed_operations (session_id s, task ref self)\end{verbatim}
  10.437 +
  10.438 +
  10.439 +\noindent{\bf Arguments:}
  10.440 +
  10.441 + 
  10.442 +\vspace{0.3cm}
  10.443 +\begin{tabular}{|c|c|p{7cm}|}
  10.444 + \hline
  10.445 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.446 +{\tt task ref } & self & reference to the object \\ \hline 
  10.447 +
  10.448 +\end{tabular}
  10.449 +
  10.450 +\vspace{0.3cm}
  10.451 +
  10.452 + \noindent {\bf Return Type:} 
  10.453 +{\tt 
  10.454 +(task\_allowed\_operations) Set
  10.455 +}
  10.456 +
  10.457 +
  10.458 +value of the field
  10.459 +\vspace{0.3cm}
  10.460 +\vspace{0.3cm}
  10.461 +\vspace{0.3cm}
  10.462  \subsubsection{RPC name:~get\_by\_uuid}
  10.463  
  10.464  {\bf Overview:} 
  10.465 @@ -1075,7 +1022,8 @@ references to objects with match names
  10.466  \begin{longtable}{|lllp{0.38\textwidth}|}
  10.467  \hline
  10.468  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VM} \\
  10.469 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual machine (or 'guest').
  10.470 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
  10.471 +virtual machine (or 'guest').
  10.472  
  10.473  VM booting is controlled by setting one of the two mutually exclusive
  10.474  groups: "PV", and "HVM".  If HVM.boot is the empty string, then paravirtual
  10.475 @@ -1089,7 +1037,10 @@ control domain to some other bootloader.
  10.476  PV/ramdisk, PV/args and PV/bootloader\_args will be passed to the
  10.477  bootloader unmodified, and interpretation of those fields is then specific
  10.478  to the bootloader itself, including the possibility that the bootloader
  10.479 -will ignore some or all of those given values.
  10.480 +will ignore some or all of those given values. Finally the paths of all
  10.481 +bootable disks are added to the bootloader commandline (a disk is bootable
  10.482 +if its VBD has the bootable flag set). There may be zero, one or many
  10.483 +bootable disks; the bootloader decides which disk (if any) to boot from.
  10.484  
  10.485  If the bootloader is pygrub, then the menu.lst is parsed if present in the
  10.486  guest's filesystem, otherwise the specified kernel and ramdisk are used, or
  10.487 @@ -1102,7 +1053,7 @@ ramdisk values will be treated as paths 
  10.488  PV/bootloader and PV/kernel are empty, then the behaviour is as if
  10.489  PV/bootloader was specified as "pygrub".
  10.490  
  10.491 -When using HVM booting, HVM/boot specifies the order of the boot devices}} \\
  10.492 +When using HVM booting, HVM/boot specifies the order of the boot devices.}} \\
  10.493  \hline
  10.494  Quals & Field & Type & Description \\
  10.495  \hline
  10.496 @@ -1113,27 +1064,25 @@ Quals & Field & Type & Description \\
  10.497  $\mathit{RW}$ &  {\tt user\_version} & int & a user version number for this machine \\
  10.498  $\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 \\
  10.499  $\mathit{RW}$ &  {\tt auto\_power\_on} & bool & true if this VM should be started automatically after host boot \\
  10.500 +$\mathit{RO}_\mathit{run}$ &  {\tt suspend\_VDI} & VDI ref & The VDI that a suspend image is stored on. (Only has meaning if VM is currently suspended) \\
  10.501  $\mathit{RO}_\mathit{run}$ &  {\tt resident\_on} & host ref & the host the VM is currently resident on \\
  10.502 -$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_max} & int & Statically-set (i.e. absolute) maximum (bytes) \\
  10.503 +$\mathit{RW}$ &  {\tt memory/static\_max} & int & Statically-set (i.e. absolute) maximum (bytes) \\
  10.504  $\mathit{RW}$ &  {\tt memory/dynamic\_max} & int & Dynamic maximum (bytes) \\
  10.505 -$\mathit{RO}_\mathit{run}$ &  {\tt memory/actual} & int & Guest's actual usage (bytes) \\
  10.506  $\mathit{RW}$ &  {\tt memory/dynamic\_min} & int & Dynamic minimum (bytes) \\
  10.507 -$\mathit{RO}_\mathit{ins}$ &  {\tt memory/static\_min} & int & Statically-set (i.e. absolute) mininum (bytes) \\
  10.508 +$\mathit{RW}$ &  {\tt memory/static\_min} & int & Statically-set (i.e. absolute) mininum (bytes) \\
  10.509  $\mathit{RW}$ &  {\tt VCPUs/policy} & string & the name of the VCPU scheduling policy to be applied \\
  10.510 -$\mathit{RW}$ &  {\tt VCPUs/params} & string & string-encoded parameters passed to selected VCPU policy \\
  10.511 -$\mathit{RW}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
  10.512 +$\mathit{RW}$ &  {\tt VCPUs/params} & (string $\rightarrow$ string) Map & configuration parameters for the selected VCPU policy \\
  10.513 +$\mathit{RW}$ &  {\tt VCPUs/max} & int & Max number of VCPUs \\
  10.514 +$\mathit{RW}$ &  {\tt VCPUs/at\_startup} & int & Boot number of VCPUs \\
  10.515 +$\mathit{RO}_\mathit{ins}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
  10.516  $\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\
  10.517 -$\mathit{RO}_\mathit{ins}$ &  {\tt VCPUs/features/required} & (cpu\_feature) Set & CPU features the guest demands the host supports \\
  10.518 -$\mathit{RO}_\mathit{ins}$ &  {\tt VCPUs/features/can\_use} & (cpu\_feature) Set & CPU features the guest can use if available \\
  10.519 -$\mathit{RW}$ &  {\tt VCPUs/features/force\_on} & (cpu\_feature) Set & CPU features to expose to the guest above the bare minimum \\
  10.520 -$\mathit{RW}$ &  {\tt VCPUs/features/force\_off} & (cpu\_feature) Set & CPU features to hide to the guest \\
  10.521  $\mathit{RW}$ &  {\tt actions/after\_shutdown} & on\_normal\_exit & action to take after the guest has shutdown itself \\
  10.522  $\mathit{RW}$ &  {\tt actions/after\_reboot} & on\_normal\_exit & action to take after the guest has rebooted itself \\
  10.523 -$\mathit{RW}$ &  {\tt actions/after\_suspend} & on\_normal\_exit & action to take after the guest has suspended itself \\
  10.524  $\mathit{RW}$ &  {\tt actions/after\_crash} & on\_crash\_behaviour & action to take if the guest crashes \\
  10.525  $\mathit{RO}_\mathit{run}$ &  {\tt consoles} & (console ref) Set & virtual console devices \\
  10.526  $\mathit{RO}_\mathit{run}$ &  {\tt VIFs} & (VIF ref) Set & virtual network interfaces \\
  10.527  $\mathit{RO}_\mathit{run}$ &  {\tt VBDs} & (VBD ref) Set & virtual block devices \\
  10.528 +$\mathit{RO}_\mathit{run}$ &  {\tt crash\_dumps} & (crashdump ref) Set & crash dumps associated with this VM \\
  10.529  $\mathit{RO}_\mathit{run}$ &  {\tt VTPMs} & (VTPM ref) Set & virtual TPMs \\
  10.530  $\mathit{RW}$ &  {\tt PV/bootloader} & string & name of or path to bootloader \\
  10.531  $\mathit{RW}$ &  {\tt PV/kernel} & string & path to the kernel \\
  10.532 @@ -1148,14 +1097,19 @@ Quals & Field & Type & Description \\
  10.533  $\mathit{RW}$ &  {\tt platform/enable\_audio} & bool & emulate audio \\
  10.534  $\mathit{RO}_\mathit{ins}$ &  {\tt PCI\_bus} & string & PCI bus path for pass-through devices \\
  10.535  $\mathit{RO}_\mathit{run}$ &  {\tt tools\_version} & (string $\rightarrow$ string) Map & versions of installed paravirtualised drivers \\
  10.536 -$\mathit{RW}$ &  {\tt otherConfig} & (string $\rightarrow$ string) Map & additional configuration \\
  10.537 +$\mathit{RW}$ &  {\tt other\_config} & (string $\rightarrow$ string) Map & additional configuration \\
  10.538 +$\mathit{RO}_\mathit{run}$ &  {\tt is\_control\_domain} & bool & true if this is a control domain (domain 0 or a driver domain) \\
  10.539 +$\mathit{RO}_\mathit{ins}$ &  {\tt metrics} & VM\_metrics ref & metrics associated with this VM. \\
  10.540  \hline
  10.541  \end{longtable}
  10.542  \subsection{Additional RPCs associated with class: VM}
  10.543  \subsubsection{RPC name:~clone}
  10.544  
  10.545  {\bf Overview:} 
  10.546 -Clones the specified VM, making a new VM. Clone automatically exploits the capabilities of the underlying storage repository in which the VM's disk images are stored (e.g. Copy on Write).   This function can only be called when the VM is in the Halted State.
  10.547 +Clones the specified VM, making a new VM. Clone automatically exploits the
  10.548 +capabilities of the underlying storage repository in which the VM's disk
  10.549 +images are stored (e.g. Copy on Write).   This function can only be called
  10.550 +when the VM is in the Halted State.
  10.551  
  10.552   \noindent {\bf Signature:} 
  10.553  \begin{verbatim} (VM ref) clone (session_id s, VM ref vm, string new_name)\end{verbatim}
  10.554 @@ -1191,7 +1145,8 @@ The ID of the newly created VM.
  10.555  \subsubsection{RPC name:~start}
  10.556  
  10.557  {\bf Overview:} 
  10.558 -Start the specified VM.  This function can only be called with the VM is in the Halted State.
  10.559 +Start the specified VM.  This function can only be called with the VM is in
  10.560 +the Halted State.
  10.561  
  10.562   \noindent {\bf Signature:} 
  10.563  \begin{verbatim} void start (session_id s, VM ref vm, bool start_paused)\end{verbatim}
  10.564 @@ -1227,7 +1182,8 @@ void
  10.565  \subsubsection{RPC name:~pause}
  10.566  
  10.567  {\bf Overview:} 
  10.568 -Pause the specified VM. This can only be called when the specified VM is in the Running state.
  10.569 +Pause the specified VM. This can only be called when the specified VM is in
  10.570 +the Running state.
  10.571  
  10.572   \noindent {\bf Signature:} 
  10.573  \begin{verbatim} void pause (session_id s, VM ref vm)\end{verbatim}
  10.574 @@ -1261,7 +1217,8 @@ void
  10.575  \subsubsection{RPC name:~unpause}
  10.576  
  10.577  {\bf Overview:} 
  10.578 -Resume the specified VM. This can only be called when the specified VM is in the Paused state.
  10.579 +Resume the specified VM. This can only be called when the specified VM is
  10.580 +in the Paused state.
  10.581  
  10.582   \noindent {\bf Signature:} 
  10.583  \begin{verbatim} void unpause (session_id s, VM ref vm)\end{verbatim}
  10.584 @@ -1295,9 +1252,11 @@ void
  10.585  \subsubsection{RPC name:~clean\_shutdown}
  10.586  
  10.587  {\bf Overview:} 
  10.588 -Attempt to cleanly shutdown the specified VM. (Note: this may not be supported---e.g. if a guest agent is not installed).
  10.589 -
  10.590 -Once shutdown has been completed perform poweroff action specified in guest configuration.
  10.591 +Attempt to cleanly shutdown the specified VM. (Note: this may not be
  10.592 +supported---e.g. if a guest agent is not installed).
  10.593 +
  10.594 +Once shutdown has been completed perform poweroff action specified in guest
  10.595 +configuration.
  10.596  
  10.597  This can only be called when the specified VM is in the Running state.
  10.598  
  10.599 @@ -1333,9 +1292,11 @@ void
  10.600  \subsubsection{RPC name:~clean\_reboot}
  10.601  
  10.602  {\bf Overview:} 
  10.603 -Attempt to cleanly shutdown the specified VM (Note: this may not be supported---e.g. if a guest agent is not installed).
  10.604 -
  10.605 -Once shutdown has been completed perform reboot action specified in guest configuration.
  10.606 +Attempt to cleanly shutdown the specified VM (Note: this may not be
  10.607 +supported---e.g. if a guest agent is not installed).
  10.608 +
  10.609 +Once shutdown has been completed perform reboot action specified in guest
  10.610 +configuration.
  10.611  
  10.612  This can only be called when the specified VM is in the Running state.
  10.613  
  10.614 @@ -1371,7 +1332,8 @@ void
  10.615  \subsubsection{RPC name:~hard\_shutdown}
  10.616  
  10.617  {\bf Overview:} 
  10.618 -Stop executing the specified VM without attempting a clean shutdown. Then perform poweroff action specified in VM configuration.
  10.619 +Stop executing the specified VM without attempting a clean shutdown. Then
  10.620 +perform poweroff action specified in VM configuration.
  10.621  
  10.622   \noindent {\bf Signature:} 
  10.623  \begin{verbatim} void hard_shutdown (session_id s, VM ref vm)\end{verbatim}
  10.624 @@ -1403,7 +1365,8 @@ void
  10.625  \subsubsection{RPC name:~hard\_reboot}
  10.626  
  10.627  {\bf Overview:} 
  10.628 -Stop executing the specified VM without attempting a clean shutdown. Then perform reboot action specified in VM configuration
  10.629 +Stop executing the specified VM without attempting a clean shutdown. Then
  10.630 +perform reboot action specified in VM configuration.
  10.631  
  10.632   \noindent {\bf Signature:} 
  10.633  \begin{verbatim} void hard_reboot (session_id s, VM ref vm)\end{verbatim}
  10.634 @@ -1435,7 +1398,8 @@ void
  10.635  \subsubsection{RPC name:~suspend}
  10.636  
  10.637  {\bf Overview:} 
  10.638 -Suspend the specified VM to disk.  This can only be called when the specified VM is in the Running state.
  10.639 +Suspend the specified VM to disk.  This can only be called when the
  10.640 +specified VM is in the Running state.
  10.641  
  10.642   \noindent {\bf Signature:} 
  10.643  \begin{verbatim} void suspend (session_id s, VM ref vm)\end{verbatim}
  10.644 @@ -1469,7 +1433,8 @@ void
  10.645  \subsubsection{RPC name:~resume}
  10.646  
  10.647  {\bf Overview:} 
  10.648 -Awaken the specified VM and resume it.  This can only be called when the specified VM is in the Suspended state.
  10.649 +Awaken the specified VM and resume it.  This can only be called when the
  10.650 +specified VM is in the Suspended state.
  10.651  
  10.652   \noindent {\bf Signature:} 
  10.653  \begin{verbatim} void resume (session_id s, VM ref vm, bool start_paused)\end{verbatim}
  10.654 @@ -1917,6 +1882,38 @@ void
  10.655  \vspace{0.3cm}
  10.656  \vspace{0.3cm}
  10.657  \vspace{0.3cm}
  10.658 +\subsubsection{RPC name:~get\_suspend\_VDI}
  10.659 +
  10.660 +{\bf Overview:} 
  10.661 +Get the suspend\_VDI field of the given VM.
  10.662 +
  10.663 + \noindent {\bf Signature:} 
  10.664 +\begin{verbatim} (VDI ref) get_suspend_VDI (session_id s, VM ref self)\end{verbatim}
  10.665 +
  10.666 +
  10.667 +\noindent{\bf Arguments:}
  10.668 +
  10.669 + 
  10.670 +\vspace{0.3cm}
  10.671 +\begin{tabular}{|c|c|p{7cm}|}
  10.672 + \hline
  10.673 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.674 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.675 +
  10.676 +\end{tabular}
  10.677 +
  10.678 +\vspace{0.3cm}
  10.679 +
  10.680 + \noindent {\bf Return Type:} 
  10.681 +{\tt 
  10.682 +VDI ref
  10.683 +}
  10.684 +
  10.685 +
  10.686 +value of the field
  10.687 +\vspace{0.3cm}
  10.688 +\vspace{0.3cm}
  10.689 +\vspace{0.3cm}
  10.690  \subsubsection{RPC name:~get\_resident\_on}
  10.691  
  10.692  {\bf Overview:} 
  10.693 @@ -1981,6 +1978,40 @@ value of the field
  10.694  \vspace{0.3cm}
  10.695  \vspace{0.3cm}
  10.696  \vspace{0.3cm}
  10.697 +\subsubsection{RPC name:~set\_memory\_static\_max}
  10.698 +
  10.699 +{\bf Overview:} 
  10.700 +Set the memory/static\_max field of the given VM.
  10.701 +
  10.702 + \noindent {\bf Signature:} 
  10.703 +\begin{verbatim} void set_memory_static_max (session_id s, VM ref self, int value)\end{verbatim}
  10.704 +
  10.705 +
  10.706 +\noindent{\bf Arguments:}
  10.707 +
  10.708 + 
  10.709 +\vspace{0.3cm}
  10.710 +\begin{tabular}{|c|c|p{7cm}|}
  10.711 + \hline
  10.712 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.713 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.714 +
  10.715 +{\tt int } & value & New value to set \\ \hline 
  10.716 +
  10.717 +\end{tabular}
  10.718 +
  10.719 +\vspace{0.3cm}
  10.720 +
  10.721 + \noindent {\bf Return Type:} 
  10.722 +{\tt 
  10.723 +void
  10.724 +}
  10.725 +
  10.726 +
  10.727 +
  10.728 +\vspace{0.3cm}
  10.729 +\vspace{0.3cm}
  10.730 +\vspace{0.3cm}
  10.731  \subsubsection{RPC name:~get\_memory\_dynamic\_max}
  10.732  
  10.733  {\bf Overview:} 
  10.734 @@ -2047,38 +2078,6 @@ void
  10.735  \vspace{0.3cm}
  10.736  \vspace{0.3cm}
  10.737  \vspace{0.3cm}
  10.738 -\subsubsection{RPC name:~get\_memory\_actual}
  10.739 -
  10.740 -{\bf Overview:} 
  10.741 -Get the memory/actual field of the given VM.
  10.742 -
  10.743 - \noindent {\bf Signature:} 
  10.744 -\begin{verbatim} int get_memory_actual (session_id s, VM ref self)\end{verbatim}
  10.745 -
  10.746 -
  10.747 -\noindent{\bf Arguments:}
  10.748 -
  10.749 - 
  10.750 -\vspace{0.3cm}
  10.751 -\begin{tabular}{|c|c|p{7cm}|}
  10.752 - \hline
  10.753 -{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.754 -{\tt VM ref } & self & reference to the object \\ \hline 
  10.755 -
  10.756 -\end{tabular}
  10.757 -
  10.758 -\vspace{0.3cm}
  10.759 -
  10.760 - \noindent {\bf Return Type:} 
  10.761 -{\tt 
  10.762 -int
  10.763 -}
  10.764 -
  10.765 -
  10.766 -value of the field
  10.767 -\vspace{0.3cm}
  10.768 -\vspace{0.3cm}
  10.769 -\vspace{0.3cm}
  10.770  \subsubsection{RPC name:~get\_memory\_dynamic\_min}
  10.771  
  10.772  {\bf Overview:} 
  10.773 @@ -2177,6 +2176,40 @@ value of the field
  10.774  \vspace{0.3cm}
  10.775  \vspace{0.3cm}
  10.776  \vspace{0.3cm}
  10.777 +\subsubsection{RPC name:~set\_memory\_static\_min}
  10.778 +
  10.779 +{\bf Overview:} 
  10.780 +Set the memory/static\_min field of the given VM.
  10.781 +
  10.782 + \noindent {\bf Signature:} 
  10.783 +\begin{verbatim} void set_memory_static_min (session_id s, VM ref self, int value)\end{verbatim}
  10.784 +
  10.785 +
  10.786 +\noindent{\bf Arguments:}
  10.787 +
  10.788 + 
  10.789 +\vspace{0.3cm}
  10.790 +\begin{tabular}{|c|c|p{7cm}|}
  10.791 + \hline
  10.792 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.793 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.794 +
  10.795 +{\tt int } & value & New value to set \\ \hline 
  10.796 +
  10.797 +\end{tabular}
  10.798 +
  10.799 +\vspace{0.3cm}
  10.800 +
  10.801 + \noindent {\bf Return Type:} 
  10.802 +{\tt 
  10.803 +void
  10.804 +}
  10.805 +
  10.806 +
  10.807 +
  10.808 +\vspace{0.3cm}
  10.809 +\vspace{0.3cm}
  10.810 +\vspace{0.3cm}
  10.811  \subsubsection{RPC name:~get\_VCPUs\_policy}
  10.812  
  10.813  {\bf Overview:} 
  10.814 @@ -2249,7 +2282,7 @@ void
  10.815  Get the VCPUs/params field of the given VM.
  10.816  
  10.817   \noindent {\bf Signature:} 
  10.818 -\begin{verbatim} string get_VCPUs_params (session_id s, VM ref self)\end{verbatim}
  10.819 +\begin{verbatim} ((string -> string) Map) get_VCPUs_params (session_id s, VM ref self)\end{verbatim}
  10.820  
  10.821  
  10.822  \noindent{\bf Arguments:}
  10.823 @@ -2267,7 +2300,7 @@ Get the VCPUs/params field of the given 
  10.824  
  10.825   \noindent {\bf Return Type:} 
  10.826  {\tt 
  10.827 -string
  10.828 +(string $\rightarrow$ string) Map
  10.829  }
  10.830  
  10.831  
  10.832 @@ -2281,7 +2314,7 @@ value of the field
  10.833  Set the VCPUs/params field of the given VM.
  10.834  
  10.835   \noindent {\bf Signature:} 
  10.836 -\begin{verbatim} void set_VCPUs_params (session_id s, VM ref self, string value)\end{verbatim}
  10.837 +\begin{verbatim} void set_VCPUs_params (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
  10.838  
  10.839  
  10.840  \noindent{\bf Arguments:}
  10.841 @@ -2293,7 +2326,210 @@ Set the VCPUs/params field of the given 
  10.842  {\bf type} & {\bf name} & {\bf description} \\ \hline
  10.843  {\tt VM ref } & self & reference to the object \\ \hline 
  10.844  
  10.845 -{\tt string } & value & New value to set \\ \hline 
  10.846 +{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline 
  10.847 +
  10.848 +\end{tabular}
  10.849 +
  10.850 +\vspace{0.3cm}
  10.851 +
  10.852 + \noindent {\bf Return Type:} 
  10.853 +{\tt 
  10.854 +void
  10.855 +}
  10.856 +
  10.857 +
  10.858 +
  10.859 +\vspace{0.3cm}
  10.860 +\vspace{0.3cm}
  10.861 +\vspace{0.3cm}
  10.862 +\subsubsection{RPC name:~add\_to\_VCPUs\_params}
  10.863 +
  10.864 +{\bf Overview:} 
  10.865 +Add the given key-value pair to the VCPUs/params field of the given VM.
  10.866 +
  10.867 + \noindent {\bf Signature:} 
  10.868 +\begin{verbatim} void add_to_VCPUs_params (session_id s, VM ref self, string key, string value)\end{verbatim}
  10.869 +
  10.870 +
  10.871 +\noindent{\bf Arguments:}
  10.872 +
  10.873 + 
  10.874 +\vspace{0.3cm}
  10.875 +\begin{tabular}{|c|c|p{7cm}|}
  10.876 + \hline
  10.877 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.878 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.879 +
  10.880 +{\tt string } & key & Key to add \\ \hline 
  10.881 +
  10.882 +{\tt string } & value & Value to add \\ \hline 
  10.883 +
  10.884 +\end{tabular}
  10.885 +
  10.886 +\vspace{0.3cm}
  10.887 +
  10.888 + \noindent {\bf Return Type:} 
  10.889 +{\tt 
  10.890 +void
  10.891 +}
  10.892 +
  10.893 +
  10.894 +
  10.895 +\vspace{0.3cm}
  10.896 +\vspace{0.3cm}
  10.897 +\vspace{0.3cm}
  10.898 +\subsubsection{RPC name:~remove\_from\_VCPUs\_params}
  10.899 +
  10.900 +{\bf Overview:} 
  10.901 +Remove the given key and its corresponding value from the VCPUs/params
  10.902 +field of the given VM.  If the key is not in that Map, then do nothing.
  10.903 +
  10.904 + \noindent {\bf Signature:} 
  10.905 +\begin{verbatim} void remove_from_VCPUs_params (session_id s, VM ref self, string key)\end{verbatim}
  10.906 +
  10.907 +
  10.908 +\noindent{\bf Arguments:}
  10.909 +
  10.910 + 
  10.911 +\vspace{0.3cm}
  10.912 +\begin{tabular}{|c|c|p{7cm}|}
  10.913 + \hline
  10.914 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.915 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.916 +
  10.917 +{\tt string } & key & Key to remove \\ \hline 
  10.918 +
  10.919 +\end{tabular}
  10.920 +
  10.921 +\vspace{0.3cm}
  10.922 +
  10.923 + \noindent {\bf Return Type:} 
  10.924 +{\tt 
  10.925 +void
  10.926 +}
  10.927 +
  10.928 +
  10.929 +
  10.930 +\vspace{0.3cm}
  10.931 +\vspace{0.3cm}
  10.932 +\vspace{0.3cm}
  10.933 +\subsubsection{RPC name:~get\_VCPUs\_max}
  10.934 +
  10.935 +{\bf Overview:} 
  10.936 +Get the VCPUs/max field of the given VM.
  10.937 +
  10.938 + \noindent {\bf Signature:} 
  10.939 +\begin{verbatim} int get_VCPUs_max (session_id s, VM ref self)\end{verbatim}
  10.940 +
  10.941 +
  10.942 +\noindent{\bf Arguments:}
  10.943 +
  10.944 + 
  10.945 +\vspace{0.3cm}
  10.946 +\begin{tabular}{|c|c|p{7cm}|}
  10.947 + \hline
  10.948 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.949 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.950 +
  10.951 +\end{tabular}
  10.952 +
  10.953 +\vspace{0.3cm}
  10.954 +
  10.955 + \noindent {\bf Return Type:} 
  10.956 +{\tt 
  10.957 +int
  10.958 +}
  10.959 +
  10.960 +
  10.961 +value of the field
  10.962 +\vspace{0.3cm}
  10.963 +\vspace{0.3cm}
  10.964 +\vspace{0.3cm}
  10.965 +\subsubsection{RPC name:~set\_VCPUs\_max}
  10.966 +
  10.967 +{\bf Overview:} 
  10.968 +Set the VCPUs/max field of the given VM.
  10.969 +
  10.970 + \noindent {\bf Signature:} 
  10.971 +\begin{verbatim} void set_VCPUs_max (session_id s, VM ref self, int value)\end{verbatim}
  10.972 +
  10.973 +
  10.974 +\noindent{\bf Arguments:}
  10.975 +
  10.976 + 
  10.977 +\vspace{0.3cm}
  10.978 +\begin{tabular}{|c|c|p{7cm}|}
  10.979 + \hline
  10.980 +{\bf type} & {\bf name} & {\bf description} \\ \hline
  10.981 +{\tt VM ref } & self & reference to the object \\ \hline 
  10.982 +
  10.983 +{\tt int } & value & New value to set \\ \hline 
  10.984 +
  10.985 +\end{tabular}
  10.986 +
  10.987 +\vspace{0.3cm}
  10.988 +
  10.989 + \noindent {\bf Return Type:} 
  10.990 +{\tt 
  10.991 +void
  10.992 +}
  10.993 +
  10.994 +
  10.995 +
  10.996 +\vspace{0.3cm}
  10.997 +\vspace{0.3cm}
  10.998 +\vspace{0.3cm}
  10.999 +\subsubsection{RPC name:~get\_VCPUs\_at\_startup}
 10.1000 +
 10.1001 +{\bf Overview:} 
 10.1002 +Get the VCPUs/at\_startup field of the given VM.
 10.1003 +
 10.1004 + \noindent {\bf Signature:} 
 10.1005 +\begin{verbatim} int get_VCPUs_at_startup (session_id s, VM ref self)\end{verbatim}
 10.1006 +
 10.1007 +
 10.1008 +\noindent{\bf Arguments:}
 10.1009 +
 10.1010 + 
 10.1011 +\vspace{0.3cm}
 10.1012 +\begin{tabular}{|c|c|p{7cm}|}
 10.1013 + \hline
 10.1014 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1015 +{\tt VM ref } & self & reference to the object \\ \hline 
 10.1016 +
 10.1017 +\end{tabular}
 10.1018 +
 10.1019 +\vspace{0.3cm}
 10.1020 +
 10.1021 + \noindent {\bf Return Type:} 
 10.1022 +{\tt 
 10.1023 +int
 10.1024 +}
 10.1025 +
 10.1026 +
 10.1027 +value of the field
 10.1028 +\vspace{0.3cm}
 10.1029 +\vspace{0.3cm}
 10.1030 +\vspace{0.3cm}
 10.1031 +\subsubsection{RPC name:~set\_VCPUs\_at\_startup}
 10.1032 +
 10.1033 +{\bf Overview:} 
 10.1034 +Set the VCPUs/at\_startup field of the given VM.
 10.1035 +
 10.1036 + \noindent {\bf Signature:} 
 10.1037 +\begin{verbatim} void set_VCPUs_at_startup (session_id s, VM ref self, int value)\end{verbatim}
 10.1038 +
 10.1039 +
 10.1040 +\noindent{\bf Arguments:}
 10.1041 +
 10.1042 + 
 10.1043 +\vspace{0.3cm}
 10.1044 +\begin{tabular}{|c|c|p{7cm}|}
 10.1045 + \hline
 10.1046 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1047 +{\tt VM ref } & self & reference to the object \\ \hline 
 10.1048 +
 10.1049 +{\tt int } & value & New value to set \\ \hline 
 10.1050  
 10.1051  \end{tabular}
 10.1052  
 10.1053 @@ -2341,40 +2577,6 @@ value of the field
 10.1054  \vspace{0.3cm}
 10.1055  \vspace{0.3cm}
 10.1056  \vspace{0.3cm}
 10.1057 -\subsubsection{RPC name:~set\_VCPUs\_number}
 10.1058 -
 10.1059 -{\bf Overview:} 
 10.1060 -Set the VCPUs/number field of the given VM.
 10.1061 -
 10.1062 - \noindent {\bf Signature:} 
 10.1063 -\begin{verbatim} void set_VCPUs_number (session_id s, VM ref self, int value)\end{verbatim}
 10.1064 -
 10.1065 -
 10.1066 -\noindent{\bf Arguments:}
 10.1067 -
 10.1068 - 
 10.1069 -\vspace{0.3cm}
 10.1070 -\begin{tabular}{|c|c|p{7cm}|}
 10.1071 - \hline
 10.1072 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1073 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1074 -
 10.1075 -{\tt int } & value & New value to set \\ \hline 
 10.1076 -
 10.1077 -\end{tabular}
 10.1078 -
 10.1079 -\vspace{0.3cm}
 10.1080 -
 10.1081 - \noindent {\bf Return Type:} 
 10.1082 -{\tt 
 10.1083 -void
 10.1084 -}
 10.1085 -
 10.1086 -
 10.1087 -
 10.1088 -\vspace{0.3cm}
 10.1089 -\vspace{0.3cm}
 10.1090 -\vspace{0.3cm}
 10.1091  \subsubsection{RPC name:~get\_VCPUs\_utilisation}
 10.1092  
 10.1093  {\bf Overview:} 
 10.1094 @@ -2407,338 +2609,6 @@ value of the field
 10.1095  \vspace{0.3cm}
 10.1096  \vspace{0.3cm}
 10.1097  \vspace{0.3cm}
 10.1098 -\subsubsection{RPC name:~get\_VCPUs\_features\_required}
 10.1099 -
 10.1100 -{\bf Overview:} 
 10.1101 -Get the VCPUs/features/required field of the given VM.
 10.1102 -
 10.1103 - \noindent {\bf Signature:} 
 10.1104 -\begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_required (session_id s, VM ref self)\end{verbatim}
 10.1105 -
 10.1106 -
 10.1107 -\noindent{\bf Arguments:}
 10.1108 -
 10.1109 - 
 10.1110 -\vspace{0.3cm}
 10.1111 -\begin{tabular}{|c|c|p{7cm}|}
 10.1112 - \hline
 10.1113 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1114 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1115 -
 10.1116 -\end{tabular}
 10.1117 -
 10.1118 -\vspace{0.3cm}
 10.1119 -
 10.1120 - \noindent {\bf Return Type:} 
 10.1121 -{\tt 
 10.1122 -(cpu\_feature) Set
 10.1123 -}
 10.1124 -
 10.1125 -
 10.1126 -value of the field
 10.1127 -\vspace{0.3cm}
 10.1128 -\vspace{0.3cm}
 10.1129 -\vspace{0.3cm}
 10.1130 -\subsubsection{RPC name:~get\_VCPUs\_features\_can\_use}
 10.1131 -
 10.1132 -{\bf Overview:} 
 10.1133 -Get the VCPUs/features/can\_use field of the given VM.
 10.1134 -
 10.1135 - \noindent {\bf Signature:} 
 10.1136 -\begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_can_use (session_id s, VM ref self)\end{verbatim}
 10.1137 -
 10.1138 -
 10.1139 -\noindent{\bf Arguments:}
 10.1140 -
 10.1141 - 
 10.1142 -\vspace{0.3cm}
 10.1143 -\begin{tabular}{|c|c|p{7cm}|}
 10.1144 - \hline
 10.1145 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1146 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1147 -
 10.1148 -\end{tabular}
 10.1149 -
 10.1150 -\vspace{0.3cm}
 10.1151 -
 10.1152 - \noindent {\bf Return Type:} 
 10.1153 -{\tt 
 10.1154 -(cpu\_feature) Set
 10.1155 -}
 10.1156 -
 10.1157 -
 10.1158 -value of the field
 10.1159 -\vspace{0.3cm}
 10.1160 -\vspace{0.3cm}
 10.1161 -\vspace{0.3cm}
 10.1162 -\subsubsection{RPC name:~get\_VCPUs\_features\_force\_on}
 10.1163 -
 10.1164 -{\bf Overview:} 
 10.1165 -Get the VCPUs/features/force\_on field of the given VM.
 10.1166 -
 10.1167 - \noindent {\bf Signature:} 
 10.1168 -\begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_force_on (session_id s, VM ref self)\end{verbatim}
 10.1169 -
 10.1170 -
 10.1171 -\noindent{\bf Arguments:}
 10.1172 -
 10.1173 - 
 10.1174 -\vspace{0.3cm}
 10.1175 -\begin{tabular}{|c|c|p{7cm}|}
 10.1176 - \hline
 10.1177 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1178 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1179 -
 10.1180 -\end{tabular}
 10.1181 -
 10.1182 -\vspace{0.3cm}
 10.1183 -
 10.1184 - \noindent {\bf Return Type:} 
 10.1185 -{\tt 
 10.1186 -(cpu\_feature) Set
 10.1187 -}
 10.1188 -
 10.1189 -
 10.1190 -value of the field
 10.1191 -\vspace{0.3cm}
 10.1192 -\vspace{0.3cm}
 10.1193 -\vspace{0.3cm}
 10.1194 -\subsubsection{RPC name:~set\_VCPUs\_features\_force\_on}
 10.1195 -
 10.1196 -{\bf Overview:} 
 10.1197 -Set the VCPUs/features/force\_on field of the given VM.
 10.1198 -
 10.1199 - \noindent {\bf Signature:} 
 10.1200 -\begin{verbatim} void set_VCPUs_features_force_on (session_id s, VM ref self, (cpu_feature) Set value)\end{verbatim}
 10.1201 -
 10.1202 -
 10.1203 -\noindent{\bf Arguments:}
 10.1204 -
 10.1205 - 
 10.1206 -\vspace{0.3cm}
 10.1207 -\begin{tabular}{|c|c|p{7cm}|}
 10.1208 - \hline
 10.1209 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1210 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1211 -
 10.1212 -{\tt (cpu\_feature) Set } & value & New value to set \\ \hline 
 10.1213 -
 10.1214 -\end{tabular}
 10.1215 -
 10.1216 -\vspace{0.3cm}
 10.1217 -
 10.1218 - \noindent {\bf Return Type:} 
 10.1219 -{\tt 
 10.1220 -void
 10.1221 -}
 10.1222 -
 10.1223 -
 10.1224 -
 10.1225 -\vspace{0.3cm}
 10.1226 -\vspace{0.3cm}
 10.1227 -\vspace{0.3cm}
 10.1228 -\subsubsection{RPC name:~add\_VCPUs\_features\_force\_on}
 10.1229 -
 10.1230 -{\bf Overview:} 
 10.1231 -Add the given value to the VCPUs/features/force\_on field of the given VM.  If the value is already in that Set, then do nothing.
 10.1232 -
 10.1233 - \noindent {\bf Signature:} 
 10.1234 -\begin{verbatim} void add_VCPUs_features_force_on (session_id s, VM ref self, cpu_feature value)\end{verbatim}
 10.1235 -
 10.1236 -
 10.1237 -\noindent{\bf Arguments:}
 10.1238 -
 10.1239 - 
 10.1240 -\vspace{0.3cm}
 10.1241 -\begin{tabular}{|c|c|p{7cm}|}
 10.1242 - \hline
 10.1243 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1244 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1245 -
 10.1246 -{\tt cpu\_feature } & value & New value to add \\ \hline 
 10.1247 -
 10.1248 -\end{tabular}
 10.1249 -
 10.1250 -\vspace{0.3cm}
 10.1251 -
 10.1252 - \noindent {\bf Return Type:} 
 10.1253 -{\tt 
 10.1254 -void
 10.1255 -}
 10.1256 -
 10.1257 -
 10.1258 -
 10.1259 -\vspace{0.3cm}
 10.1260 -\vspace{0.3cm}
 10.1261 -\vspace{0.3cm}
 10.1262 -\subsubsection{RPC name:~remove\_VCPUs\_features\_force\_on}
 10.1263 -
 10.1264 -{\bf Overview:} 
 10.1265 -Remove the given value from the VCPUs/features/force\_on field of the given VM.  If the value is not in that Set, then do nothing.
 10.1266 -
 10.1267 - \noindent {\bf Signature:} 
 10.1268 -\begin{verbatim} void remove_VCPUs_features_force_on (session_id s, VM ref self, cpu_feature value)\end{verbatim}
 10.1269 -
 10.1270 -
 10.1271 -\noindent{\bf Arguments:}
 10.1272 -
 10.1273 - 
 10.1274 -\vspace{0.3cm}
 10.1275 -\begin{tabular}{|c|c|p{7cm}|}
 10.1276 - \hline
 10.1277 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1278 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1279 -
 10.1280 -{\tt cpu\_feature } & value & Value to remove \\ \hline 
 10.1281 -
 10.1282 -\end{tabular}
 10.1283 -
 10.1284 -\vspace{0.3cm}
 10.1285 -
 10.1286 - \noindent {\bf Return Type:} 
 10.1287 -{\tt 
 10.1288 -void
 10.1289 -}
 10.1290 -
 10.1291 -
 10.1292 -
 10.1293 -\vspace{0.3cm}
 10.1294 -\vspace{0.3cm}
 10.1295 -\vspace{0.3cm}
 10.1296 -\subsubsection{RPC name:~get\_VCPUs\_features\_force\_off}
 10.1297 -
 10.1298 -{\bf Overview:} 
 10.1299 -Get the VCPUs/features/force\_off field of the given VM.
 10.1300 -
 10.1301 - \noindent {\bf Signature:} 
 10.1302 -\begin{verbatim} ((cpu_feature) Set) get_VCPUs_features_force_off (session_id s, VM ref self)\end{verbatim}
 10.1303 -
 10.1304 -
 10.1305 -\noindent{\bf Arguments:}
 10.1306 -
 10.1307 - 
 10.1308 -\vspace{0.3cm}
 10.1309 -\begin{tabular}{|c|c|p{7cm}|}
 10.1310 - \hline
 10.1311 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1312 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1313 -
 10.1314 -\end{tabular}
 10.1315 -
 10.1316 -\vspace{0.3cm}
 10.1317 -
 10.1318 - \noindent {\bf Return Type:} 
 10.1319 -{\tt 
 10.1320 -(cpu\_feature) Set
 10.1321 -}
 10.1322 -
 10.1323 -
 10.1324 -value of the field
 10.1325 -\vspace{0.3cm}
 10.1326 -\vspace{0.3cm}
 10.1327 -\vspace{0.3cm}
 10.1328 -\subsubsection{RPC name:~set\_VCPUs\_features\_force\_off}
 10.1329 -
 10.1330 -{\bf Overview:} 
 10.1331 -Set the VCPUs/features/force\_off field of the given VM.
 10.1332 -
 10.1333 - \noindent {\bf Signature:} 
 10.1334 -\begin{verbatim} void set_VCPUs_features_force_off (session_id s, VM ref self, (cpu_feature) Set value)\end{verbatim}
 10.1335 -
 10.1336 -
 10.1337 -\noindent{\bf Arguments:}
 10.1338 -
 10.1339 - 
 10.1340 -\vspace{0.3cm}
 10.1341 -\begin{tabular}{|c|c|p{7cm}|}
 10.1342 - \hline
 10.1343 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1344 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1345 -
 10.1346 -{\tt (cpu\_feature) Set } & value & New value to set \\ \hline 
 10.1347 -
 10.1348 -\end{tabular}
 10.1349 -
 10.1350 -\vspace{0.3cm}
 10.1351 -
 10.1352 - \noindent {\bf Return Type:} 
 10.1353 -{\tt 
 10.1354 -void
 10.1355 -}
 10.1356 -
 10.1357 -
 10.1358 -
 10.1359 -\vspace{0.3cm}
 10.1360 -\vspace{0.3cm}
 10.1361 -\vspace{0.3cm}
 10.1362 -\subsubsection{RPC name:~add\_VCPUs\_features\_force\_off}
 10.1363 -
 10.1364 -{\bf Overview:} 
 10.1365 -Add the given value to the VCPUs/features/force\_off field of the given VM.  If the value is already in that Set, then do nothing.
 10.1366 -
 10.1367 - \noindent {\bf Signature:} 
 10.1368 -\begin{verbatim} void add_VCPUs_features_force_off (session_id s, VM ref self, cpu_feature value)\end{verbatim}
 10.1369 -
 10.1370 -
 10.1371 -\noindent{\bf Arguments:}
 10.1372 -
 10.1373 - 
 10.1374 -\vspace{0.3cm}
 10.1375 -\begin{tabular}{|c|c|p{7cm}|}
 10.1376 - \hline
 10.1377 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1378 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1379 -
 10.1380 -{\tt cpu\_feature } & value & New value to add \\ \hline 
 10.1381 -
 10.1382 -\end{tabular}
 10.1383 -
 10.1384 -\vspace{0.3cm}
 10.1385 -
 10.1386 - \noindent {\bf Return Type:} 
 10.1387 -{\tt 
 10.1388 -void
 10.1389 -}
 10.1390 -
 10.1391 -
 10.1392 -
 10.1393 -\vspace{0.3cm}
 10.1394 -\vspace{0.3cm}
 10.1395 -\vspace{0.3cm}
 10.1396 -\subsubsection{RPC name:~remove\_VCPUs\_features\_force\_off}
 10.1397 -
 10.1398 -{\bf Overview:} 
 10.1399 -Remove the given value from the VCPUs/features/force\_off field of the given VM.  If the value is not in that Set, then do nothing.
 10.1400 -
 10.1401 - \noindent {\bf Signature:} 
 10.1402 -\begin{verbatim} void remove_VCPUs_features_force_off (session_id s, VM ref self, cpu_feature value)\end{verbatim}
 10.1403 -
 10.1404 -
 10.1405 -\noindent{\bf Arguments:}
 10.1406 -
 10.1407 - 
 10.1408 -\vspace{0.3cm}
 10.1409 -\begin{tabular}{|c|c|p{7cm}|}
 10.1410 - \hline
 10.1411 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1412 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1413 -
 10.1414 -{\tt cpu\_feature } & value & Value to remove \\ \hline 
 10.1415 -
 10.1416 -\end{tabular}
 10.1417 -
 10.1418 -\vspace{0.3cm}
 10.1419 -
 10.1420 - \noindent {\bf Return Type:} 
 10.1421 -{\tt 
 10.1422 -void
 10.1423 -}
 10.1424 -
 10.1425 -
 10.1426 -
 10.1427 -\vspace{0.3cm}
 10.1428 -\vspace{0.3cm}
 10.1429 -\vspace{0.3cm}
 10.1430  \subsubsection{RPC name:~get\_actions\_after\_shutdown}
 10.1431  
 10.1432  {\bf Overview:} 
 10.1433 @@ -2871,72 +2741,6 @@ void
 10.1434  \vspace{0.3cm}
 10.1435  \vspace{0.3cm}
 10.1436  \vspace{0.3cm}
 10.1437 -\subsubsection{RPC name:~get\_actions\_after\_suspend}
 10.1438 -
 10.1439 -{\bf Overview:} 
 10.1440 -Get the actions/after\_suspend field of the given VM.
 10.1441 -
 10.1442 - \noindent {\bf Signature:} 
 10.1443 -\begin{verbatim} (on_normal_exit) get_actions_after_suspend (session_id s, VM ref self)\end{verbatim}
 10.1444 -
 10.1445 -
 10.1446 -\noindent{\bf Arguments:}
 10.1447 -
 10.1448 - 
 10.1449 -\vspace{0.3cm}
 10.1450 -\begin{tabular}{|c|c|p{7cm}|}
 10.1451 - \hline
 10.1452 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1453 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1454 -
 10.1455 -\end{tabular}
 10.1456 -
 10.1457 -\vspace{0.3cm}
 10.1458 -
 10.1459 - \noindent {\bf Return Type:} 
 10.1460 -{\tt 
 10.1461 -on\_normal\_exit
 10.1462 -}
 10.1463 -
 10.1464 -
 10.1465 -value of the field
 10.1466 -\vspace{0.3cm}
 10.1467 -\vspace{0.3cm}
 10.1468 -\vspace{0.3cm}
 10.1469 -\subsubsection{RPC name:~set\_actions\_after\_suspend}
 10.1470 -
 10.1471 -{\bf Overview:} 
 10.1472 -Set the actions/after\_suspend field of the given VM.
 10.1473 -
 10.1474 - \noindent {\bf Signature:} 
 10.1475 -\begin{verbatim} void set_actions_after_suspend (session_id s, VM ref self, on_normal_exit value)\end{verbatim}
 10.1476 -
 10.1477 -
 10.1478 -\noindent{\bf Arguments:}
 10.1479 -
 10.1480 - 
 10.1481 -\vspace{0.3cm}
 10.1482 -\begin{tabular}{|c|c|p{7cm}|}
 10.1483 - \hline
 10.1484 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1485 -{\tt VM ref } & self & reference to the object \\ \hline 
 10.1486 -
 10.1487 -{\tt on\_normal\_exit } & value & New value to set \\ \hline 
 10.1488 -
 10.1489 -\end{tabular}
 10.1490 -
 10.1491 -\vspace{0.3cm}
 10.1492 -
 10.1493 - \noindent {\bf Return Type:} 
 10.1494 -{\tt 
 10.1495 -void
 10.1496 -}
 10.1497 -
 10.1498 -
 10.1499 -
 10.1500 -\vspace{0.3cm}
 10.1501 -\vspace{0.3cm}
 10.1502 -\vspace{0.3cm}
 10.1503  \subsubsection{RPC name:~get\_actions\_after\_crash}
 10.1504  
 10.1505  {\bf Overview:} 
 10.1506 @@ -3099,6 +2903,38 @@ value of the field
 10.1507  \vspace{0.3cm}
 10.1508  \vspace{0.3cm}
 10.1509  \vspace{0.3cm}
 10.1510 +\subsubsection{RPC name:~get\_crash\_dumps}
 10.1511 +
 10.1512 +{\bf Overview:} 
 10.1513 +Get the crash\_dumps field of the given VM.
 10.1514 +
 10.1515 + \noindent {\bf Signature:} 
 10.1516 +\begin{verbatim} ((crashdump ref) Set) get_crash_dumps (session_id s, VM ref self)\end{verbatim}
 10.1517 +
 10.1518 +
 10.1519 +\noindent{\bf Arguments:}
 10.1520 +
 10.1521 + 
 10.1522 +\vspace{0.3cm}
 10.1523 +\begin{tabular}{|c|c|p{7cm}|}
 10.1524 + \hline
 10.1525 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1526 +{\tt VM ref } & self & reference to the object \\ \hline 
 10.1527 +
 10.1528 +\end{tabular}
 10.1529 +
 10.1530 +\vspace{0.3cm}
 10.1531 +
 10.1532 + \noindent {\bf Return Type:} 
 10.1533 +{\tt 
 10.1534 +(crashdump ref) Set
 10.1535 +}
 10.1536 +
 10.1537 +
 10.1538 +value of the field
 10.1539 +\vspace{0.3cm}
 10.1540 +\vspace{0.3cm}
 10.1541 +\vspace{0.3cm}
 10.1542  \subsubsection{RPC name:~get\_VTPMs}
 10.1543  
 10.1544  {\bf Overview:} 
 10.1545 @@ -3921,13 +3757,13 @@ value of the field
 10.1546  \vspace{0.3cm}
 10.1547  \vspace{0.3cm}
 10.1548  \vspace{0.3cm}
 10.1549 -\subsubsection{RPC name:~get\_otherConfig}
 10.1550 -
 10.1551 -{\bf Overview:} 
 10.1552 -Get the otherConfig field of the given VM.
 10.1553 -
 10.1554 - \noindent {\bf Signature:} 
 10.1555 -\begin{verbatim} ((string -> string) Map) get_otherConfig (session_id s, VM ref self)\end{verbatim}
 10.1556 +\subsubsection{RPC name:~get\_other\_config}
 10.1557 +
 10.1558 +{\bf Overview:} 
 10.1559 +Get the other\_config field of the given VM.
 10.1560 +
 10.1561 + \noindent {\bf Signature:} 
 10.1562 +\begin{verbatim} ((string -> string) Map) get_other_config (session_id s, VM ref self)\end{verbatim}
 10.1563  
 10.1564  
 10.1565  \noindent{\bf Arguments:}
 10.1566 @@ -3953,13 +3789,13 @@ value of the field
 10.1567  \vspace{0.3cm}
 10.1568  \vspace{0.3cm}
 10.1569  \vspace{0.3cm}
 10.1570 -\subsubsection{RPC name:~set\_otherConfig}
 10.1571 -
 10.1572 -{\bf Overview:} 
 10.1573 -Set the otherConfig field of the given VM.
 10.1574 -
 10.1575 - \noindent {\bf Signature:} 
 10.1576 -\begin{verbatim} void set_otherConfig (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
 10.1577 +\subsubsection{RPC name:~set\_other\_config}
 10.1578 +
 10.1579 +{\bf Overview:} 
 10.1580 +Set the other\_config field of the given VM.
 10.1581 +
 10.1582 + \noindent {\bf Signature:} 
 10.1583 +\begin{verbatim} void set_other_config (session_id s, VM ref self, (string -> string) Map value)\end{verbatim}
 10.1584  
 10.1585  
 10.1586  \noindent{\bf Arguments:}
 10.1587 @@ -3987,13 +3823,13 @@ void
 10.1588  \vspace{0.3cm}
 10.1589  \vspace{0.3cm}
 10.1590  \vspace{0.3cm}
 10.1591 -\subsubsection{RPC name:~add\_to\_otherConfig}
 10.1592 -
 10.1593 -{\bf Overview:} 
 10.1594 -map add message derived from field otherConfig of object VM
 10.1595 -
 10.1596 - \noindent {\bf Signature:} 
 10.1597 -\begin{verbatim} void add_to_otherConfig (session_id s, VM ref self, string key, string value)\end{verbatim}
 10.1598 +\subsubsection{RPC name:~add\_to\_other\_config}
 10.1599 +
 10.1600 +{\bf Overview:} 
 10.1601 +Add the given key-value pair to the other\_config field of the given VM.
 10.1602 +
 10.1603 + \noindent {\bf Signature:} 
 10.1604 +\begin{verbatim} void add_to_other_config (session_id s, VM ref self, string key, string value)\end{verbatim}
 10.1605  
 10.1606  
 10.1607  \noindent{\bf Arguments:}
 10.1608 @@ -4023,13 +3859,14 @@ void
 10.1609  \vspace{0.3cm}
 10.1610  \vspace{0.3cm}
 10.1611  \vspace{0.3cm}
 10.1612 -\subsubsection{RPC name:~remove\_from\_otherConfig}
 10.1613 -
 10.1614 -{\bf Overview:} 
 10.1615 -map remove message derived from field otherConfig of object VM
 10.1616 -
 10.1617 - \noindent {\bf Signature:} 
 10.1618 -\begin{verbatim} void remove_from_otherConfig (session_id s, VM ref self, string key)\end{verbatim}
 10.1619 +\subsubsection{RPC name:~remove\_from\_other\_config}
 10.1620 +
 10.1621 +{\bf Overview:} 
 10.1622 +Remove the given key and its corresponding value from the other\_config
 10.1623 +field of the given VM.  If the key is not in that Map, then do nothing.
 10.1624 +
 10.1625 + \noindent {\bf Signature:} 
 10.1626 +\begin{verbatim} void remove_from_other_config (session_id s, VM ref self, string key)\end{verbatim}
 10.1627  
 10.1628  
 10.1629  \noindent{\bf Arguments:}
 10.1630 @@ -4057,6 +3894,70 @@ void
 10.1631  \vspace{0.3cm}
 10.1632  \vspace{0.3cm}
 10.1633  \vspace{0.3cm}
 10.1634 +\subsubsection{RPC name:~get\_is\_control\_domain}
 10.1635 +
 10.1636 +{\bf Overview:} 
 10.1637 +Get the is\_control\_domain field of the given VM.
 10.1638 +
 10.1639 + \noindent {\bf Signature:} 
 10.1640 +\begin{verbatim} bool get_is_control_domain (session_id s, VM ref self)\end{verbatim}
 10.1641 +
 10.1642 +
 10.1643 +\noindent{\bf Arguments:}
 10.1644 +
 10.1645 + 
 10.1646 +\vspace{0.3cm}
 10.1647 +\begin{tabular}{|c|c|p{7cm}|}
 10.1648 + \hline
 10.1649 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1650 +{\tt VM ref } & self & reference to the object \\ \hline 
 10.1651 +
 10.1652 +\end{tabular}
 10.1653 +
 10.1654 +\vspace{0.3cm}
 10.1655 +
 10.1656 + \noindent {\bf Return Type:} 
 10.1657 +{\tt 
 10.1658 +bool
 10.1659 +}
 10.1660 +
 10.1661 +
 10.1662 +value of the field
 10.1663 +\vspace{0.3cm}
 10.1664 +\vspace{0.3cm}
 10.1665 +\vspace{0.3cm}
 10.1666 +\subsubsection{RPC name:~get\_metrics}
 10.1667 +
 10.1668 +{\bf Overview:} 
 10.1669 +Get the metrics field of the given VM.
 10.1670 +
 10.1671 + \noindent {\bf Signature:} 
 10.1672 +\begin{verbatim} (VM_metrics ref) get_metrics (session_id s, VM ref self)\end{verbatim}
 10.1673 +
 10.1674 +
 10.1675 +\noindent{\bf Arguments:}
 10.1676 +
 10.1677 + 
 10.1678 +\vspace{0.3cm}
 10.1679 +\begin{tabular}{|c|c|p{7cm}|}
 10.1680 + \hline
 10.1681 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1682 +{\tt VM ref } & self & reference to the object \\ \hline 
 10.1683 +
 10.1684 +\end{tabular}
 10.1685 +
 10.1686 +\vspace{0.3cm}
 10.1687 +
 10.1688 + \noindent {\bf Return Type:} 
 10.1689 +{\tt 
 10.1690 +VM\_metrics ref
 10.1691 +}
 10.1692 +
 10.1693 +
 10.1694 +value of the field
 10.1695 +\vspace{0.3cm}
 10.1696 +\vspace{0.3cm}
 10.1697 +\vspace{0.3cm}
 10.1698  \subsubsection{RPC name:~create}
 10.1699  
 10.1700  {\bf Overview:} 
 10.1701 @@ -4092,7 +3993,8 @@ reference to the newly created object
 10.1702  \subsubsection{RPC name:~destroy}
 10.1703  
 10.1704  {\bf Overview:} 
 10.1705 -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.
 10.1706 +Destroy the specified VM.  The VM is completely removed from the system. 
 10.1707 +This function can only be called when the VM is in the Halted State.
 10.1708  
 10.1709   \noindent {\bf Signature:} 
 10.1710  \begin{verbatim} void destroy (session_id s, VM ref self)\end{verbatim}
 10.1711 @@ -4220,12 +4122,258 @@ references to objects with match names
 10.1712  
 10.1713  \vspace{1cm}
 10.1714  \newpage
 10.1715 +\section{Class: VM\_metrics}
 10.1716 +\subsection{Fields for class: VM\_metrics}
 10.1717 +\begin{longtable}{|lllp{0.38\textwidth}|}
 10.1718 +\hline
 10.1719 +\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VM\_metrics} \\
 10.1720 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
 10.1721 +The metrics associated with a VM.}} \\
 10.1722 +\hline
 10.1723 +Quals & Field & Type & Description \\
 10.1724 +\hline
 10.1725 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.1726 +$\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & VM to which these metrics apply \\
 10.1727 +$\mathit{RO}_\mathit{run}$ &  {\tt memory/actual} & int & Guest's actual memory (bytes) \\
 10.1728 +$\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/number} & int & Current number of VCPUs \\
 10.1729 +$\mathit{RO}_\mathit{run}$ &  {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\
 10.1730 +\hline
 10.1731 +\end{longtable}
 10.1732 +\subsection{Additional RPCs associated with class: VM\_metrics}
 10.1733 +\subsubsection{RPC name:~get\_uuid}
 10.1734 +
 10.1735 +{\bf Overview:} 
 10.1736 +Get the uuid field of the given VM\_metrics.
 10.1737 +
 10.1738 + \noindent {\bf Signature:} 
 10.1739 +\begin{verbatim} string get_uuid (session_id s, VM_metrics ref self)\end{verbatim}
 10.1740 +
 10.1741 +
 10.1742 +\noindent{\bf Arguments:}
 10.1743 +
 10.1744 + 
 10.1745 +\vspace{0.3cm}
 10.1746 +\begin{tabular}{|c|c|p{7cm}|}
 10.1747 + \hline
 10.1748 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1749 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1750 +
 10.1751 +\end{tabular}
 10.1752 +
 10.1753 +\vspace{0.3cm}
 10.1754 +
 10.1755 + \noindent {\bf Return Type:} 
 10.1756 +{\tt 
 10.1757 +string
 10.1758 +}
 10.1759 +
 10.1760 +
 10.1761 +value of the field
 10.1762 +\vspace{0.3cm}
 10.1763 +\vspace{0.3cm}
 10.1764 +\vspace{0.3cm}
 10.1765 +\subsubsection{RPC name:~get\_VM}
 10.1766 +
 10.1767 +{\bf Overview:} 
 10.1768 +Get the VM field of the given VM\_metrics.
 10.1769 +
 10.1770 + \noindent {\bf Signature:} 
 10.1771 +\begin{verbatim} (VM ref) get_VM (session_id s, VM_metrics ref self)\end{verbatim}
 10.1772 +
 10.1773 +
 10.1774 +\noindent{\bf Arguments:}
 10.1775 +
 10.1776 + 
 10.1777 +\vspace{0.3cm}
 10.1778 +\begin{tabular}{|c|c|p{7cm}|}
 10.1779 + \hline
 10.1780 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1781 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1782 +
 10.1783 +\end{tabular}
 10.1784 +
 10.1785 +\vspace{0.3cm}
 10.1786 +
 10.1787 + \noindent {\bf Return Type:} 
 10.1788 +{\tt 
 10.1789 +VM ref
 10.1790 +}
 10.1791 +
 10.1792 +
 10.1793 +value of the field
 10.1794 +\vspace{0.3cm}
 10.1795 +\vspace{0.3cm}
 10.1796 +\vspace{0.3cm}
 10.1797 +\subsubsection{RPC name:~get\_memory\_actual}
 10.1798 +
 10.1799 +{\bf Overview:} 
 10.1800 +Get the memory/actual field of the given VM\_metrics.
 10.1801 +
 10.1802 + \noindent {\bf Signature:} 
 10.1803 +\begin{verbatim} int get_memory_actual (session_id s, VM_metrics ref self)\end{verbatim}
 10.1804 +
 10.1805 +
 10.1806 +\noindent{\bf Arguments:}
 10.1807 +
 10.1808 + 
 10.1809 +\vspace{0.3cm}
 10.1810 +\begin{tabular}{|c|c|p{7cm}|}
 10.1811 + \hline
 10.1812 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1813 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1814 +
 10.1815 +\end{tabular}
 10.1816 +
 10.1817 +\vspace{0.3cm}
 10.1818 +
 10.1819 + \noindent {\bf Return Type:} 
 10.1820 +{\tt 
 10.1821 +int
 10.1822 +}
 10.1823 +
 10.1824 +
 10.1825 +value of the field
 10.1826 +\vspace{0.3cm}
 10.1827 +\vspace{0.3cm}
 10.1828 +\vspace{0.3cm}
 10.1829 +\subsubsection{RPC name:~get\_VCPUs\_number}
 10.1830 +
 10.1831 +{\bf Overview:} 
 10.1832 +Get the VCPUs/number field of the given VM\_metrics.
 10.1833 +
 10.1834 + \noindent {\bf Signature:} 
 10.1835 +\begin{verbatim} int get_VCPUs_number (session_id s, VM_metrics ref self)\end{verbatim}
 10.1836 +
 10.1837 +
 10.1838 +\noindent{\bf Arguments:}
 10.1839 +
 10.1840 + 
 10.1841 +\vspace{0.3cm}
 10.1842 +\begin{tabular}{|c|c|p{7cm}|}
 10.1843 + \hline
 10.1844 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1845 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1846 +
 10.1847 +\end{tabular}
 10.1848 +
 10.1849 +\vspace{0.3cm}
 10.1850 +
 10.1851 + \noindent {\bf Return Type:} 
 10.1852 +{\tt 
 10.1853 +int
 10.1854 +}
 10.1855 +
 10.1856 +
 10.1857 +value of the field
 10.1858 +\vspace{0.3cm}
 10.1859 +\vspace{0.3cm}
 10.1860 +\vspace{0.3cm}
 10.1861 +\subsubsection{RPC name:~get\_VCPUs\_utilisation}
 10.1862 +
 10.1863 +{\bf Overview:} 
 10.1864 +Get the VCPUs/utilisation field of the given VM\_metrics.
 10.1865 +
 10.1866 + \noindent {\bf Signature:} 
 10.1867 +\begin{verbatim} ((int -> float) Map) get_VCPUs_utilisation (session_id s, VM_metrics ref self)\end{verbatim}
 10.1868 +
 10.1869 +
 10.1870 +\noindent{\bf Arguments:}
 10.1871 +
 10.1872 + 
 10.1873 +\vspace{0.3cm}
 10.1874 +\begin{tabular}{|c|c|p{7cm}|}
 10.1875 + \hline
 10.1876 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1877 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1878 +
 10.1879 +\end{tabular}
 10.1880 +
 10.1881 +\vspace{0.3cm}
 10.1882 +
 10.1883 + \noindent {\bf Return Type:} 
 10.1884 +{\tt 
 10.1885 +(int $\rightarrow$ float) Map
 10.1886 +}
 10.1887 +
 10.1888 +
 10.1889 +value of the field
 10.1890 +\vspace{0.3cm}
 10.1891 +\vspace{0.3cm}
 10.1892 +\vspace{0.3cm}
 10.1893 +\subsubsection{RPC name:~get\_by\_uuid}
 10.1894 +
 10.1895 +{\bf Overview:} 
 10.1896 +Get a reference to the VM\_metrics instance with the specified UUID.
 10.1897 +
 10.1898 + \noindent {\bf Signature:} 
 10.1899 +\begin{verbatim} (VM_metrics ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.1900 +
 10.1901 +
 10.1902 +\noindent{\bf Arguments:}
 10.1903 +
 10.1904 + 
 10.1905 +\vspace{0.3cm}
 10.1906 +\begin{tabular}{|c|c|p{7cm}|}
 10.1907 + \hline
 10.1908 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1909 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.1910 +
 10.1911 +\end{tabular}
 10.1912 +
 10.1913 +\vspace{0.3cm}
 10.1914 +
 10.1915 + \noindent {\bf Return Type:} 
 10.1916 +{\tt 
 10.1917 +VM\_metrics ref
 10.1918 +}
 10.1919 +
 10.1920 +
 10.1921 +reference to the object
 10.1922 +\vspace{0.3cm}
 10.1923 +\vspace{0.3cm}
 10.1924 +\vspace{0.3cm}
 10.1925 +\subsubsection{RPC name:~get\_record}
 10.1926 +
 10.1927 +{\bf Overview:} 
 10.1928 +Get a record containing the current state of the given VM\_metrics.
 10.1929 +
 10.1930 + \noindent {\bf Signature:} 
 10.1931 +\begin{verbatim} (VM_metrics record) get_record (session_id s, VM_metrics ref self)\end{verbatim}
 10.1932 +
 10.1933 +
 10.1934 +\noindent{\bf Arguments:}
 10.1935 +
 10.1936 + 
 10.1937 +\vspace{0.3cm}
 10.1938 +\begin{tabular}{|c|c|p{7cm}|}
 10.1939 + \hline
 10.1940 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.1941 +{\tt VM\_metrics ref } & self & reference to the object \\ \hline 
 10.1942 +
 10.1943 +\end{tabular}
 10.1944 +
 10.1945 +\vspace{0.3cm}
 10.1946 +
 10.1947 + \noindent {\bf Return Type:} 
 10.1948 +{\tt 
 10.1949 +VM\_metrics record
 10.1950 +}
 10.1951 +
 10.1952 +
 10.1953 +all fields from the object
 10.1954 +\vspace{0.3cm}
 10.1955 +\vspace{0.3cm}
 10.1956 +\vspace{0.3cm}
 10.1957 +
 10.1958 +\vspace{1cm}
 10.1959 +\newpage
 10.1960  \section{Class: host}
 10.1961  \subsection{Fields for class: host}
 10.1962  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.1963  \hline
 10.1964  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf host} \\
 10.1965 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A physical host}} \\
 10.1966 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.1967 +physical host.}} \\
 10.1968  \hline
 10.1969  Quals & Field & Type & Description \\
 10.1970  \hline
 10.1971 @@ -4233,16 +4381,23 @@ Quals & Field & Type & Description \\
 10.1972  $\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
 10.1973  $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
 10.1974  $\mathit{RO}_\mathit{run}$ &  {\tt software\_version} & (string $\rightarrow$ string) Map & version strings \\
 10.1975 +$\mathit{RW}$ &  {\tt other\_config} & (string $\rightarrow$ string) Map & additional configuration \\
 10.1976  $\mathit{RO}_\mathit{run}$ &  {\tt resident\_VMs} & (VM ref) Set & list of VMs currently resident on host \\
 10.1977 +$\mathit{RW}$ &  {\tt logging} & (string $\rightarrow$ string) Map & logging configuration \\
 10.1978  $\mathit{RO}_\mathit{run}$ &  {\tt PIFs} & (PIF ref) Set & physical network interfaces \\
 10.1979 +$\mathit{RW}$ &  {\tt suspend\_image\_sr} & SR ref & The SR in which VDIs for suspend images are created \\
 10.1980 +$\mathit{RW}$ &  {\tt crash\_dump\_sr} & SR ref & The SR in which VDIs for crash dumps are created \\
 10.1981 +$\mathit{RO}_\mathit{run}$ &  {\tt PBDs} & (PBD ref) Set & physical blockdevices \\
 10.1982  $\mathit{RO}_\mathit{run}$ &  {\tt host\_CPUs} & (host\_cpu ref) Set & The physical CPUs on this host \\
 10.1983 +$\mathit{RO}_\mathit{ins}$ &  {\tt metrics} & host\_metrics ref & metrics associated with this host. \\
 10.1984  \hline
 10.1985  \end{longtable}
 10.1986  \subsection{Additional RPCs associated with class: host}
 10.1987  \subsubsection{RPC name:~disable}
 10.1988  
 10.1989  {\bf Overview:} 
 10.1990 -Puts the host into a state in which no new VMs can be started. Currently active VMs on the host continue to execute.
 10.1991 +Puts the host into a state in which no new VMs can be started. Currently
 10.1992 +active VMs on the host continue to execute.
 10.1993  
 10.1994   \noindent {\bf Signature:} 
 10.1995  \begin{verbatim} void disable (session_id s, host ref host)\end{verbatim}
 10.1996 @@ -4306,7 +4461,8 @@ void
 10.1997  \subsubsection{RPC name:~shutdown}
 10.1998  
 10.1999  {\bf Overview:} 
 10.2000 -Shutdown the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.)
 10.2001 +Shutdown the host. (This function can only be called if there are no
 10.2002 +currently running VMs on the host and it is disabled.).
 10.2003  
 10.2004   \noindent {\bf Signature:} 
 10.2005  \begin{verbatim} void shutdown (session_id s, host ref host)\end{verbatim}
 10.2006 @@ -4338,7 +4494,8 @@ void
 10.2007  \subsubsection{RPC name:~reboot}
 10.2008  
 10.2009  {\bf Overview:} 
 10.2010 -Reboot the host. (This function can only be called if there are no currently running VMs on the host and it is disabled.)
 10.2011 +Reboot the host. (This function can only be called if there are no
 10.2012 +currently running VMs on the host and it is disabled.).
 10.2013  
 10.2014   \noindent {\bf Signature:} 
 10.2015  \begin{verbatim} void reboot (session_id s, host ref host)\end{verbatim}
 10.2016 @@ -4584,6 +4741,143 @@ value of the field
 10.2017  \vspace{0.3cm}
 10.2018  \vspace{0.3cm}
 10.2019  \vspace{0.3cm}
 10.2020 +\subsubsection{RPC name:~get\_other\_config}
 10.2021 +
 10.2022 +{\bf Overview:} 
 10.2023 +Get the other\_config field of the given host.
 10.2024 +
 10.2025 + \noindent {\bf Signature:} 
 10.2026 +\begin{verbatim} ((string -> string) Map) get_other_config (session_id s, host ref self)\end{verbatim}
 10.2027 +
 10.2028 +
 10.2029 +\noindent{\bf Arguments:}
 10.2030 +
 10.2031 + 
 10.2032 +\vspace{0.3cm}
 10.2033 +\begin{tabular}{|c|c|p{7cm}|}
 10.2034 + \hline
 10.2035 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2036 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2037 +
 10.2038 +\end{tabular}
 10.2039 +
 10.2040 +\vspace{0.3cm}
 10.2041 +
 10.2042 + \noindent {\bf Return Type:} 
 10.2043 +{\tt 
 10.2044 +(string $\rightarrow$ string) Map
 10.2045 +}
 10.2046 +
 10.2047 +
 10.2048 +value of the field
 10.2049 +\vspace{0.3cm}
 10.2050 +\vspace{0.3cm}
 10.2051 +\vspace{0.3cm}
 10.2052 +\subsubsection{RPC name:~set\_other\_config}
 10.2053 +
 10.2054 +{\bf Overview:} 
 10.2055 +Set the other\_config field of the given host.
 10.2056 +
 10.2057 + \noindent {\bf Signature:} 
 10.2058 +\begin{verbatim} void set_other_config (session_id s, host ref self, (string -> string) Map value)\end{verbatim}
 10.2059 +
 10.2060 +
 10.2061 +\noindent{\bf Arguments:}
 10.2062 +
 10.2063 + 
 10.2064 +\vspace{0.3cm}
 10.2065 +\begin{tabular}{|c|c|p{7cm}|}
 10.2066 + \hline
 10.2067 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2068 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2069 +
 10.2070 +{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline 
 10.2071 +
 10.2072 +\end{tabular}
 10.2073 +
 10.2074 +\vspace{0.3cm}
 10.2075 +
 10.2076 + \noindent {\bf Return Type:} 
 10.2077 +{\tt 
 10.2078 +void
 10.2079 +}
 10.2080 +
 10.2081 +
 10.2082 +
 10.2083 +\vspace{0.3cm}
 10.2084 +\vspace{0.3cm}
 10.2085 +\vspace{0.3cm}
 10.2086 +\subsubsection{RPC name:~add\_to\_other\_config}
 10.2087 +
 10.2088 +{\bf Overview:} 
 10.2089 +Add the given key-value pair to the other\_config field of the given host.
 10.2090 +
 10.2091 + \noindent {\bf Signature:} 
 10.2092 +\begin{verbatim} void add_to_other_config (session_id s, host ref self, string key, string value)\end{verbatim}
 10.2093 +
 10.2094 +
 10.2095 +\noindent{\bf Arguments:}
 10.2096 +
 10.2097 + 
 10.2098 +\vspace{0.3cm}
 10.2099 +\begin{tabular}{|c|c|p{7cm}|}
 10.2100 + \hline
 10.2101 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2102 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2103 +
 10.2104 +{\tt string } & key & Key to add \\ \hline 
 10.2105 +
 10.2106 +{\tt string } & value & Value to add \\ \hline 
 10.2107 +
 10.2108 +\end{tabular}
 10.2109 +
 10.2110 +\vspace{0.3cm}
 10.2111 +
 10.2112 + \noindent {\bf Return Type:} 
 10.2113 +{\tt 
 10.2114 +void
 10.2115 +}
 10.2116 +
 10.2117 +
 10.2118 +
 10.2119 +\vspace{0.3cm}
 10.2120 +\vspace{0.3cm}
 10.2121 +\vspace{0.3cm}
 10.2122 +\subsubsection{RPC name:~remove\_from\_other\_config}
 10.2123 +
 10.2124 +{\bf Overview:} 
 10.2125 +Remove the given key and its corresponding value from the other\_config
 10.2126 +field of the given host.  If the key is not in that Map, then do nothing.
 10.2127 +
 10.2128 + \noindent {\bf Signature:} 
 10.2129 +\begin{verbatim} void remove_from_other_config (session_id s, host ref self, string key)\end{verbatim}
 10.2130 +
 10.2131 +
 10.2132 +\noindent{\bf Arguments:}
 10.2133 +
 10.2134 + 
 10.2135 +\vspace{0.3cm}
 10.2136 +\begin{tabular}{|c|c|p{7cm}|}
 10.2137 + \hline
 10.2138 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2139 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2140 +
 10.2141 +{\tt string } & key & Key to remove \\ \hline 
 10.2142 +
 10.2143 +\end{tabular}
 10.2144 +
 10.2145 +\vspace{0.3cm}
 10.2146 +
 10.2147 + \noindent {\bf Return Type:} 
 10.2148 +{\tt 
 10.2149 +void
 10.2150 +}
 10.2151 +
 10.2152 +
 10.2153 +
 10.2154 +\vspace{0.3cm}
 10.2155 +\vspace{0.3cm}
 10.2156 +\vspace{0.3cm}
 10.2157  \subsubsection{RPC name:~get\_resident\_VMs}
 10.2158  
 10.2159  {\bf Overview:} 
 10.2160 @@ -4616,6 +4910,143 @@ value of the field
 10.2161  \vspace{0.3cm}
 10.2162  \vspace{0.3cm}
 10.2163  \vspace{0.3cm}
 10.2164 +\subsubsection{RPC name:~get\_logging}
 10.2165 +
 10.2166 +{\bf Overview:} 
 10.2167 +Get the logging field of the given host.
 10.2168 +
 10.2169 + \noindent {\bf Signature:} 
 10.2170 +\begin{verbatim} ((string -> string) Map) get_logging (session_id s, host ref self)\end{verbatim}
 10.2171 +
 10.2172 +
 10.2173 +\noindent{\bf Arguments:}
 10.2174 +
 10.2175 + 
 10.2176 +\vspace{0.3cm}
 10.2177 +\begin{tabular}{|c|c|p{7cm}|}
 10.2178 + \hline
 10.2179 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2180 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2181 +
 10.2182 +\end{tabular}
 10.2183 +
 10.2184 +\vspace{0.3cm}
 10.2185 +
 10.2186 + \noindent {\bf Return Type:} 
 10.2187 +{\tt 
 10.2188 +(string $\rightarrow$ string) Map
 10.2189 +}
 10.2190 +
 10.2191 +
 10.2192 +value of the field
 10.2193 +\vspace{0.3cm}
 10.2194 +\vspace{0.3cm}
 10.2195 +\vspace{0.3cm}
 10.2196 +\subsubsection{RPC name:~set\_logging}
 10.2197 +
 10.2198 +{\bf Overview:} 
 10.2199 +Set the logging field of the given host.
 10.2200 +
 10.2201 + \noindent {\bf Signature:} 
 10.2202 +\begin{verbatim} void set_logging (session_id s, host ref self, (string -> string) Map value)\end{verbatim}
 10.2203 +
 10.2204 +
 10.2205 +\noindent{\bf Arguments:}
 10.2206 +
 10.2207 + 
 10.2208 +\vspace{0.3cm}
 10.2209 +\begin{tabular}{|c|c|p{7cm}|}
 10.2210 + \hline
 10.2211 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2212 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2213 +
 10.2214 +{\tt (string $\rightarrow$ string) Map } & value & New value to set \\ \hline 
 10.2215 +
 10.2216 +\end{tabular}
 10.2217 +
 10.2218 +\vspace{0.3cm}
 10.2219 +
 10.2220 + \noindent {\bf Return Type:} 
 10.2221 +{\tt 
 10.2222 +void
 10.2223 +}
 10.2224 +
 10.2225 +
 10.2226 +
 10.2227 +\vspace{0.3cm}
 10.2228 +\vspace{0.3cm}
 10.2229 +\vspace{0.3cm}
 10.2230 +\subsubsection{RPC name:~add\_to\_logging}
 10.2231 +
 10.2232 +{\bf Overview:} 
 10.2233 +Add the given key-value pair to the logging field of the given host.
 10.2234 +
 10.2235 + \noindent {\bf Signature:} 
 10.2236 +\begin{verbatim} void add_to_logging (session_id s, host ref self, string key, string value)\end{verbatim}
 10.2237 +
 10.2238 +
 10.2239 +\noindent{\bf Arguments:}
 10.2240 +
 10.2241 + 
 10.2242 +\vspace{0.3cm}
 10.2243 +\begin{tabular}{|c|c|p{7cm}|}
 10.2244 + \hline
 10.2245 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2246 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2247 +
 10.2248 +{\tt string } & key & Key to add \\ \hline 
 10.2249 +
 10.2250 +{\tt string } & value & Value to add \\ \hline 
 10.2251 +
 10.2252 +\end{tabular}
 10.2253 +
 10.2254 +\vspace{0.3cm}
 10.2255 +
 10.2256 + \noindent {\bf Return Type:} 
 10.2257 +{\tt 
 10.2258 +void
 10.2259 +}
 10.2260 +
 10.2261 +
 10.2262 +
 10.2263 +\vspace{0.3cm}
 10.2264 +\vspace{0.3cm}
 10.2265 +\vspace{0.3cm}
 10.2266 +\subsubsection{RPC name:~remove\_from\_logging}
 10.2267 +
 10.2268 +{\bf Overview:} 
 10.2269 +Remove the given key and its corresponding value from the logging field of
 10.2270 +the given host.  If the key is not in that Map, then do nothing.
 10.2271 +
 10.2272 + \noindent {\bf Signature:} 
 10.2273 +\begin{verbatim} void remove_from_logging (session_id s, host ref self, string key)\end{verbatim}
 10.2274 +
 10.2275 +
 10.2276 +\noindent{\bf Arguments:}
 10.2277 +
 10.2278 + 
 10.2279 +\vspace{0.3cm}
 10.2280 +\begin{tabular}{|c|c|p{7cm}|}
 10.2281 + \hline
 10.2282 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2283 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2284 +
 10.2285 +{\tt string } & key & Key to remove \\ \hline 
 10.2286 +
 10.2287 +\end{tabular}
 10.2288 +
 10.2289 +\vspace{0.3cm}
 10.2290 +
 10.2291 + \noindent {\bf Return Type:} 
 10.2292 +{\tt 
 10.2293 +void
 10.2294 +}
 10.2295 +
 10.2296 +
 10.2297 +
 10.2298 +\vspace{0.3cm}
 10.2299 +\vspace{0.3cm}
 10.2300 +\vspace{0.3cm}
 10.2301  \subsubsection{RPC name:~get\_PIFs}
 10.2302  
 10.2303  {\bf Overview:} 
 10.2304 @@ -4648,6 +5079,170 @@ value of the field
 10.2305  \vspace{0.3cm}
 10.2306  \vspace{0.3cm}
 10.2307  \vspace{0.3cm}
 10.2308 +\subsubsection{RPC name:~get\_suspend\_image\_sr}
 10.2309 +
 10.2310 +{\bf Overview:} 
 10.2311 +Get the suspend\_image\_sr field of the given host.
 10.2312 +
 10.2313 + \noindent {\bf Signature:} 
 10.2314 +\begin{verbatim} (SR ref) get_suspend_image_sr (session_id s, host ref self)\end{verbatim}
 10.2315 +
 10.2316 +
 10.2317 +\noindent{\bf Arguments:}
 10.2318 +
 10.2319 + 
 10.2320 +\vspace{0.3cm}
 10.2321 +\begin{tabular}{|c|c|p{7cm}|}
 10.2322 + \hline
 10.2323 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2324 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2325 +
 10.2326 +\end{tabular}
 10.2327 +
 10.2328 +\vspace{0.3cm}
 10.2329 +
 10.2330 + \noindent {\bf Return Type:} 
 10.2331 +{\tt 
 10.2332 +SR ref
 10.2333 +}
 10.2334 +
 10.2335 +
 10.2336 +value of the field
 10.2337 +\vspace{0.3cm}
 10.2338 +\vspace{0.3cm}
 10.2339 +\vspace{0.3cm}
 10.2340 +\subsubsection{RPC name:~set\_suspend\_image\_sr}
 10.2341 +
 10.2342 +{\bf Overview:} 
 10.2343 +Set the suspend\_image\_sr field of the given host.
 10.2344 +
 10.2345 + \noindent {\bf Signature:} 
 10.2346 +\begin{verbatim} void set_suspend_image_sr (session_id s, host ref self, SR ref value)\end{verbatim}
 10.2347 +
 10.2348 +
 10.2349 +\noindent{\bf Arguments:}
 10.2350 +
 10.2351 + 
 10.2352 +\vspace{0.3cm}
 10.2353 +\begin{tabular}{|c|c|p{7cm}|}
 10.2354 + \hline
 10.2355 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2356 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2357 +
 10.2358 +{\tt SR ref } & value & New value to set \\ \hline 
 10.2359 +
 10.2360 +\end{tabular}
 10.2361 +
 10.2362 +\vspace{0.3cm}
 10.2363 +
 10.2364 + \noindent {\bf Return Type:} 
 10.2365 +{\tt 
 10.2366 +void
 10.2367 +}
 10.2368 +
 10.2369 +
 10.2370 +
 10.2371 +\vspace{0.3cm}
 10.2372 +\vspace{0.3cm}
 10.2373 +\vspace{0.3cm}
 10.2374 +\subsubsection{RPC name:~get\_crash\_dump\_sr}
 10.2375 +
 10.2376 +{\bf Overview:} 
 10.2377 +Get the crash\_dump\_sr field of the given host.
 10.2378 +
 10.2379 + \noindent {\bf Signature:} 
 10.2380 +\begin{verbatim} (SR ref) get_crash_dump_sr (session_id s, host ref self)\end{verbatim}
 10.2381 +
 10.2382 +
 10.2383 +\noindent{\bf Arguments:}
 10.2384 +
 10.2385 + 
 10.2386 +\vspace{0.3cm}
 10.2387 +\begin{tabular}{|c|c|p{7cm}|}
 10.2388 + \hline
 10.2389 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2390 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2391 +
 10.2392 +\end{tabular}
 10.2393 +
 10.2394 +\vspace{0.3cm}
 10.2395 +
 10.2396 + \noindent {\bf Return Type:} 
 10.2397 +{\tt 
 10.2398 +SR ref
 10.2399 +}
 10.2400 +
 10.2401 +
 10.2402 +value of the field
 10.2403 +\vspace{0.3cm}
 10.2404 +\vspace{0.3cm}
 10.2405 +\vspace{0.3cm}
 10.2406 +\subsubsection{RPC name:~set\_crash\_dump\_sr}
 10.2407 +
 10.2408 +{\bf Overview:} 
 10.2409 +Set the crash\_dump\_sr field of the given host.
 10.2410 +
 10.2411 + \noindent {\bf Signature:} 
 10.2412 +\begin{verbatim} void set_crash_dump_sr (session_id s, host ref self, SR ref value)\end{verbatim}
 10.2413 +
 10.2414 +
 10.2415 +\noindent{\bf Arguments:}
 10.2416 +
 10.2417 + 
 10.2418 +\vspace{0.3cm}
 10.2419 +\begin{tabular}{|c|c|p{7cm}|}
 10.2420 + \hline
 10.2421 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2422 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2423 +
 10.2424 +{\tt SR ref } & value & New value to set \\ \hline 
 10.2425 +
 10.2426 +\end{tabular}
 10.2427 +
 10.2428 +\vspace{0.3cm}
 10.2429 +
 10.2430 + \noindent {\bf Return Type:} 
 10.2431 +{\tt 
 10.2432 +void
 10.2433 +}
 10.2434 +
 10.2435 +
 10.2436 +
 10.2437 +\vspace{0.3cm}
 10.2438 +\vspace{0.3cm}
 10.2439 +\vspace{0.3cm}
 10.2440 +\subsubsection{RPC name:~get\_PBDs}
 10.2441 +
 10.2442 +{\bf Overview:} 
 10.2443 +Get the PBDs field of the given host.
 10.2444 +
 10.2445 + \noindent {\bf Signature:} 
 10.2446 +\begin{verbatim} ((PBD ref) Set) get_PBDs (session_id s, host ref self)\end{verbatim}
 10.2447 +
 10.2448 +
 10.2449 +\noindent{\bf Arguments:}
 10.2450 +
 10.2451 + 
 10.2452 +\vspace{0.3cm}
 10.2453 +\begin{tabular}{|c|c|p{7cm}|}
 10.2454 + \hline
 10.2455 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2456 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2457 +
 10.2458 +\end{tabular}
 10.2459 +
 10.2460 +\vspace{0.3cm}
 10.2461 +
 10.2462 + \noindent {\bf Return Type:} 
 10.2463 +{\tt 
 10.2464 +(PBD ref) Set
 10.2465 +}
 10.2466 +
 10.2467 +
 10.2468 +value of the field
 10.2469 +\vspace{0.3cm}
 10.2470 +\vspace{0.3cm}
 10.2471 +\vspace{0.3cm}
 10.2472  \subsubsection{RPC name:~get\_host\_CPUs}
 10.2473  
 10.2474  {\bf Overview:} 
 10.2475 @@ -4680,6 +5275,38 @@ value of the field
 10.2476  \vspace{0.3cm}
 10.2477  \vspace{0.3cm}
 10.2478  \vspace{0.3cm}
 10.2479 +\subsubsection{RPC name:~get\_metrics}
 10.2480 +
 10.2481 +{\bf Overview:} 
 10.2482 +Get the metrics field of the given host.
 10.2483 +
 10.2484 + \noindent {\bf Signature:} 
 10.2485 +\begin{verbatim} (host_metrics ref) get_metrics (session_id s, host ref self)\end{verbatim}
 10.2486 +
 10.2487 +
 10.2488 +\noindent{\bf Arguments:}
 10.2489 +
 10.2490 + 
 10.2491 +\vspace{0.3cm}
 10.2492 +\begin{tabular}{|c|c|p{7cm}|}
 10.2493 + \hline
 10.2494 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2495 +{\tt host ref } & self & reference to the object \\ \hline 
 10.2496 +
 10.2497 +\end{tabular}
 10.2498 +
 10.2499 +\vspace{0.3cm}
 10.2500 +
 10.2501 + \noindent {\bf Return Type:} 
 10.2502 +{\tt 
 10.2503 +host\_metrics ref
 10.2504 +}
 10.2505 +
 10.2506 +
 10.2507 +value of the field
 10.2508 +\vspace{0.3cm}
 10.2509 +\vspace{0.3cm}
 10.2510 +\vspace{0.3cm}
 10.2511  \subsubsection{RPC name:~create}
 10.2512  
 10.2513  {\bf Overview:} 
 10.2514 @@ -4843,6 +5470,218 @@ references to objects with match names
 10.2515  
 10.2516  \vspace{1cm}
 10.2517  \newpage
 10.2518 +\section{Class: host\_metrics}
 10.2519 +\subsection{Fields for class: host\_metrics}
 10.2520 +\begin{longtable}{|lllp{0.38\textwidth}|}
 10.2521 +\hline
 10.2522 +\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf host\_metrics} \\
 10.2523 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
 10.2524 +The metrics associated with a host.}} \\
 10.2525 +\hline
 10.2526 +Quals & Field & Type & Description \\
 10.2527 +\hline
 10.2528 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.2529 +$\mathit{RO}_\mathit{ins}$ &  {\tt host} & host ref & Host to which these metrics apply \\
 10.2530 +$\mathit{RO}_\mathit{run}$ &  {\tt memory/total} & int & Host's total memory (bytes) \\
 10.2531 +$\mathit{RO}_\mathit{run}$ &  {\tt memory/free} & int & Host's free memory (bytes) \\
 10.2532 +\hline
 10.2533 +\end{longtable}
 10.2534 +\subsection{Additional RPCs associated with class: host\_metrics}
 10.2535 +\subsubsection{RPC name:~get\_uuid}
 10.2536 +
 10.2537 +{\bf Overview:} 
 10.2538 +Get the uuid field of the given host\_metrics.
 10.2539 +
 10.2540 + \noindent {\bf Signature:} 
 10.2541 +\begin{verbatim} string get_uuid (session_id s, host_metrics ref self)\end{verbatim}
 10.2542 +
 10.2543 +
 10.2544 +\noindent{\bf Arguments:}
 10.2545 +
 10.2546 + 
 10.2547 +\vspace{0.3cm}
 10.2548 +\begin{tabular}{|c|c|p{7cm}|}
 10.2549 + \hline
 10.2550 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2551 +{\tt host\_metrics ref } & self & reference to the object \\ \hline 
 10.2552 +
 10.2553 +\end{tabular}
 10.2554 +
 10.2555 +\vspace{0.3cm}
 10.2556 +
 10.2557 + \noindent {\bf Return Type:} 
 10.2558 +{\tt 
 10.2559 +string
 10.2560 +}
 10.2561 +
 10.2562 +
 10.2563 +value of the field
 10.2564 +\vspace{0.3cm}
 10.2565 +\vspace{0.3cm}
 10.2566 +\vspace{0.3cm}
 10.2567 +\subsubsection{RPC name:~get\_host}
 10.2568 +
 10.2569 +{\bf Overview:} 
 10.2570 +Get the host field of the given host\_metrics.
 10.2571 +
 10.2572 + \noindent {\bf Signature:} 
 10.2573 +\begin{verbatim} (host ref) get_host (session_id s, host_metrics ref self)\end{verbatim}
 10.2574 +
 10.2575 +
 10.2576 +\noindent{\bf Arguments:}
 10.2577 +
 10.2578 + 
 10.2579 +\vspace{0.3cm}
 10.2580 +\begin{tabular}{|c|c|p{7cm}|}
 10.2581 + \hline
 10.2582 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2583 +{\tt host\_metrics ref } & self & reference to the object \\ \hline 
 10.2584 +
 10.2585 +\end{tabular}
 10.2586 +
 10.2587 +\vspace{0.3cm}
 10.2588 +
 10.2589 + \noindent {\bf Return Type:} 
 10.2590 +{\tt 
 10.2591 +host ref
 10.2592 +}
 10.2593 +
 10.2594 +
 10.2595 +value of the field
 10.2596 +\vspace{0.3cm}
 10.2597 +\vspace{0.3cm}
 10.2598 +\vspace{0.3cm}
 10.2599 +\subsubsection{RPC name:~get\_memory\_total}
 10.2600 +
 10.2601 +{\bf Overview:} 
 10.2602 +Get the memory/total field of the given host\_metrics.
 10.2603 +
 10.2604 + \noindent {\bf Signature:} 
 10.2605 +\begin{verbatim} int get_memory_total (session_id s, host_metrics ref self)\end{verbatim}
 10.2606 +
 10.2607 +
 10.2608 +\noindent{\bf Arguments:}
 10.2609 +
 10.2610 + 
 10.2611 +\vspace{0.3cm}
 10.2612 +\begin{tabular}{|c|c|p{7cm}|}
 10.2613 + \hline
 10.2614 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2615 +{\tt host\_metrics ref } & self & reference to the object \\ \hline 
 10.2616 +
 10.2617 +\end{tabular}
 10.2618 +
 10.2619 +\vspace{0.3cm}
 10.2620 +
 10.2621 + \noindent {\bf Return Type:} 
 10.2622 +{\tt 
 10.2623 +int
 10.2624 +}
 10.2625 +
 10.2626 +
 10.2627 +value of the field
 10.2628 +\vspace{0.3cm}
 10.2629 +\vspace{0.3cm}
 10.2630 +\vspace{0.3cm}
 10.2631 +\subsubsection{RPC name:~get\_memory\_free}
 10.2632 +
 10.2633 +{\bf Overview:} 
 10.2634 +Get the memory/free field of the given host\_metrics.
 10.2635 +
 10.2636 + \noindent {\bf Signature:} 
 10.2637 +\begin{verbatim} int get_memory_free (session_id s, host_metrics ref self)\end{verbatim}
 10.2638 +
 10.2639 +
 10.2640 +\noindent{\bf Arguments:}
 10.2641 +
 10.2642 + 
 10.2643 +\vspace{0.3cm}
 10.2644 +\begin{tabular}{|c|c|p{7cm}|}
 10.2645 + \hline
 10.2646 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2647 +{\tt host\_metrics ref } & self & reference to the object \\ \hline 
 10.2648 +
 10.2649 +\end{tabular}
 10.2650 +
 10.2651 +\vspace{0.3cm}
 10.2652 +
 10.2653 + \noindent {\bf Return Type:} 
 10.2654 +{\tt 
 10.2655 +int
 10.2656 +}
 10.2657 +
 10.2658 +
 10.2659 +value of the field
 10.2660 +\vspace{0.3cm}
 10.2661 +\vspace{0.3cm}
 10.2662 +\vspace{0.3cm}
 10.2663 +\subsubsection{RPC name:~get\_by\_uuid}
 10.2664 +
 10.2665 +{\bf Overview:} 
 10.2666 +Get a reference to the host\_metrics instance with the specified UUID.
 10.2667 +
 10.2668 + \noindent {\bf Signature:} 
 10.2669 +\begin{verbatim} (host_metrics ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.2670 +
 10.2671 +
 10.2672 +\noindent{\bf Arguments:}
 10.2673 +
 10.2674 + 
 10.2675 +\vspace{0.3cm}
 10.2676 +\begin{tabular}{|c|c|p{7cm}|}
 10.2677 + \hline
 10.2678 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2679 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.2680 +
 10.2681 +\end{tabular}
 10.2682 +
 10.2683 +\vspace{0.3cm}
 10.2684 +
 10.2685 + \noindent {\bf Return Type:} 
 10.2686 +{\tt 
 10.2687 +host\_metrics ref
 10.2688 +}
 10.2689 +
 10.2690 +
 10.2691 +reference to the object
 10.2692 +\vspace{0.3cm}
 10.2693 +\vspace{0.3cm}
 10.2694 +\vspace{0.3cm}
 10.2695 +\subsubsection{RPC name:~get\_record}
 10.2696 +
 10.2697 +{\bf Overview:} 
 10.2698 +Get a record containing the current state of the given host\_metrics.
 10.2699 +
 10.2700 + \noindent {\bf Signature:} 
 10.2701 +\begin{verbatim} (host_metrics record) get_record (session_id s, host_metrics ref self)\end{verbatim}
 10.2702 +
 10.2703 +
 10.2704 +\noindent{\bf Arguments:}
 10.2705 +
 10.2706 + 
 10.2707 +\vspace{0.3cm}
 10.2708 +\begin{tabular}{|c|c|p{7cm}|}
 10.2709 + \hline
 10.2710 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2711 +{\tt host\_metrics ref } & self & reference to the object \\ \hline 
 10.2712 +
 10.2713 +\end{tabular}
 10.2714 +
 10.2715 +\vspace{0.3cm}
 10.2716 +
 10.2717 + \noindent {\bf Return Type:} 
 10.2718 +{\tt 
 10.2719 +host\_metrics record
 10.2720 +}
 10.2721 +
 10.2722 +
 10.2723 +all fields from the object
 10.2724 +\vspace{0.3cm}
 10.2725 +\vspace{0.3cm}
 10.2726 +\vspace{0.3cm}
 10.2727 +
 10.2728 +\vspace{1cm}
 10.2729 +\newpage
 10.2730  \section{Class: host\_cpu}
 10.2731  \subsection{Fields for class: host\_cpu}
 10.2732  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.2733 @@ -4858,7 +5697,6 @@ Quals & Field & Type & Description \\
 10.2734  $\mathit{RO}_\mathit{ins}$ &  {\tt vendor} & string & the vendor of the physical CPU \\
 10.2735  $\mathit{RO}_\mathit{ins}$ &  {\tt speed} & int & the speed of the physical CPU \\
 10.2736  $\mathit{RO}_\mathit{ins}$ &  {\tt modelname} & string & the model name of the physical CPU \\
 10.2737 -$\mathit{RO}_\mathit{ins}$ &  {\tt features} & (cpu\_feature) Set & the features supported by the CPU \\
 10.2738  $\mathit{RO}_\mathit{run}$ &  {\tt utilisation} & float & the current CPU utilisation \\
 10.2739  \hline
 10.2740  \end{longtable}
 10.2741 @@ -5055,38 +5893,6 @@ value of the field
 10.2742  \vspace{0.3cm}
 10.2743  \vspace{0.3cm}
 10.2744  \vspace{0.3cm}
 10.2745 -\subsubsection{RPC name:~get\_features}
 10.2746 -
 10.2747 -{\bf Overview:} 
 10.2748 -Get the features field of the given host\_cpu.
 10.2749 -
 10.2750 - \noindent {\bf Signature:} 
 10.2751 -\begin{verbatim} ((cpu_feature) Set) get_features (session_id s, host_cpu ref self)\end{verbatim}
 10.2752 -
 10.2753 -
 10.2754 -\noindent{\bf Arguments:}
 10.2755 -
 10.2756 - 
 10.2757 -\vspace{0.3cm}
 10.2758 -\begin{tabular}{|c|c|p{7cm}|}
 10.2759 - \hline
 10.2760 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2761 -{\tt host\_cpu ref } & self & reference to the object \\ \hline 
 10.2762 -
 10.2763 -\end{tabular}
 10.2764 -
 10.2765 -\vspace{0.3cm}
 10.2766 -
 10.2767 - \noindent {\bf Return Type:} 
 10.2768 -{\tt 
 10.2769 -(cpu\_feature) Set
 10.2770 -}
 10.2771 -
 10.2772 -
 10.2773 -value of the field
 10.2774 -\vspace{0.3cm}
 10.2775 -\vspace{0.3cm}
 10.2776 -\vspace{0.3cm}
 10.2777  \subsubsection{RPC name:~get\_utilisation}
 10.2778  
 10.2779  {\bf Overview:} 
 10.2780 @@ -5255,7 +6061,8 @@ all fields from the object
 10.2781  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.2782  \hline
 10.2783  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf network} \\
 10.2784 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual network}} \\
 10.2785 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.2786 +virtual network.}} \\
 10.2787  \hline
 10.2788  Quals & Field & Type & Description \\
 10.2789  \hline
 10.2790 @@ -5818,16 +6625,15 @@ references to objects with match names
 10.2791  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.2792  \hline
 10.2793  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VIF} \\
 10.2794 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual network interface}} \\
 10.2795 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.2796 +virtual network interface.}} \\
 10.2797  \hline
 10.2798  Quals & Field & Type & Description \\
 10.2799  \hline
 10.2800  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.2801 -$\mathit{RW}$ &  {\tt name} & string & human-readable name of the interface \\
 10.2802 -$\mathit{RW}$ &  {\tt type} & driver\_type & interface type \\
 10.2803  $\mathit{RW}$ &  {\tt device} & string & name of network device as exposed to guest e.g. eth0 \\
 10.2804 -$\mathit{RW}$ &  {\tt network} & network ref & virtual network to which this vif is connected \\
 10.2805 -$\mathit{RW}$ &  {\tt VM} & VM ref & virtual machine to which this vif is connected \\
 10.2806 +$\mathit{RO}_\mathit{ins}$ &  {\tt network} & network ref & virtual network to which this vif is connected \\
 10.2807 +$\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & virtual machine to which this vif is connected \\
 10.2808  $\mathit{RW}$ &  {\tt MAC} & string & ethernet MAC address of virtual interface, as exposed to guest \\
 10.2809  $\mathit{RW}$ &  {\tt MTU} & int & MTU in octets \\
 10.2810  $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 10.2811 @@ -5867,138 +6673,6 @@ value of the field
 10.2812  \vspace{0.3cm}
 10.2813  \vspace{0.3cm}
 10.2814  \vspace{0.3cm}
 10.2815 -\subsubsection{RPC name:~get\_name}
 10.2816 -
 10.2817 -{\bf Overview:} 
 10.2818 -Get the name field of the given VIF.
 10.2819 -
 10.2820 - \noindent {\bf Signature:} 
 10.2821 -\begin{verbatim} string get_name (session_id s, VIF ref self)\end{verbatim}
 10.2822 -
 10.2823 -
 10.2824 -\noindent{\bf Arguments:}
 10.2825 -
 10.2826 - 
 10.2827 -\vspace{0.3cm}
 10.2828 -\begin{tabular}{|c|c|p{7cm}|}
 10.2829 - \hline
 10.2830 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2831 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.2832 -
 10.2833 -\end{tabular}
 10.2834 -
 10.2835 -\vspace{0.3cm}
 10.2836 -
 10.2837 - \noindent {\bf Return Type:} 
 10.2838 -{\tt 
 10.2839 -string
 10.2840 -}
 10.2841 -
 10.2842 -
 10.2843 -value of the field
 10.2844 -\vspace{0.3cm}
 10.2845 -\vspace{0.3cm}
 10.2846 -\vspace{0.3cm}
 10.2847 -\subsubsection{RPC name:~set\_name}
 10.2848 -
 10.2849 -{\bf Overview:} 
 10.2850 -Set the name field of the given VIF.
 10.2851 -
 10.2852 - \noindent {\bf Signature:} 
 10.2853 -\begin{verbatim} void set_name (session_id s, VIF ref self, string value)\end{verbatim}
 10.2854 -
 10.2855 -
 10.2856 -\noindent{\bf Arguments:}
 10.2857 -
 10.2858 - 
 10.2859 -\vspace{0.3cm}
 10.2860 -\begin{tabular}{|c|c|p{7cm}|}
 10.2861 - \hline
 10.2862 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2863 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.2864 -
 10.2865 -{\tt string } & value & New value to set \\ \hline 
 10.2866 -
 10.2867 -\end{tabular}
 10.2868 -
 10.2869 -\vspace{0.3cm}
 10.2870 -
 10.2871 - \noindent {\bf Return Type:} 
 10.2872 -{\tt 
 10.2873 -void
 10.2874 -}
 10.2875 -
 10.2876 -
 10.2877 -
 10.2878 -\vspace{0.3cm}
 10.2879 -\vspace{0.3cm}
 10.2880 -\vspace{0.3cm}
 10.2881 -\subsubsection{RPC name:~get\_type}
 10.2882 -
 10.2883 -{\bf Overview:} 
 10.2884 -Get the type field of the given VIF.
 10.2885 -
 10.2886 - \noindent {\bf Signature:} 
 10.2887 -\begin{verbatim} (driver_type) get_type (session_id s, VIF ref self)\end{verbatim}
 10.2888 -
 10.2889 -
 10.2890 -\noindent{\bf Arguments:}
 10.2891 -
 10.2892 - 
 10.2893 -\vspace{0.3cm}
 10.2894 -\begin{tabular}{|c|c|p{7cm}|}
 10.2895 - \hline
 10.2896 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2897 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.2898 -
 10.2899 -\end{tabular}
 10.2900 -
 10.2901 -\vspace{0.3cm}
 10.2902 -
 10.2903 - \noindent {\bf Return Type:} 
 10.2904 -{\tt 
 10.2905 -driver\_type
 10.2906 -}
 10.2907 -
 10.2908 -
 10.2909 -value of the field
 10.2910 -\vspace{0.3cm}
 10.2911 -\vspace{0.3cm}
 10.2912 -\vspace{0.3cm}
 10.2913 -\subsubsection{RPC name:~set\_type}
 10.2914 -
 10.2915 -{\bf Overview:} 
 10.2916 -Set the type field of the given VIF.
 10.2917 -
 10.2918 - \noindent {\bf Signature:} 
 10.2919 -\begin{verbatim} void set_type (session_id s, VIF ref self, driver_type value)\end{verbatim}
 10.2920 -
 10.2921 -
 10.2922 -\noindent{\bf Arguments:}
 10.2923 -
 10.2924 - 
 10.2925 -\vspace{0.3cm}
 10.2926 -\begin{tabular}{|c|c|p{7cm}|}
 10.2927 - \hline
 10.2928 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2929 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.2930 -
 10.2931 -{\tt driver\_type } & value & New value to set \\ \hline 
 10.2932 -
 10.2933 -\end{tabular}
 10.2934 -
 10.2935 -\vspace{0.3cm}
 10.2936 -
 10.2937 - \noindent {\bf Return Type:} 
 10.2938 -{\tt 
 10.2939 -void
 10.2940 -}
 10.2941 -
 10.2942 -
 10.2943 -
 10.2944 -\vspace{0.3cm}
 10.2945 -\vspace{0.3cm}
 10.2946 -\vspace{0.3cm}
 10.2947  \subsubsection{RPC name:~get\_device}
 10.2948  
 10.2949  {\bf Overview:} 
 10.2950 @@ -6097,40 +6771,6 @@ value of the field
 10.2951  \vspace{0.3cm}
 10.2952  \vspace{0.3cm}
 10.2953  \vspace{0.3cm}
 10.2954 -\subsubsection{RPC name:~set\_network}
 10.2955 -
 10.2956 -{\bf Overview:} 
 10.2957 -Set the network field of the given VIF.
 10.2958 -
 10.2959 - \noindent {\bf Signature:} 
 10.2960 -\begin{verbatim} void set_network (session_id s, VIF ref self, network ref value)\end{verbatim}
 10.2961 -
 10.2962 -
 10.2963 -\noindent{\bf Arguments:}
 10.2964 -
 10.2965 - 
 10.2966 -\vspace{0.3cm}
 10.2967 -\begin{tabular}{|c|c|p{7cm}|}
 10.2968 - \hline
 10.2969 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.2970 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.2971 -
 10.2972 -{\tt network ref } & value & New value to set \\ \hline 
 10.2973 -
 10.2974 -\end{tabular}
 10.2975 -
 10.2976 -\vspace{0.3cm}
 10.2977 -
 10.2978 - \noindent {\bf Return Type:} 
 10.2979 -{\tt 
 10.2980 -void
 10.2981 -}
 10.2982 -
 10.2983 -
 10.2984 -
 10.2985 -\vspace{0.3cm}
 10.2986 -\vspace{0.3cm}
 10.2987 -\vspace{0.3cm}
 10.2988  \subsubsection{RPC name:~get\_VM}
 10.2989  
 10.2990  {\bf Overview:} 
 10.2991 @@ -6163,40 +6803,6 @@ value of the field
 10.2992  \vspace{0.3cm}
 10.2993  \vspace{0.3cm}
 10.2994  \vspace{0.3cm}
 10.2995 -\subsubsection{RPC name:~set\_VM}
 10.2996 -
 10.2997 -{\bf Overview:} 
 10.2998 -Set the VM field of the given VIF.
 10.2999 -
 10.3000 - \noindent {\bf Signature:} 
 10.3001 -\begin{verbatim} void set_VM (session_id s, VIF ref self, VM ref value)\end{verbatim}
 10.3002 -
 10.3003 -
 10.3004 -\noindent{\bf Arguments:}
 10.3005 -
 10.3006 - 
 10.3007 -\vspace{0.3cm}
 10.3008 -\begin{tabular}{|c|c|p{7cm}|}
 10.3009 - \hline
 10.3010 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3011 -{\tt VIF ref } & self & reference to the object \\ \hline 
 10.3012 -
 10.3013 -{\tt VM ref } & value & New value to set \\ \hline 
 10.3014 -
 10.3015 -\end{tabular}
 10.3016 -
 10.3017 -\vspace{0.3cm}
 10.3018 -
 10.3019 - \noindent {\bf Return Type:} 
 10.3020 -{\tt 
 10.3021 -void
 10.3022 -}
 10.3023 -
 10.3024 -
 10.3025 -
 10.3026 -\vspace{0.3cm}
 10.3027 -\vspace{0.3cm}
 10.3028 -\vspace{0.3cm}
 10.3029  \subsubsection{RPC name:~get\_MAC}
 10.3030  
 10.3031  {\bf Overview:} 
 10.3032 @@ -6529,22 +7135,98 @@ all fields from the object
 10.3033  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.3034  \hline
 10.3035  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf PIF} \\
 10.3036 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A physical network interface (note separate VLANs are represented as several PIFs)}} \\
 10.3037 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.3038 +physical network interface (note separate VLANs are represented as several
 10.3039 +PIFs).}} \\
 10.3040  \hline
 10.3041  Quals & Field & Type & Description \\
 10.3042  \hline
 10.3043  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.3044 -$\mathit{RW}$ &  {\tt name} & string & human-readable name of the interface \\
 10.3045 -$\mathit{RW}$ &  {\tt network} & network ref & virtual network to which this pif is connected \\
 10.3046 -$\mathit{RW}$ &  {\tt host} & host ref & physical machine to which this pif is connected \\
 10.3047 +$\mathit{RW}$ &  {\tt device} & string & machine-readable name of the interface (e.g. eth0) \\
 10.3048 +$\mathit{RO}_\mathit{ins}$ &  {\tt network} & network ref & virtual network to which this pif is connected \\
 10.3049 +$\mathit{RO}_\mathit{ins}$ &  {\tt host} & host ref & physical machine to which this pif is connected \\
 10.3050  $\mathit{RW}$ &  {\tt MAC} & string & ethernet MAC address of physical interface \\
 10.3051  $\mathit{RW}$ &  {\tt MTU} & int & MTU in octets \\
 10.3052 -$\mathit{RW}$ &  {\tt VLAN} & string & VLAN tag for all traffic passing through this interface \\
 10.3053 -$\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 10.3054 -$\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
 10.3055 +$\mathit{RW}$ &  {\tt VLAN} & int & VLAN tag for all traffic passing through this interface \\
 10.3056 +$\mathit{RO}_\mathit{ins}$ &  {\tt metrics} & PIF\_metrics ref & metrics associated with this PIF. \\
 10.3057  \hline
 10.3058  \end{longtable}
 10.3059  \subsection{Additional RPCs associated with class: PIF}
 10.3060 +\subsubsection{RPC name:~create\_VLAN}
 10.3061 +
 10.3062 +{\bf Overview:} 
 10.3063 +Create a VLAN interface from an existing physical interface.
 10.3064 +
 10.3065 + \noindent {\bf Signature:} 
 10.3066 +\begin{verbatim} (PIF ref) create_VLAN (session_id s, string device, network ref network, host ref host, int VLAN)\end{verbatim}
 10.3067 +
 10.3068 +
 10.3069 +\noindent{\bf Arguments:}
 10.3070 +
 10.3071 + 
 10.3072 +\vspace{0.3cm}
 10.3073 +\begin{tabular}{|c|c|p{7cm}|}
 10.3074 + \hline
 10.3075 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3076 +{\tt string } & device & physical interface on which to crate the VLAN interface \\ \hline 
 10.3077 +
 10.3078 +{\tt network ref } & network & network to which this interface should be connected \\ \hline 
 10.3079 +
 10.3080 +{\tt host ref } & host & physical machine to which this PIF is connected \\ \hline 
 10.3081 +
 10.3082 +{\tt int } & VLAN & VLAN tag for the new interface \\ \hline 
 10.3083 +
 10.3084 +\end{tabular}
 10.3085 +
 10.3086 +\vspace{0.3cm}
 10.3087 +
 10.3088 + \noindent {\bf Return Type:} 
 10.3089 +{\tt 
 10.3090 +PIF ref
 10.3091 +}
 10.3092 +
 10.3093 +
 10.3094 +The reference of the created PIF object
 10.3095 +\vspace{0.3cm}
 10.3096 +
 10.3097 +\noindent{\bf Possible Error Codes:} {\tt VLAN\_TAG\_INVALID}
 10.3098 +
 10.3099 +\vspace{0.6cm}
 10.3100 +\subsubsection{RPC name:~destroy}
 10.3101 +
 10.3102 +{\bf Overview:} 
 10.3103 +Destroy the interface (provided it is a synthetic interface like a VLAN;
 10.3104 +fail if it is a physical interface).
 10.3105 +
 10.3106 + \noindent {\bf Signature:} 
 10.3107 +\begin{verbatim} void destroy (session_id s, PIF ref self)\end{verbatim}
 10.3108 +
 10.3109 +
 10.3110 +\noindent{\bf Arguments:}
 10.3111 +
 10.3112 + 
 10.3113 +\vspace{0.3cm}
 10.3114 +\begin{tabular}{|c|c|p{7cm}|}
 10.3115 + \hline
 10.3116 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3117 +{\tt PIF ref } & self & the PIF object to destroy \\ \hline 
 10.3118 +
 10.3119 +\end{tabular}
 10.3120 +
 10.3121 +\vspace{0.3cm}
 10.3122 +
 10.3123 + \noindent {\bf Return Type:} 
 10.3124 +{\tt 
 10.3125 +void
 10.3126 +}
 10.3127 +
 10.3128 +
 10.3129 +
 10.3130 +\vspace{0.3cm}
 10.3131 +
 10.3132 +\noindent{\bf Possible Error Codes:} {\tt PIF\_IS\_PHYSICAL}
 10.3133 +
 10.3134 +\vspace{0.6cm}
 10.3135  \subsubsection{RPC name:~get\_uuid}
 10.3136  
 10.3137  {\bf Overview:} 
 10.3138 @@ -6577,13 +7259,13 @@ value of the field
 10.3139  \vspace{0.3cm}
 10.3140  \vspace{0.3cm}
 10.3141  \vspace{0.3cm}
 10.3142 -\subsubsection{RPC name:~get\_name}
 10.3143 -
 10.3144 -{\bf Overview:} 
 10.3145 -Get the name field of the given PIF.
 10.3146 -
 10.3147 - \noindent {\bf Signature:} 
 10.3148 -\begin{verbatim} string get_name (session_id s, PIF ref self)\end{verbatim}
 10.3149 +\subsubsection{RPC name:~get\_device}
 10.3150 +
 10.3151 +{\bf Overview:} 
 10.3152 +Get the device field of the given PIF.
 10.3153 +
 10.3154 + \noindent {\bf Signature:} 
 10.3155 +\begin{verbatim} string get_device (session_id s, PIF ref self)\end{verbatim}
 10.3156  
 10.3157  
 10.3158  \noindent{\bf Arguments:}
 10.3159 @@ -6609,13 +7291,13 @@ value of the field
 10.3160  \vspace{0.3cm}
 10.3161  \vspace{0.3cm}
 10.3162  \vspace{0.3cm}
 10.3163 -\subsubsection{RPC name:~set\_name}
 10.3164 -
 10.3165 -{\bf Overview:} 
 10.3166 -Set the name field of the given PIF.
 10.3167 -
 10.3168 - \noindent {\bf Signature:} 
 10.3169 -\begin{verbatim} void set_name (session_id s, PIF ref self, string value)\end{verbatim}
 10.3170 +\subsubsection{RPC name:~set\_device}
 10.3171 +
 10.3172 +{\bf Overview:} 
 10.3173 +Set the device field of the given PIF.
 10.3174 +
 10.3175 + \noindent {\bf Signature:} 
 10.3176 +\begin{verbatim} void set_device (session_id s, PIF ref self, string value)\end{verbatim}
 10.3177  
 10.3178  
 10.3179  \noindent{\bf Arguments:}
 10.3180 @@ -6675,40 +7357,6 @@ value of the field
 10.3181  \vspace{0.3cm}
 10.3182  \vspace{0.3cm}
 10.3183  \vspace{0.3cm}
 10.3184 -\subsubsection{RPC name:~set\_network}
 10.3185 -
 10.3186 -{\bf Overview:} 
 10.3187 -Set the network field of the given PIF.
 10.3188 -
 10.3189 - \noindent {\bf Signature:} 
 10.3190 -\begin{verbatim} void set_network (session_id s, PIF ref self, network ref value)\end{verbatim}
 10.3191 -
 10.3192 -
 10.3193 -\noindent{\bf Arguments:}
 10.3194 -
 10.3195 - 
 10.3196 -\vspace{0.3cm}
 10.3197 -\begin{tabular}{|c|c|p{7cm}|}
 10.3198 - \hline
 10.3199 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3200 -{\tt PIF ref } & self & reference to the object \\ \hline 
 10.3201 -
 10.3202 -{\tt network ref } & value & New value to set \\ \hline 
 10.3203 -
 10.3204 -\end{tabular}
 10.3205 -
 10.3206 -\vspace{0.3cm}
 10.3207 -
 10.3208 - \noindent {\bf Return Type:} 
 10.3209 -{\tt 
 10.3210 -void
 10.3211 -}
 10.3212 -
 10.3213 -
 10.3214 -
 10.3215 -\vspace{0.3cm}
 10.3216 -\vspace{0.3cm}
 10.3217 -\vspace{0.3cm}
 10.3218  \subsubsection{RPC name:~get\_host}
 10.3219  
 10.3220  {\bf Overview:} 
 10.3221 @@ -6741,40 +7389,6 @@ value of the field
 10.3222  \vspace{0.3cm}
 10.3223  \vspace{0.3cm}
 10.3224  \vspace{0.3cm}
 10.3225 -\subsubsection{RPC name:~set\_host}
 10.3226 -
 10.3227 -{\bf Overview:} 
 10.3228 -Set the host field of the given PIF.
 10.3229 -
 10.3230 - \noindent {\bf Signature:} 
 10.3231 -\begin{verbatim} void set_host (session_id s, PIF ref self, host ref value)\end{verbatim}
 10.3232 -
 10.3233 -
 10.3234 -\noindent{\bf Arguments:}
 10.3235 -
 10.3236 - 
 10.3237 -\vspace{0.3cm}
 10.3238 -\begin{tabular}{|c|c|p{7cm}|}
 10.3239 - \hline
 10.3240 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3241 -{\tt PIF ref } & self & reference to the object \\ \hline 
 10.3242 -
 10.3243 -{\tt host ref } & value & New value to set \\ \hline 
 10.3244 -
 10.3245 -\end{tabular}
 10.3246 -
 10.3247 -\vspace{0.3cm}
 10.3248 -
 10.3249 - \noindent {\bf Return Type:} 
 10.3250 -{\tt 
 10.3251 -void
 10.3252 -}
 10.3253 -
 10.3254 -
 10.3255 -
 10.3256 -\vspace{0.3cm}
 10.3257 -\vspace{0.3cm}
 10.3258 -\vspace{0.3cm}
 10.3259  \subsubsection{RPC name:~get\_MAC}
 10.3260  
 10.3261  {\bf Overview:} 
 10.3262 @@ -6913,7 +7527,7 @@ void
 10.3263  Get the VLAN field of the given PIF.
 10.3264  
 10.3265   \noindent {\bf Signature:} 
 10.3266 -\begin{verbatim} string get_VLAN (session_id s, PIF ref self)\end{verbatim}
 10.3267 +\begin{verbatim} int get_VLAN (session_id s, PIF ref self)\end{verbatim}
 10.3268  
 10.3269  
 10.3270  \noindent{\bf Arguments:}
 10.3271 @@ -6931,7 +7545,7 @@ Get the VLAN field of the given PIF.
 10.3272  
 10.3273   \noindent {\bf Return Type:} 
 10.3274  {\tt 
 10.3275 -string
 10.3276 +int
 10.3277  }
 10.3278  
 10.3279  
 10.3280 @@ -6945,41 +7559,7 @@ value of the field
 10.3281  Set the VLAN field of the given PIF.
 10.3282  
 10.3283   \noindent {\bf Signature:} 
 10.3284 -\begin{verbatim} void set_VLAN (session_id s, PIF ref self, string value)\end{verbatim}
 10.3285 -
 10.3286 -
 10.3287 -\noindent{\bf Arguments:}
 10.3288 -
 10.3289 - 
 10.3290 -\vspace{0.3cm}
 10.3291 -\begin{tabular}{|c|c|p{7cm}|}
 10.3292 - \hline
 10.3293 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3294 -{\tt PIF ref } & self & reference to the object \\ \hline 
 10.3295 -
 10.3296 -{\tt string } & value & New value to set \\ \hline 
 10.3297 -
 10.3298 -\end{tabular}
 10.3299 -
 10.3300 -\vspace{0.3cm}
 10.3301 -
 10.3302 - \noindent {\bf Return Type:} 
 10.3303 -{\tt 
 10.3304 -void
 10.3305 -}
 10.3306 -
 10.3307 -
 10.3308 -
 10.3309 -\vspace{0.3cm}
 10.3310 -\vspace{0.3cm}
 10.3311 -\vspace{0.3cm}
 10.3312 -\subsubsection{RPC name:~get\_io\_read\_kbs}
 10.3313 -
 10.3314 -{\bf Overview:} 
 10.3315 -Get the io/read\_kbs field of the given PIF.
 10.3316 -
 10.3317 - \noindent {\bf Signature:} 
 10.3318 -\begin{verbatim} float get_io_read_kbs (session_id s, PIF ref self)\end{verbatim}
 10.3319 +\begin{verbatim} void set_VLAN (session_id s, PIF ref self, int value)\end{verbatim}
 10.3320  
 10.3321  
 10.3322  \noindent{\bf Arguments:}
 10.3323 @@ -6991,27 +7571,29 @@ Get the io/read\_kbs field of the given 
 10.3324  {\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3325  {\tt PIF ref } & self & reference to the object \\ \hline 
 10.3326  
 10.3327 -\end{tabular}
 10.3328 -
 10.3329 -\vspace{0.3cm}
 10.3330 -
 10.3331 - \noindent {\bf Return Type:} 
 10.3332 -{\tt 
 10.3333 -float
 10.3334 -}
 10.3335 -
 10.3336 -
 10.3337 -value of the field
 10.3338 -\vspace{0.3cm}
 10.3339 -\vspace{0.3cm}
 10.3340 -\vspace{0.3cm}
 10.3341 -\subsubsection{RPC name:~get\_io\_write\_kbs}
 10.3342 -
 10.3343 -{\bf Overview:} 
 10.3344 -Get the io/write\_kbs field of the given PIF.
 10.3345 -
 10.3346 - \noindent {\bf Signature:} 
 10.3347 -\begin{verbatim} float get_io_write_kbs (session_id s, PIF ref self)\end{verbatim}
 10.3348 +{\tt int } & value & New value to set \\ \hline 
 10.3349 +
 10.3350 +\end{tabular}
 10.3351 +
 10.3352 +\vspace{0.3cm}
 10.3353 +
 10.3354 + \noindent {\bf Return Type:} 
 10.3355 +{\tt 
 10.3356 +void
 10.3357 +}
 10.3358 +
 10.3359 +
 10.3360 +
 10.3361 +\vspace{0.3cm}
 10.3362 +\vspace{0.3cm}
 10.3363 +\vspace{0.3cm}
 10.3364 +\subsubsection{RPC name:~get\_metrics}
 10.3365 +
 10.3366 +{\bf Overview:} 
 10.3367 +Get the metrics field of the given PIF.
 10.3368 +
 10.3369 + \noindent {\bf Signature:} 
 10.3370 +\begin{verbatim} (PIF_metrics ref) get_metrics (session_id s, PIF ref self)\end{verbatim}
 10.3371  
 10.3372  
 10.3373  \noindent{\bf Arguments:}
 10.3374 @@ -7029,75 +7611,11 @@ Get the io/write\_kbs field of the given
 10.3375  
 10.3376   \noindent {\bf Return Type:} 
 10.3377  {\tt 
 10.3378 -float
 10.3379 -}
 10.3380 -
 10.3381 -
 10.3382 -value of the field
 10.3383 -\vspace{0.3cm}
 10.3384 -\vspace{0.3cm}
 10.3385 -\vspace{0.3cm}
 10.3386 -\subsubsection{RPC name:~create}
 10.3387 -
 10.3388 -{\bf Overview:} 
 10.3389 -Create a new PIF instance, and return its handle.
 10.3390 -
 10.3391 - \noindent {\bf Signature:} 
 10.3392 -\begin{verbatim} (PIF ref) create (session_id s, PIF record args)\end{verbatim}
 10.3393 -
 10.3394 -
 10.3395 -\noindent{\bf Arguments:}
 10.3396 -
 10.3397 - 
 10.3398 -\vspace{0.3cm}
 10.3399 -\begin{tabular}{|c|c|p{7cm}|}
 10.3400 - \hline
 10.3401 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3402 -{\tt PIF record } & args & All constructor arguments \\ \hline 
 10.3403 -
 10.3404 -\end{tabular}
 10.3405 -
 10.3406 -\vspace{0.3cm}
 10.3407 -
 10.3408 - \noindent {\bf Return Type:} 
 10.3409 -{\tt 
 10.3410 -PIF ref
 10.3411 -}
 10.3412 -
 10.3413 -
 10.3414 -reference to the newly created object
 10.3415 -\vspace{0.3cm}
 10.3416 -\vspace{0.3cm}
 10.3417 -\vspace{0.3cm}
 10.3418 -\subsubsection{RPC name:~destroy}
 10.3419 -
 10.3420 -{\bf Overview:} 
 10.3421 -Destroy the specified PIF instance.
 10.3422 -
 10.3423 - \noindent {\bf Signature:} 
 10.3424 -\begin{verbatim} void destroy (session_id s, PIF ref self)\end{verbatim}
 10.3425 -
 10.3426 -
 10.3427 -\noindent{\bf Arguments:}
 10.3428 -
 10.3429 - 
 10.3430 -\vspace{0.3cm}
 10.3431 -\begin{tabular}{|c|c|p{7cm}|}
 10.3432 - \hline
 10.3433 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3434 -{\tt PIF ref } & self & reference to the object \\ \hline 
 10.3435 -
 10.3436 -\end{tabular}
 10.3437 -
 10.3438 -\vspace{0.3cm}
 10.3439 -
 10.3440 - \noindent {\bf Return Type:} 
 10.3441 -{\tt 
 10.3442 -void
 10.3443 -}
 10.3444 -
 10.3445 -
 10.3446 -
 10.3447 +PIF\_metrics ref
 10.3448 +}
 10.3449 +
 10.3450 +
 10.3451 +value of the field
 10.3452  \vspace{0.3cm}
 10.3453  \vspace{0.3cm}
 10.3454  \vspace{0.3cm}
 10.3455 @@ -7168,12 +7686,225 @@ all fields from the object
 10.3456  
 10.3457  \vspace{1cm}
 10.3458  \newpage
 10.3459 +\section{Class: PIF\_metrics}
 10.3460 +\subsection{Fields for class: PIF\_metrics}
 10.3461 +\begin{longtable}{|lllp{0.38\textwidth}|}
 10.3462 +\hline
 10.3463 +\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf PIF\_metrics} \\
 10.3464 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
 10.3465 +The metrics associated with a physical network interface.}} \\
 10.3466 +\hline
 10.3467 +Quals & Field & Type & Description \\
 10.3468 +\hline
 10.3469 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.3470 +$\mathit{RO}_\mathit{ins}$ &  {\tt PIF} & PIF ref & PIF to which these metrics apply \\
 10.3471 +$\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 10.3472 +$\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
 10.3473 +\hline
 10.3474 +\end{longtable}
 10.3475 +\subsection{Additional RPCs associated with class: PIF\_metrics}
 10.3476 +\subsubsection{RPC name:~get\_uuid}
 10.3477 +
 10.3478 +{\bf Overview:} 
 10.3479 +Get the uuid field of the given PIF\_metrics.
 10.3480 +
 10.3481 + \noindent {\bf Signature:} 
 10.3482 +\begin{verbatim} string get_uuid (session_id s, PIF_metrics ref self)\end{verbatim}
 10.3483 +
 10.3484 +
 10.3485 +\noindent{\bf Arguments:}
 10.3486 +
 10.3487 + 
 10.3488 +\vspace{0.3cm}
 10.3489 +\begin{tabular}{|c|c|p{7cm}|}
 10.3490 + \hline
 10.3491 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3492 +{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
 10.3493 +
 10.3494 +\end{tabular}
 10.3495 +
 10.3496 +\vspace{0.3cm}
 10.3497 +
 10.3498 + \noindent {\bf Return Type:} 
 10.3499 +{\tt 
 10.3500 +string
 10.3501 +}
 10.3502 +
 10.3503 +
 10.3504 +value of the field
 10.3505 +\vspace{0.3cm}
 10.3506 +\vspace{0.3cm}
 10.3507 +\vspace{0.3cm}
 10.3508 +\subsubsection{RPC name:~get\_PIF}
 10.3509 +
 10.3510 +{\bf Overview:} 
 10.3511 +Get the PIF field of the given PIF\_metrics.
 10.3512 +
 10.3513 + \noindent {\bf Signature:} 
 10.3514 +\begin{verbatim} (PIF ref) get_PIF (session_id s, PIF_metrics ref self)\end{verbatim}
 10.3515 +
 10.3516 +
 10.3517 +\noindent{\bf Arguments:}
 10.3518 +
 10.3519 + 
 10.3520 +\vspace{0.3cm}
 10.3521 +\begin{tabular}{|c|c|p{7cm}|}
 10.3522 + \hline
 10.3523 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3524 +{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
 10.3525 +
 10.3526 +\end{tabular}
 10.3527 +
 10.3528 +\vspace{0.3cm}
 10.3529 +
 10.3530 + \noindent {\bf Return Type:} 
 10.3531 +{\tt 
 10.3532 +PIF ref
 10.3533 +}
 10.3534 +
 10.3535 +
 10.3536 +value of the field
 10.3537 +\vspace{0.3cm}
 10.3538 +\vspace{0.3cm}
 10.3539 +\vspace{0.3cm}
 10.3540 +\subsubsection{RPC name:~get\_io\_read\_kbs}
 10.3541 +
 10.3542 +{\bf Overview:} 
 10.3543 +Get the io/read\_kbs field of the given PIF\_metrics.
 10.3544 +
 10.3545 + \noindent {\bf Signature:} 
 10.3546 +\begin{verbatim} float get_io_read_kbs (session_id s, PIF_metrics ref self)\end{verbatim}
 10.3547 +
 10.3548 +
 10.3549 +\noindent{\bf Arguments:}
 10.3550 +
 10.3551 + 
 10.3552 +\vspace{0.3cm}
 10.3553 +\begin{tabular}{|c|c|p{7cm}|}
 10.3554 + \hline
 10.3555 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3556 +{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
 10.3557 +
 10.3558 +\end{tabular}
 10.3559 +
 10.3560 +\vspace{0.3cm}
 10.3561 +
 10.3562 + \noindent {\bf Return Type:} 
 10.3563 +{\tt 
 10.3564 +float
 10.3565 +}
 10.3566 +
 10.3567 +
 10.3568 +value of the field
 10.3569 +\vspace{0.3cm}
 10.3570 +\vspace{0.3cm}
 10.3571 +\vspace{0.3cm}
 10.3572 +\subsubsection{RPC name:~get\_io\_write\_kbs}
 10.3573 +
 10.3574 +{\bf Overview:} 
 10.3575 +Get the io/write\_kbs field of the given PIF\_metrics.
 10.3576 +
 10.3577 + \noindent {\bf Signature:} 
 10.3578 +\begin{verbatim} float get_io_write_kbs (session_id s, PIF_metrics ref self)\end{verbatim}
 10.3579 +
 10.3580 +
 10.3581 +\noindent{\bf Arguments:}
 10.3582 +
 10.3583 + 
 10.3584 +\vspace{0.3cm}
 10.3585 +\begin{tabular}{|c|c|p{7cm}|}
 10.3586 + \hline
 10.3587 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3588 +{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
 10.3589 +
 10.3590 +\end{tabular}
 10.3591 +
 10.3592 +\vspace{0.3cm}
 10.3593 +
 10.3594 + \noindent {\bf Return Type:} 
 10.3595 +{\tt 
 10.3596 +float
 10.3597 +}
 10.3598 +
 10.3599 +
 10.3600 +value of the field
 10.3601 +\vspace{0.3cm}
 10.3602 +\vspace{0.3cm}
 10.3603 +\vspace{0.3cm}
 10.3604 +\subsubsection{RPC name:~get\_by\_uuid}
 10.3605 +
 10.3606 +{\bf Overview:} 
 10.3607 +Get a reference to the PIF\_metrics instance with the specified UUID.
 10.3608 +
 10.3609 + \noindent {\bf Signature:} 
 10.3610 +\begin{verbatim} (PIF_metrics ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.3611 +
 10.3612 +
 10.3613 +\noindent{\bf Arguments:}
 10.3614 +
 10.3615 + 
 10.3616 +\vspace{0.3cm}
 10.3617 +\begin{tabular}{|c|c|p{7cm}|}
 10.3618 + \hline
 10.3619 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3620 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.3621 +
 10.3622 +\end{tabular}
 10.3623 +
 10.3624 +\vspace{0.3cm}
 10.3625 +
 10.3626 + \noindent {\bf Return Type:} 
 10.3627 +{\tt 
 10.3628 +PIF\_metrics ref
 10.3629 +}
 10.3630 +
 10.3631 +
 10.3632 +reference to the object
 10.3633 +\vspace{0.3cm}
 10.3634 +\vspace{0.3cm}
 10.3635 +\vspace{0.3cm}
 10.3636 +\subsubsection{RPC name:~get\_record}
 10.3637 +
 10.3638 +{\bf Overview:} 
 10.3639 +Get a record containing the current state of the given PIF\_metrics.
 10.3640 +
 10.3641 + \noindent {\bf Signature:} 
 10.3642 +\begin{verbatim} (PIF_metrics record) get_record (session_id s, PIF_metrics ref self)\end{verbatim}
 10.3643 +
 10.3644 +
 10.3645 +\noindent{\bf Arguments:}
 10.3646 +
 10.3647 + 
 10.3648 +\vspace{0.3cm}
 10.3649 +\begin{tabular}{|c|c|p{7cm}|}
 10.3650 + \hline
 10.3651 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3652 +{\tt PIF\_metrics ref } & self & reference to the object \\ \hline 
 10.3653 +
 10.3654 +\end{tabular}
 10.3655 +
 10.3656 +\vspace{0.3cm}
 10.3657 +
 10.3658 + \noindent {\bf Return Type:} 
 10.3659 +{\tt 
 10.3660 +PIF\_metrics record
 10.3661 +}
 10.3662 +
 10.3663 +
 10.3664 +all fields from the object
 10.3665 +\vspace{0.3cm}
 10.3666 +\vspace{0.3cm}
 10.3667 +\vspace{0.3cm}
 10.3668 +
 10.3669 +\vspace{1cm}
 10.3670 +\newpage
 10.3671  \section{Class: SR}
 10.3672  \subsection{Fields for class: SR}
 10.3673  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.3674  \hline
 10.3675  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf SR} \\
 10.3676 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A storage repository}} \\
 10.3677 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.3678 +storage repository.}} \\
 10.3679  \hline
 10.3680  Quals & Field & Type & Description \\
 10.3681  \hline
 10.3682 @@ -7181,6 +7912,7 @@ Quals & Field & Type & Description \\
 10.3683  $\mathit{RW}$ &  {\tt name/label} & string & a human-readable name \\
 10.3684  $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
 10.3685  $\mathit{RO}_\mathit{run}$ &  {\tt VDIs} & (VDI ref) Set & managed virtual disks \\
 10.3686 +$\mathit{RO}_\mathit{run}$ &  {\tt PBDs} & (PBD ref) Set & physical blockdevices \\
 10.3687  $\mathit{RO}_\mathit{run}$ &  {\tt virtual\_allocation} & int & sum of virtual\_sizes of all VDIs in this storage repository (in bytes) \\
 10.3688  $\mathit{RO}_\mathit{run}$ &  {\tt physical\_utilisation} & int & physical space currently utilised on this storage repository (in bytes). Note that for sparse disk formats, physical\_utilisation may be less than virtual\_allocation \\
 10.3689  $\mathit{RO}_\mathit{ins}$ &  {\tt physical\_size} & int & total physical size of the repository (in bytes) \\
 10.3690 @@ -7443,6 +8175,38 @@ value of the field
 10.3691  \vspace{0.3cm}
 10.3692  \vspace{0.3cm}
 10.3693  \vspace{0.3cm}
 10.3694 +\subsubsection{RPC name:~get\_PBDs}
 10.3695 +
 10.3696 +{\bf Overview:} 
 10.3697 +Get the PBDs field of the given SR.
 10.3698 +
 10.3699 + \noindent {\bf Signature:} 
 10.3700 +\begin{verbatim} ((PBD ref) Set) get_PBDs (session_id s, SR ref self)\end{verbatim}
 10.3701 +
 10.3702 +
 10.3703 +\noindent{\bf Arguments:}
 10.3704 +
 10.3705 + 
 10.3706 +\vspace{0.3cm}
 10.3707 +\begin{tabular}{|c|c|p{7cm}|}
 10.3708 + \hline
 10.3709 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3710 +{\tt SR ref } & self & reference to the object \\ \hline 
 10.3711 +
 10.3712 +\end{tabular}
 10.3713 +
 10.3714 +\vspace{0.3cm}
 10.3715 +
 10.3716 + \noindent {\bf Return Type:} 
 10.3717 +{\tt 
 10.3718 +(PBD ref) Set
 10.3719 +}
 10.3720 +
 10.3721 +
 10.3722 +value of the field
 10.3723 +\vspace{0.3cm}
 10.3724 +\vspace{0.3cm}
 10.3725 +\vspace{0.3cm}
 10.3726  \subsubsection{RPC name:~get\_virtual\_allocation}
 10.3727  
 10.3728  {\bf Overview:} 
 10.3729 @@ -7771,7 +8535,8 @@ references to objects with match names
 10.3730  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.3731  \hline
 10.3732  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VDI} \\
 10.3733 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual disk image}} \\
 10.3734 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.3735 +virtual disk image.}} \\
 10.3736  \hline
 10.3737  Quals & Field & Type & Description \\
 10.3738  \hline
 10.3739 @@ -7780,12 +8545,11 @@ Quals & Field & Type & Description \\
 10.3740  $\mathit{RW}$ &  {\tt name/description} & string & a notes field containg human-readable description \\
 10.3741  $\mathit{RW}$ &  {\tt SR} & SR ref & storage repository in which the VDI resides \\
 10.3742  $\mathit{RO}_\mathit{run}$ &  {\tt VBDs} & (VBD ref) Set & list of vbds that refer to this disk \\
 10.3743 +$\mathit{RO}_\mathit{run}$ &  {\tt crash\_dumps} & (crashdump ref) Set & list of crash dumps that refer to this disk \\
 10.3744  $\mathit{RW}$ &  {\tt virtual\_size} & int & size of disk as presented to the guest (in multiples of sector\_size field) \\
 10.3745  $\mathit{RO}_\mathit{run}$ &  {\tt physical\_utilisation} & int & amount of physical space that the disk image is currently taking up on the storage repository (in bytes) \\
 10.3746  $\mathit{RO}_\mathit{ins}$ &  {\tt sector\_size} & int & sector size of VDI (in bytes) \\
 10.3747  $\mathit{RO}_\mathit{ins}$ &  {\tt type} & vdi\_type & type of the VDI \\
 10.3748 -$\mathit{RO}_\mathit{ins}$ &  {\tt parent} & VDI ref & parent disk (e.g. in the case of copy on write) \\
 10.3749 -$\mathit{RO}_\mathit{run}$ &  {\tt children} & (VDI ref) Set & child disks (e.g. in the case of copy on write) \\
 10.3750  $\mathit{RW}$ &  {\tt sharable} & bool & true if this disk may be shared \\
 10.3751  $\mathit{RW}$ &  {\tt read\_only} & bool & true if this disk may ONLY be mounted read-only \\
 10.3752  \hline
 10.3753 @@ -7794,7 +8558,8 @@ Quals & Field & Type & Description \\
 10.3754  \subsubsection{RPC name:~snapshot}
 10.3755  
 10.3756  {\bf Overview:} 
 10.3757 -Take an exact copy of the VDI; the snapshot lives in the same Storage Repository as its parent.
 10.3758 +Take an exact copy of the VDI; the snapshot lives in the same Storage
 10.3759 +Repository as its parent.
 10.3760  
 10.3761   \noindent {\bf Signature:} 
 10.3762  \begin{verbatim} (VDI ref) snapshot (session_id s, VDI ref vdi)\end{verbatim}
 10.3763 @@ -8119,6 +8884,38 @@ value of the field
 10.3764  \vspace{0.3cm}
 10.3765  \vspace{0.3cm}
 10.3766  \vspace{0.3cm}
 10.3767 +\subsubsection{RPC name:~get\_crash\_dumps}
 10.3768 +
 10.3769 +{\bf Overview:} 
 10.3770 +Get the crash\_dumps field of the given VDI.
 10.3771 +
 10.3772 + \noindent {\bf Signature:} 
 10.3773 +\begin{verbatim} ((crashdump ref) Set) get_crash_dumps (session_id s, VDI ref self)\end{verbatim}
 10.3774 +
 10.3775 +
 10.3776 +\noindent{\bf Arguments:}
 10.3777 +
 10.3778 + 
 10.3779 +\vspace{0.3cm}
 10.3780 +\begin{tabular}{|c|c|p{7cm}|}
 10.3781 + \hline
 10.3782 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3783 +{\tt VDI ref } & self & reference to the object \\ \hline 
 10.3784 +
 10.3785 +\end{tabular}
 10.3786 +
 10.3787 +\vspace{0.3cm}
 10.3788 +
 10.3789 + \noindent {\bf Return Type:} 
 10.3790 +{\tt 
 10.3791 +(crashdump ref) Set
 10.3792 +}
 10.3793 +
 10.3794 +
 10.3795 +value of the field
 10.3796 +\vspace{0.3cm}
 10.3797 +\vspace{0.3cm}
 10.3798 +\vspace{0.3cm}
 10.3799  \subsubsection{RPC name:~get\_virtual\_size}
 10.3800  
 10.3801  {\bf Overview:} 
 10.3802 @@ -8281,70 +9078,6 @@ value of the field
 10.3803  \vspace{0.3cm}
 10.3804  \vspace{0.3cm}
 10.3805  \vspace{0.3cm}
 10.3806 -\subsubsection{RPC name:~get\_parent}
 10.3807 -
 10.3808 -{\bf Overview:} 
 10.3809 -Get the parent field of the given VDI.
 10.3810 -
 10.3811 - \noindent {\bf Signature:} 
 10.3812 -\begin{verbatim} (VDI ref) get_parent (session_id s, VDI ref self)\end{verbatim}
 10.3813 -
 10.3814 -
 10.3815 -\noindent{\bf Arguments:}
 10.3816 -
 10.3817 - 
 10.3818 -\vspace{0.3cm}
 10.3819 -\begin{tabular}{|c|c|p{7cm}|}
 10.3820 - \hline
 10.3821 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3822 -{\tt VDI ref } & self & reference to the object \\ \hline 
 10.3823 -
 10.3824 -\end{tabular}
 10.3825 -
 10.3826 -\vspace{0.3cm}
 10.3827 -
 10.3828 - \noindent {\bf Return Type:} 
 10.3829 -{\tt 
 10.3830 -VDI ref
 10.3831 -}
 10.3832 -
 10.3833 -
 10.3834 -value of the field
 10.3835 -\vspace{0.3cm}
 10.3836 -\vspace{0.3cm}
 10.3837 -\vspace{0.3cm}
 10.3838 -\subsubsection{RPC name:~get\_children}
 10.3839 -
 10.3840 -{\bf Overview:} 
 10.3841 -Get the children field of the given VDI.
 10.3842 -
 10.3843 - \noindent {\bf Signature:} 
 10.3844 -\begin{verbatim} ((VDI ref) Set) get_children (session_id s, VDI ref self)\end{verbatim}
 10.3845 -
 10.3846 -
 10.3847 -\noindent{\bf Arguments:}
 10.3848 -
 10.3849 - 
 10.3850 -\vspace{0.3cm}
 10.3851 -\begin{tabular}{|c|c|p{7cm}|}
 10.3852 - \hline
 10.3853 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3854 -{\tt VDI ref } & self & reference to the object \\ \hline 
 10.3855 -
 10.3856 -\end{tabular}
 10.3857 -
 10.3858 -\vspace{0.3cm}
 10.3859 -
 10.3860 - \noindent {\bf Return Type:} 
 10.3861 -{\tt 
 10.3862 -(VDI ref) Set
 10.3863 -}
 10.3864 -
 10.3865 -
 10.3866 -value of the field
 10.3867 -\vspace{0.3cm}
 10.3868 -\vspace{0.3cm}
 10.3869 -\vspace{0.3cm}
 10.3870  \subsubsection{RPC name:~get\_sharable}
 10.3871  
 10.3872  {\bf Overview:} 
 10.3873 @@ -8645,17 +9378,18 @@ references to objects with match names
 10.3874  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.3875  \hline
 10.3876  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VBD} \\
 10.3877 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual block device}} \\
 10.3878 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.3879 +virtual block device.}} \\
 10.3880  \hline
 10.3881  Quals & Field & Type & Description \\
 10.3882  \hline
 10.3883  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.3884 -$\mathit{RW}$ &  {\tt VM} & VM ref & the virtual machine \\
 10.3885 -$\mathit{RW}$ &  {\tt VDI} & VDI ref & the virtual disk \\
 10.3886 +$\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & the virtual machine \\
 10.3887 +$\mathit{RO}_\mathit{ins}$ &  {\tt VDI} & VDI ref & the virtual disk \\
 10.3888  $\mathit{RW}$ &  {\tt device} & string & device seen by the guest e.g. hda1 \\
 10.3889 -$\mathit{RW}$ &  {\tt mode} & vbd\_mode & the mode the disk should be mounted with \\
 10.3890 +$\mathit{RW}$ &  {\tt bootable} & bool & true if this VBD is bootable \\
 10.3891 +$\mathit{RW}$ &  {\tt mode} & vbd\_mode & the mode the VBD should be mounted with \\
 10.3892  $\mathit{RW}$ &  {\tt type} & vbd\_type & how the VBD will appear to the guest (e.g. disk or CD) \\
 10.3893 -$\mathit{RW}$ &  {\tt driver} & driver\_type & the style of driver \\
 10.3894  $\mathit{RO}_\mathit{run}$ &  {\tt io/read\_kbs} & float & Read bandwidth (KiB/s) \\
 10.3895  $\mathit{RO}_\mathit{run}$ &  {\tt io/write\_kbs} & float & Write bandwidth (KiB/s) \\
 10.3896  \hline
 10.3897 @@ -8664,7 +9398,8 @@ Quals & Field & Type & Description \\
 10.3898  \subsubsection{RPC name:~media\_change}
 10.3899  
 10.3900  {\bf Overview:} 
 10.3901 -Change the media in the device for CDROM-like devices only. For other devices, detach the VBD and attach a new one
 10.3902 +Change the media in the device for CDROM-like devices only. For other
 10.3903 +devices, detach the VBD and attach a new one.
 10.3904  
 10.3905   \noindent {\bf Signature:} 
 10.3906  \begin{verbatim} void media_change (session_id s, VBD ref vbd, VDI ref vdi)\end{verbatim}
 10.3907 @@ -8759,40 +9494,6 @@ value of the field
 10.3908  \vspace{0.3cm}
 10.3909  \vspace{0.3cm}
 10.3910  \vspace{0.3cm}
 10.3911 -\subsubsection{RPC name:~set\_VM}
 10.3912 -
 10.3913 -{\bf Overview:} 
 10.3914 -Set the VM field of the given VBD.
 10.3915 -
 10.3916 - \noindent {\bf Signature:} 
 10.3917 -\begin{verbatim} void set_VM (session_id s, VBD ref self, VM ref value)\end{verbatim}
 10.3918 -
 10.3919 -
 10.3920 -\noindent{\bf Arguments:}
 10.3921 -
 10.3922 - 
 10.3923 -\vspace{0.3cm}
 10.3924 -\begin{tabular}{|c|c|p{7cm}|}
 10.3925 - \hline
 10.3926 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3927 -{\tt VBD ref } & self & reference to the object \\ \hline 
 10.3928 -
 10.3929 -{\tt VM ref } & value & New value to set \\ \hline 
 10.3930 -
 10.3931 -\end{tabular}
 10.3932 -
 10.3933 -\vspace{0.3cm}
 10.3934 -
 10.3935 - \noindent {\bf Return Type:} 
 10.3936 -{\tt 
 10.3937 -void
 10.3938 -}
 10.3939 -
 10.3940 -
 10.3941 -
 10.3942 -\vspace{0.3cm}
 10.3943 -\vspace{0.3cm}
 10.3944 -\vspace{0.3cm}
 10.3945  \subsubsection{RPC name:~get\_VDI}
 10.3946  
 10.3947  {\bf Overview:} 
 10.3948 @@ -8825,40 +9526,6 @@ value of the field
 10.3949  \vspace{0.3cm}
 10.3950  \vspace{0.3cm}
 10.3951  \vspace{0.3cm}
 10.3952 -\subsubsection{RPC name:~set\_VDI}
 10.3953 -
 10.3954 -{\bf Overview:} 
 10.3955 -Set the VDI field of the given VBD.
 10.3956 -
 10.3957 - \noindent {\bf Signature:} 
 10.3958 -\begin{verbatim} void set_VDI (session_id s, VBD ref self, VDI ref value)\end{verbatim}
 10.3959 -
 10.3960 -
 10.3961 -\noindent{\bf Arguments:}
 10.3962 -
 10.3963 - 
 10.3964 -\vspace{0.3cm}
 10.3965 -\begin{tabular}{|c|c|p{7cm}|}
 10.3966 - \hline
 10.3967 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.3968 -{\tt VBD ref } & self & reference to the object \\ \hline 
 10.3969 -
 10.3970 -{\tt VDI ref } & value & New value to set \\ \hline 
 10.3971 -
 10.3972 -\end{tabular}
 10.3973 -
 10.3974 -\vspace{0.3cm}
 10.3975 -
 10.3976 - \noindent {\bf Return Type:} 
 10.3977 -{\tt 
 10.3978 -void
 10.3979 -}
 10.3980 -
 10.3981 -
 10.3982 -
 10.3983 -\vspace{0.3cm}
 10.3984 -\vspace{0.3cm}
 10.3985 -\vspace{0.3cm}
 10.3986  \subsubsection{RPC name:~get\_device}
 10.3987  
 10.3988  {\bf Overview:} 
 10.3989 @@ -8925,6 +9592,72 @@ void
 10.3990  \vspace{0.3cm}
 10.3991  \vspace{0.3cm}
 10.3992  \vspace{0.3cm}
 10.3993 +\subsubsection{RPC name:~get\_bootable}
 10.3994 +
 10.3995 +{\bf Overview:} 
 10.3996 +Get the bootable field of the given VBD.
 10.3997 +
 10.3998 + \noindent {\bf Signature:} 
 10.3999 +\begin{verbatim} bool get_bootable (session_id s, VBD ref self)\end{verbatim}
 10.4000 +
 10.4001 +
 10.4002 +\noindent{\bf Arguments:}
 10.4003 +
 10.4004 + 
 10.4005 +\vspace{0.3cm}
 10.4006 +\begin{tabular}{|c|c|p{7cm}|}
 10.4007 + \hline
 10.4008 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4009 +{\tt VBD ref } & self & reference to the object \\ \hline 
 10.4010 +
 10.4011 +\end{tabular}
 10.4012 +
 10.4013 +\vspace{0.3cm}
 10.4014 +
 10.4015 + \noindent {\bf Return Type:} 
 10.4016 +{\tt 
 10.4017 +bool
 10.4018 +}
 10.4019 +
 10.4020 +
 10.4021 +value of the field
 10.4022 +\vspace{0.3cm}
 10.4023 +\vspace{0.3cm}
 10.4024 +\vspace{0.3cm}
 10.4025 +\subsubsection{RPC name:~set\_bootable}
 10.4026 +
 10.4027 +{\bf Overview:} 
 10.4028 +Set the bootable field of the given VBD.
 10.4029 +
 10.4030 + \noindent {\bf Signature:} 
 10.4031 +\begin{verbatim} void set_bootable (session_id s, VBD ref self, bool value)\end{verbatim}
 10.4032 +
 10.4033 +
 10.4034 +\noindent{\bf Arguments:}
 10.4035 +
 10.4036 + 
 10.4037 +\vspace{0.3cm}
 10.4038 +\begin{tabular}{|c|c|p{7cm}|}
 10.4039 + \hline
 10.4040 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4041 +{\tt VBD ref } & self & reference to the object \\ \hline 
 10.4042 +
 10.4043 +{\tt bool } & value & New value to set \\ \hline 
 10.4044 +
 10.4045 +\end{tabular}
 10.4046 +
 10.4047 +\vspace{0.3cm}
 10.4048 +
 10.4049 + \noindent {\bf Return Type:} 
 10.4050 +{\tt 
 10.4051 +void
 10.4052 +}
 10.4053 +
 10.4054 +
 10.4055 +
 10.4056 +\vspace{0.3cm}
 10.4057 +\vspace{0.3cm}
 10.4058 +\vspace{0.3cm}
 10.4059  \subsubsection{RPC name:~get\_mode}
 10.4060  
 10.4061  {\bf Overview:} 
 10.4062 @@ -9057,72 +9790,6 @@ void
 10.4063  \vspace{0.3cm}
 10.4064  \vspace{0.3cm}
 10.4065  \vspace{0.3cm}
 10.4066 -\subsubsection{RPC name:~get\_driver}
 10.4067 -
 10.4068 -{\bf Overview:} 
 10.4069 -Get the driver field of the given VBD.
 10.4070 -
 10.4071 - \noindent {\bf Signature:} 
 10.4072 -\begin{verbatim} (driver_type) get_driver (session_id s, VBD ref self)\end{verbatim}
 10.4073 -
 10.4074 -
 10.4075 -\noindent{\bf Arguments:}
 10.4076 -
 10.4077 - 
 10.4078 -\vspace{0.3cm}
 10.4079 -\begin{tabular}{|c|c|p{7cm}|}
 10.4080 - \hline
 10.4081 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4082 -{\tt VBD ref } & self & reference to the object \\ \hline 
 10.4083 -
 10.4084 -\end{tabular}
 10.4085 -
 10.4086 -\vspace{0.3cm}
 10.4087 -
 10.4088 - \noindent {\bf Return Type:} 
 10.4089 -{\tt 
 10.4090 -driver\_type
 10.4091 -}
 10.4092 -
 10.4093 -
 10.4094 -value of the field
 10.4095 -\vspace{0.3cm}
 10.4096 -\vspace{0.3cm}
 10.4097 -\vspace{0.3cm}
 10.4098 -\subsubsection{RPC name:~set\_driver}
 10.4099 -
 10.4100 -{\bf Overview:} 
 10.4101 -Set the driver field of the given VBD.
 10.4102 -
 10.4103 - \noindent {\bf Signature:} 
 10.4104 -\begin{verbatim} void set_driver (session_id s, VBD ref self, driver_type value)\end{verbatim}
 10.4105 -
 10.4106 -
 10.4107 -\noindent{\bf Arguments:}
 10.4108 -
 10.4109 - 
 10.4110 -\vspace{0.3cm}
 10.4111 -\begin{tabular}{|c|c|p{7cm}|}
 10.4112 - \hline
 10.4113 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4114 -{\tt VBD ref } & self & reference to the object \\ \hline 
 10.4115 -
 10.4116 -{\tt driver\_type } & value & New value to set \\ \hline 
 10.4117 -
 10.4118 -\end{tabular}
 10.4119 -
 10.4120 -\vspace{0.3cm}
 10.4121 -
 10.4122 - \noindent {\bf Return Type:} 
 10.4123 -{\tt 
 10.4124 -void
 10.4125 -}
 10.4126 -
 10.4127 -
 10.4128 -
 10.4129 -\vspace{0.3cm}
 10.4130 -\vspace{0.3cm}
 10.4131 -\vspace{0.3cm}
 10.4132  \subsubsection{RPC name:~get\_io\_read\_kbs}
 10.4133  
 10.4134  {\bf Overview:} 
 10.4135 @@ -9318,20 +9985,592 @@ all fields from the object
 10.4136  
 10.4137  \vspace{1cm}
 10.4138  \newpage
 10.4139 +\section{Class: PBD}
 10.4140 +\subsection{Fields for class: PBD}
 10.4141 +\begin{longtable}{|lllp{0.38\textwidth}|}
 10.4142 +\hline
 10.4143 +\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf PBD} \\
 10.4144 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em
 10.4145 +The physical block devices through which hosts access SRs.}} \\
 10.4146 +\hline
 10.4147 +Quals & Field & Type & Description \\
 10.4148 +\hline
 10.4149 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.4150 +$\mathit{RO}_\mathit{ins}$ &  {\tt host} & host ref & physical machine on which the pbd is available \\
 10.4151 +$\mathit{RO}_\mathit{ins}$ &  {\tt SR} & SR ref & the storage repository that the pbd realises \\
 10.4152 +$\mathit{RO}_\mathit{ins}$ &  {\tt device\_config} & (string $\rightarrow$ string) Map & a config string that is provided to the host's SR-backend-driver \\
 10.4153 +$\mathit{RO}_\mathit{run}$ &  {\tt currently\_attached} & bool & is the SR currently attached on this host? \\
 10.4154 +\hline
 10.4155 +\end{longtable}
 10.4156 +\subsection{Additional RPCs associated with class: PBD}
 10.4157 +\subsubsection{RPC name:~get\_uuid}
 10.4158 +
 10.4159 +{\bf Overview:} 
 10.4160 +Get the uuid field of the given PBD.
 10.4161 +
 10.4162 + \noindent {\bf Signature:} 
 10.4163 +\begin{verbatim} string get_uuid (session_id s, PBD ref self)\end{verbatim}
 10.4164 +
 10.4165 +
 10.4166 +\noindent{\bf Arguments:}
 10.4167 +
 10.4168 + 
 10.4169 +\vspace{0.3cm}
 10.4170 +\begin{tabular}{|c|c|p{7cm}|}
 10.4171 + \hline
 10.4172 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4173 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4174 +
 10.4175 +\end{tabular}
 10.4176 +
 10.4177 +\vspace{0.3cm}
 10.4178 +
 10.4179 + \noindent {\bf Return Type:} 
 10.4180 +{\tt 
 10.4181 +string
 10.4182 +}
 10.4183 +
 10.4184 +
 10.4185 +value of the field
 10.4186 +\vspace{0.3cm}
 10.4187 +\vspace{0.3cm}
 10.4188 +\vspace{0.3cm}
 10.4189 +\subsubsection{RPC name:~get\_host}
 10.4190 +
 10.4191 +{\bf Overview:} 
 10.4192 +Get the host field of the given PBD.
 10.4193 +
 10.4194 + \noindent {\bf Signature:} 
 10.4195 +\begin{verbatim} (host ref) get_host (session_id s, PBD ref self)\end{verbatim}
 10.4196 +
 10.4197 +
 10.4198 +\noindent{\bf Arguments:}
 10.4199 +
 10.4200 + 
 10.4201 +\vspace{0.3cm}
 10.4202 +\begin{tabular}{|c|c|p{7cm}|}
 10.4203 + \hline
 10.4204 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4205 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4206 +
 10.4207 +\end{tabular}
 10.4208 +
 10.4209 +\vspace{0.3cm}
 10.4210 +
 10.4211 + \noindent {\bf Return Type:} 
 10.4212 +{\tt 
 10.4213 +host ref
 10.4214 +}
 10.4215 +
 10.4216 +
 10.4217 +value of the field
 10.4218 +\vspace{0.3cm}
 10.4219 +\vspace{0.3cm}
 10.4220 +\vspace{0.3cm}
 10.4221 +\subsubsection{RPC name:~get\_SR}
 10.4222 +
 10.4223 +{\bf Overview:} 
 10.4224 +Get the SR field of the given PBD.
 10.4225 +
 10.4226 + \noindent {\bf Signature:} 
 10.4227 +\begin{verbatim} (SR ref) get_SR (session_id s, PBD ref self)\end{verbatim}
 10.4228 +
 10.4229 +
 10.4230 +\noindent{\bf Arguments:}
 10.4231 +
 10.4232 + 
 10.4233 +\vspace{0.3cm}
 10.4234 +\begin{tabular}{|c|c|p{7cm}|}
 10.4235 + \hline
 10.4236 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4237 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4238 +
 10.4239 +\end{tabular}
 10.4240 +
 10.4241 +\vspace{0.3cm}
 10.4242 +
 10.4243 + \noindent {\bf Return Type:} 
 10.4244 +{\tt 
 10.4245 +SR ref
 10.4246 +}
 10.4247 +
 10.4248 +
 10.4249 +value of the field
 10.4250 +\vspace{0.3cm}
 10.4251 +\vspace{0.3cm}
 10.4252 +\vspace{0.3cm}
 10.4253 +\subsubsection{RPC name:~get\_device\_config}
 10.4254 +
 10.4255 +{\bf Overview:} 
 10.4256 +Get the device\_config field of the given PBD.
 10.4257 +
 10.4258 + \noindent {\bf Signature:} 
 10.4259 +\begin{verbatim} ((string -> string) Map) get_device_config (session_id s, PBD ref self)\end{verbatim}
 10.4260 +
 10.4261 +
 10.4262 +\noindent{\bf Arguments:}
 10.4263 +
 10.4264 + 
 10.4265 +\vspace{0.3cm}
 10.4266 +\begin{tabular}{|c|c|p{7cm}|}
 10.4267 + \hline
 10.4268 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4269 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4270 +
 10.4271 +\end{tabular}
 10.4272 +
 10.4273 +\vspace{0.3cm}
 10.4274 +
 10.4275 + \noindent {\bf Return Type:} 
 10.4276 +{\tt 
 10.4277 +(string $\rightarrow$ string) Map
 10.4278 +}
 10.4279 +
 10.4280 +
 10.4281 +value of the field
 10.4282 +\vspace{0.3cm}
 10.4283 +\vspace{0.3cm}
 10.4284 +\vspace{0.3cm}
 10.4285 +\subsubsection{RPC name:~get\_currently\_attached}
 10.4286 +
 10.4287 +{\bf Overview:} 
 10.4288 +Get the currently\_attached field of the given PBD.
 10.4289 +
 10.4290 + \noindent {\bf Signature:} 
 10.4291 +\begin{verbatim} bool get_currently_attached (session_id s, PBD ref self)\end{verbatim}
 10.4292 +
 10.4293 +
 10.4294 +\noindent{\bf Arguments:}
 10.4295 +
 10.4296 + 
 10.4297 +\vspace{0.3cm}
 10.4298 +\begin{tabular}{|c|c|p{7cm}|}
 10.4299 + \hline
 10.4300 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4301 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4302 +
 10.4303 +\end{tabular}
 10.4304 +
 10.4305 +\vspace{0.3cm}
 10.4306 +
 10.4307 + \noindent {\bf Return Type:} 
 10.4308 +{\tt 
 10.4309 +bool
 10.4310 +}
 10.4311 +
 10.4312 +
 10.4313 +value of the field
 10.4314 +\vspace{0.3cm}
 10.4315 +\vspace{0.3cm}
 10.4316 +\vspace{0.3cm}
 10.4317 +\subsubsection{RPC name:~create}
 10.4318 +
 10.4319 +{\bf Overview:} 
 10.4320 +Create a new PBD instance, and return its handle.
 10.4321 +
 10.4322 + \noindent {\bf Signature:} 
 10.4323 +\begin{verbatim} (PBD ref) create (session_id s, PBD record args)\end{verbatim}
 10.4324 +
 10.4325 +
 10.4326 +\noindent{\bf Arguments:}
 10.4327 +
 10.4328 + 
 10.4329 +\vspace{0.3cm}
 10.4330 +\begin{tabular}{|c|c|p{7cm}|}
 10.4331 + \hline
 10.4332 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4333 +{\tt PBD record } & args & All constructor arguments \\ \hline 
 10.4334 +
 10.4335 +\end{tabular}
 10.4336 +
 10.4337 +\vspace{0.3cm}
 10.4338 +
 10.4339 + \noindent {\bf Return Type:} 
 10.4340 +{\tt 
 10.4341 +PBD ref
 10.4342 +}
 10.4343 +
 10.4344 +
 10.4345 +reference to the newly created object
 10.4346 +\vspace{0.3cm}
 10.4347 +\vspace{0.3cm}
 10.4348 +\vspace{0.3cm}
 10.4349 +\subsubsection{RPC name:~destroy}
 10.4350 +
 10.4351 +{\bf Overview:} 
 10.4352 +Destroy the specified PBD instance.
 10.4353 +
 10.4354 + \noindent {\bf Signature:} 
 10.4355 +\begin{verbatim} void destroy (session_id s, PBD ref self)\end{verbatim}
 10.4356 +
 10.4357 +
 10.4358 +\noindent{\bf Arguments:}
 10.4359 +
 10.4360 + 
 10.4361 +\vspace{0.3cm}
 10.4362 +\begin{tabular}{|c|c|p{7cm}|}
 10.4363 + \hline
 10.4364 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4365 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4366 +
 10.4367 +\end{tabular}
 10.4368 +
 10.4369 +\vspace{0.3cm}
 10.4370 +
 10.4371 + \noindent {\bf Return Type:} 
 10.4372 +{\tt 
 10.4373 +void
 10.4374 +}
 10.4375 +
 10.4376 +
 10.4377 +
 10.4378 +\vspace{0.3cm}
 10.4379 +\vspace{0.3cm}
 10.4380 +\vspace{0.3cm}
 10.4381 +\subsubsection{RPC name:~get\_by\_uuid}
 10.4382 +
 10.4383 +{\bf Overview:} 
 10.4384 +Get a reference to the PBD instance with the specified UUID.
 10.4385 +
 10.4386 + \noindent {\bf Signature:} 
 10.4387 +\begin{verbatim} (PBD ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.4388 +
 10.4389 +
 10.4390 +\noindent{\bf Arguments:}
 10.4391 +
 10.4392 + 
 10.4393 +\vspace{0.3cm}
 10.4394 +\begin{tabular}{|c|c|p{7cm}|}
 10.4395 + \hline
 10.4396 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4397 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.4398 +
 10.4399 +\end{tabular}
 10.4400 +
 10.4401 +\vspace{0.3cm}
 10.4402 +
 10.4403 + \noindent {\bf Return Type:} 
 10.4404 +{\tt 
 10.4405 +PBD ref
 10.4406 +}
 10.4407 +
 10.4408 +
 10.4409 +reference to the object
 10.4410 +\vspace{0.3cm}
 10.4411 +\vspace{0.3cm}
 10.4412 +\vspace{0.3cm}
 10.4413 +\subsubsection{RPC name:~get\_record}
 10.4414 +
 10.4415 +{\bf Overview:} 
 10.4416 +Get a record containing the current state of the given PBD.
 10.4417 +
 10.4418 + \noindent {\bf Signature:} 
 10.4419 +\begin{verbatim} (PBD record) get_record (session_id s, PBD ref self)\end{verbatim}
 10.4420 +
 10.4421 +
 10.4422 +\noindent{\bf Arguments:}
 10.4423 +
 10.4424 + 
 10.4425 +\vspace{0.3cm}
 10.4426 +\begin{tabular}{|c|c|p{7cm}|}
 10.4427 + \hline
 10.4428 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4429 +{\tt PBD ref } & self & reference to the object \\ \hline 
 10.4430 +
 10.4431 +\end{tabular}
 10.4432 +
 10.4433 +\vspace{0.3cm}
 10.4434 +
 10.4435 + \noindent {\bf Return Type:} 
 10.4436 +{\tt 
 10.4437 +PBD record
 10.4438 +}
 10.4439 +
 10.4440 +
 10.4441 +all fields from the object
 10.4442 +\vspace{0.3cm}
 10.4443 +\vspace{0.3cm}
 10.4444 +\vspace{0.3cm}
 10.4445 +
 10.4446 +\vspace{1cm}
 10.4447 +\newpage
 10.4448 +\section{Class: crashdump}
 10.4449 +\subsection{Fields for class: crashdump}
 10.4450 +\begin{longtable}{|lllp{0.38\textwidth}|}
 10.4451 +\hline
 10.4452 +\multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf crashdump} \\
 10.4453 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.4454 +VM crashdump.}} \\
 10.4455 +\hline
 10.4456 +Quals & Field & Type & Description \\
 10.4457 +\hline
 10.4458 +$\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.4459 +$\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & the virtual machine \\
 10.4460 +$\mathit{RO}_\mathit{ins}$ &  {\tt VDI} & VDI ref & the virtual disk \\
 10.4461 +\hline
 10.4462 +\end{longtable}
 10.4463 +\subsection{Additional RPCs associated with class: crashdump}
 10.4464 +\subsubsection{RPC name:~get\_all}
 10.4465 +
 10.4466 +{\bf Overview:} 
 10.4467 +Return a list of all the crashdumps known to the system.
 10.4468 +
 10.4469 + \noindent {\bf Signature:} 
 10.4470 +\begin{verbatim} ((crashdump ref) Set) get_all (session_id s)\end{verbatim}
 10.4471 +
 10.4472 +
 10.4473 +\vspace{0.3cm}
 10.4474 +
 10.4475 + \noindent {\bf Return Type:} 
 10.4476 +{\tt 
 10.4477 +(crashdump ref) Set
 10.4478 +}
 10.4479 +
 10.4480 +
 10.4481 +references to all objects
 10.4482 +\vspace{0.3cm}
 10.4483 +\vspace{0.3cm}
 10.4484 +\vspace{0.3cm}
 10.4485 +\subsubsection{RPC name:~get\_uuid}
 10.4486 +
 10.4487 +{\bf Overview:} 
 10.4488 +Get the uuid field of the given crashdump.
 10.4489 +
 10.4490 + \noindent {\bf Signature:} 
 10.4491 +\begin{verbatim} string get_uuid (session_id s, crashdump ref self)\end{verbatim}
 10.4492 +
 10.4493 +
 10.4494 +\noindent{\bf Arguments:}
 10.4495 +
 10.4496 + 
 10.4497 +\vspace{0.3cm}
 10.4498 +\begin{tabular}{|c|c|p{7cm}|}
 10.4499 + \hline
 10.4500 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4501 +{\tt crashdump ref } & self & reference to the object \\ \hline 
 10.4502 +
 10.4503 +\end{tabular}
 10.4504 +
 10.4505 +\vspace{0.3cm}
 10.4506 +
 10.4507 + \noindent {\bf Return Type:} 
 10.4508 +{\tt 
 10.4509 +string
 10.4510 +}
 10.4511 +
 10.4512 +
 10.4513 +value of the field
 10.4514 +\vspace{0.3cm}
 10.4515 +\vspace{0.3cm}
 10.4516 +\vspace{0.3cm}
 10.4517 +\subsubsection{RPC name:~get\_VM}
 10.4518 +
 10.4519 +{\bf Overview:} 
 10.4520 +Get the VM field of the given crashdump.
 10.4521 +
 10.4522 + \noindent {\bf Signature:} 
 10.4523 +\begin{verbatim} (VM ref) get_VM (session_id s, crashdump ref self)\end{verbatim}
 10.4524 +
 10.4525 +
 10.4526 +\noindent{\bf Arguments:}
 10.4527 +
 10.4528 + 
 10.4529 +\vspace{0.3cm}
 10.4530 +\begin{tabular}{|c|c|p{7cm}|}
 10.4531 + \hline
 10.4532 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4533 +{\tt crashdump ref } & self & reference to the object \\ \hline 
 10.4534 +
 10.4535 +\end{tabular}
 10.4536 +
 10.4537 +\vspace{0.3cm}
 10.4538 +
 10.4539 + \noindent {\bf Return Type:} 
 10.4540 +{\tt 
 10.4541 +VM ref
 10.4542 +}
 10.4543 +
 10.4544 +
 10.4545 +value of the field
 10.4546 +\vspace{0.3cm}
 10.4547 +\vspace{0.3cm}
 10.4548 +\vspace{0.3cm}
 10.4549 +\subsubsection{RPC name:~get\_VDI}
 10.4550 +
 10.4551 +{\bf Overview:} 
 10.4552 +Get the VDI field of the given crashdump.
 10.4553 +
 10.4554 + \noindent {\bf Signature:} 
 10.4555 +\begin{verbatim} (VDI ref) get_VDI (session_id s, crashdump ref self)\end{verbatim}
 10.4556 +
 10.4557 +
 10.4558 +\noindent{\bf Arguments:}
 10.4559 +
 10.4560 + 
 10.4561 +\vspace{0.3cm}
 10.4562 +\begin{tabular}{|c|c|p{7cm}|}
 10.4563 + \hline
 10.4564 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4565 +{\tt crashdump ref } & self & reference to the object \\ \hline 
 10.4566 +
 10.4567 +\end{tabular}
 10.4568 +
 10.4569 +\vspace{0.3cm}
 10.4570 +
 10.4571 + \noindent {\bf Return Type:} 
 10.4572 +{\tt 
 10.4573 +VDI ref
 10.4574 +}
 10.4575 +
 10.4576 +
 10.4577 +value of the field
 10.4578 +\vspace{0.3cm}
 10.4579 +\vspace{0.3cm}
 10.4580 +\vspace{0.3cm}
 10.4581 +\subsubsection{RPC name:~create}
 10.4582 +
 10.4583 +{\bf Overview:} 
 10.4584 +Create a new crashdump instance, and return its handle.
 10.4585 +
 10.4586 + \noindent {\bf Signature:} 
 10.4587 +\begin{verbatim} (crashdump ref) create (session_id s, crashdump record args)\end{verbatim}
 10.4588 +
 10.4589 +
 10.4590 +\noindent{\bf Arguments:}
 10.4591 +
 10.4592 + 
 10.4593 +\vspace{0.3cm}
 10.4594 +\begin{tabular}{|c|c|p{7cm}|}
 10.4595 + \hline
 10.4596 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4597 +{\tt crashdump record } & args & All constructor arguments \\ \hline 
 10.4598 +
 10.4599 +\end{tabular}
 10.4600 +
 10.4601 +\vspace{0.3cm}
 10.4602 +
 10.4603 + \noindent {\bf Return Type:} 
 10.4604 +{\tt 
 10.4605 +crashdump ref
 10.4606 +}
 10.4607 +
 10.4608 +
 10.4609 +reference to the newly created object
 10.4610 +\vspace{0.3cm}
 10.4611 +\vspace{0.3cm}
 10.4612 +\vspace{0.3cm}
 10.4613 +\subsubsection{RPC name:~destroy}
 10.4614 +
 10.4615 +{\bf Overview:} 
 10.4616 +Destroy the specified crashdump instance.
 10.4617 +
 10.4618 + \noindent {\bf Signature:} 
 10.4619 +\begin{verbatim} void destroy (session_id s, crashdump ref self)\end{verbatim}
 10.4620 +
 10.4621 +
 10.4622 +\noindent{\bf Arguments:}
 10.4623 +
 10.4624 + 
 10.4625 +\vspace{0.3cm}
 10.4626 +\begin{tabular}{|c|c|p{7cm}|}
 10.4627 + \hline
 10.4628 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4629 +{\tt crashdump ref } & self & reference to the object \\ \hline 
 10.4630 +
 10.4631 +\end{tabular}
 10.4632 +
 10.4633 +\vspace{0.3cm}
 10.4634 +
 10.4635 + \noindent {\bf Return Type:} 
 10.4636 +{\tt 
 10.4637 +void
 10.4638 +}
 10.4639 +
 10.4640 +
 10.4641 +
 10.4642 +\vspace{0.3cm}
 10.4643 +\vspace{0.3cm}
 10.4644 +\vspace{0.3cm}
 10.4645 +\subsubsection{RPC name:~get\_by\_uuid}
 10.4646 +
 10.4647 +{\bf Overview:} 
 10.4648 +Get a reference to the crashdump instance with the specified UUID.
 10.4649 +
 10.4650 + \noindent {\bf Signature:} 
 10.4651 +\begin{verbatim} (crashdump ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.4652 +
 10.4653 +
 10.4654 +\noindent{\bf Arguments:}
 10.4655 +
 10.4656 + 
 10.4657 +\vspace{0.3cm}
 10.4658 +\begin{tabular}{|c|c|p{7cm}|}
 10.4659 + \hline
 10.4660 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4661 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.4662 +
 10.4663 +\end{tabular}
 10.4664 +
 10.4665 +\vspace{0.3cm}
 10.4666 +
 10.4667 + \noindent {\bf Return Type:} 
 10.4668 +{\tt 
 10.4669 +crashdump ref
 10.4670 +}
 10.4671 +
 10.4672 +
 10.4673 +reference to the object
 10.4674 +\vspace{0.3cm}
 10.4675 +\vspace{0.3cm}
 10.4676 +\vspace{0.3cm}
 10.4677 +\subsubsection{RPC name:~get\_record}
 10.4678 +
 10.4679 +{\bf Overview:} 
 10.4680 +Get a record containing the current state of the given crashdump.
 10.4681 +
 10.4682 + \noindent {\bf Signature:} 
 10.4683 +\begin{verbatim} (crashdump record) get_record (session_id s, crashdump ref self)\end{verbatim}
 10.4684 +
 10.4685 +
 10.4686 +\noindent{\bf Arguments:}
 10.4687 +
 10.4688 + 
 10.4689 +\vspace{0.3cm}
 10.4690 +\begin{tabular}{|c|c|p{7cm}|}
 10.4691 + \hline
 10.4692 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4693 +{\tt crashdump ref } & self & reference to the object \\ \hline 
 10.4694 +
 10.4695 +\end{tabular}
 10.4696 +
 10.4697 +\vspace{0.3cm}
 10.4698 +
 10.4699 + \noindent {\bf Return Type:} 
 10.4700 +{\tt 
 10.4701 +crashdump record
 10.4702 +}
 10.4703 +
 10.4704 +
 10.4705 +all fields from the object
 10.4706 +\vspace{0.3cm}
 10.4707 +\vspace{0.3cm}
 10.4708 +\vspace{0.3cm}
 10.4709 +
 10.4710 +\vspace{1cm}
 10.4711 +\newpage
 10.4712  \section{Class: VTPM}
 10.4713  \subsection{Fields for class: VTPM}
 10.4714  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.4715  \hline
 10.4716  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf VTPM} \\
 10.4717 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A virtual TPM device}} \\
 10.4718 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.4719 +virtual TPM device.}} \\
 10.4720  \hline
 10.4721  Quals & Field & Type & Description \\
 10.4722  \hline
 10.4723  $\mathit{RO}_\mathit{run}$ &  {\tt uuid} & string & unique identifier/object reference \\
 10.4724  $\mathit{RO}_\mathit{ins}$ &  {\tt VM} & VM ref & the virtual machine \\
 10.4725  $\mathit{RO}_\mathit{ins}$ &  {\tt backend} & VM ref & the domain where the backend is located \\
 10.4726 -$\mathit{RO}_\mathit{ins}$ &  {\tt driver} & driver\_type & the style of driver \\
 10.4727 -$\mathit{RO}_\mathit{ins}$ &  {\tt instance} & int & the instance number the virtual TPM represents \\
 10.4728  \hline
 10.4729  \end{longtable}
 10.4730  \subsection{Additional RPCs associated with class: VTPM}
 10.4731 @@ -9431,70 +10670,6 @@ value of the field
 10.4732  \vspace{0.3cm}
 10.4733  \vspace{0.3cm}
 10.4734  \vspace{0.3cm}
 10.4735 -\subsubsection{RPC name:~get\_driver}
 10.4736 -
 10.4737 -{\bf Overview:} 
 10.4738 -Get the driver field of the given VTPM.
 10.4739 -
 10.4740 - \noindent {\bf Signature:} 
 10.4741 -\begin{verbatim} (driver_type) get_driver (session_id s, VTPM ref self)\end{verbatim}
 10.4742 -
 10.4743 -
 10.4744 -\noindent{\bf Arguments:}
 10.4745 -
 10.4746 - 
 10.4747 -\vspace{0.3cm}
 10.4748 -\begin{tabular}{|c|c|p{7cm}|}
 10.4749 - \hline
 10.4750 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4751 -{\tt VTPM ref } & self & reference to the object \\ \hline 
 10.4752 -
 10.4753 -\end{tabular}
 10.4754 -
 10.4755 -\vspace{0.3cm}
 10.4756 -
 10.4757 - \noindent {\bf Return Type:} 
 10.4758 -{\tt 
 10.4759 -driver\_type
 10.4760 -}
 10.4761 -
 10.4762 -
 10.4763 -value of the field
 10.4764 -\vspace{0.3cm}
 10.4765 -\vspace{0.3cm}
 10.4766 -\vspace{0.3cm}
 10.4767 -\subsubsection{RPC name:~get\_instance}
 10.4768 -
 10.4769 -{\bf Overview:} 
 10.4770 -Get the instance field of the given VTPM.
 10.4771 -
 10.4772 - \noindent {\bf Signature:} 
 10.4773 -\begin{verbatim} int get_instance (session_id s, VTPM ref self)\end{verbatim}
 10.4774 -
 10.4775 -
 10.4776 -\noindent{\bf Arguments:}
 10.4777 -
 10.4778 - 
 10.4779 -\vspace{0.3cm}
 10.4780 -\begin{tabular}{|c|c|p{7cm}|}
 10.4781 - \hline
 10.4782 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4783 -{\tt VTPM ref } & self & reference to the object \\ \hline 
 10.4784 -
 10.4785 -\end{tabular}
 10.4786 -
 10.4787 -\vspace{0.3cm}
 10.4788 -
 10.4789 - \noindent {\bf Return Type:} 
 10.4790 -{\tt 
 10.4791 -int
 10.4792 -}
 10.4793 -
 10.4794 -
 10.4795 -value of the field
 10.4796 -\vspace{0.3cm}
 10.4797 -\vspace{0.3cm}
 10.4798 -\vspace{0.3cm}
 10.4799  \subsubsection{RPC name:~create}
 10.4800  
 10.4801  {\bf Overview:} 
 10.4802 @@ -9631,7 +10806,8 @@ all fields from the object
 10.4803  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.4804  \hline
 10.4805  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf console} \\
 10.4806 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A console}} \\
 10.4807 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.4808 +console.}} \\
 10.4809  \hline
 10.4810  Quals & Field & Type & Description \\
 10.4811  \hline
 10.4812 @@ -9642,134 +10818,6 @@ Quals & Field & Type & Description \\
 10.4813  \hline
 10.4814  \end{longtable}
 10.4815  \subsection{Additional RPCs associated with class: console}
 10.4816 -\subsubsection{RPC name:~get\_record}
 10.4817 -
 10.4818 -{\bf Overview:} 
 10.4819 -Get the current state of the given console.
 10.4820 -
 10.4821 - \noindent {\bf Signature:} 
 10.4822 -\begin{verbatim} (console record) get_record (session_id s, console ref self)\end{verbatim}
 10.4823 -
 10.4824 -
 10.4825 -\noindent{\bf Arguments:}
 10.4826 -
 10.4827 - 
 10.4828 -\vspace{0.3cm}
 10.4829 -\begin{tabular}{|c|c|p{7cm}|}
 10.4830 - \hline
 10.4831 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4832 -{\tt console ref } & self & reference to the object \\ \hline 
 10.4833 -
 10.4834 -\end{tabular}
 10.4835 -
 10.4836 -\vspace{0.3cm}
 10.4837 -
 10.4838 - \noindent {\bf Return Type:} 
 10.4839 -{\tt 
 10.4840 -console record
 10.4841 -}
 10.4842 -
 10.4843 -
 10.4844 -all fields from the object
 10.4845 -\vspace{0.3cm}
 10.4846 -\vspace{0.3cm}
 10.4847 -\vspace{0.3cm}
 10.4848 -\subsubsection{RPC name:~get\_by\_uuid}
 10.4849 -
 10.4850 -{\bf Overview:} 
 10.4851 -Get a reference to the object with the specified UUID.
 10.4852 -
 10.4853 - \noindent {\bf Signature:} 
 10.4854 -\begin{verbatim} (console ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.4855 -
 10.4856 -
 10.4857 -\noindent{\bf Arguments:}
 10.4858 -
 10.4859 - 
 10.4860 -\vspace{0.3cm}
 10.4861 -\begin{tabular}{|c|c|p{7cm}|}
 10.4862 - \hline
 10.4863 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4864 -{\tt string } & uuid & UUID of object to return \\ \hline 
 10.4865 -
 10.4866 -\end{tabular}
 10.4867 -
 10.4868 -\vspace{0.3cm}
 10.4869 -
 10.4870 - \noindent {\bf Return Type:} 
 10.4871 -{\tt 
 10.4872 -console ref
 10.4873 -}
 10.4874 -
 10.4875 -
 10.4876 -reference to the object
 10.4877 -\vspace{0.3cm}
 10.4878 -\vspace{0.3cm}
 10.4879 -\vspace{0.3cm}
 10.4880 -\subsubsection{RPC name:~create}
 10.4881 -
 10.4882 -{\bf Overview:} 
 10.4883 -Create a new console instance, and return its handle.
 10.4884 -
 10.4885 - \noindent {\bf Signature:} 
 10.4886 -\begin{verbatim} (console ref) create (session_id s, console record args)\end{verbatim}
 10.4887 -
 10.4888 -
 10.4889 -\noindent{\bf Arguments:}
 10.4890 -
 10.4891 - 
 10.4892 -\vspace{0.3cm}
 10.4893 -\begin{tabular}{|c|c|p{7cm}|}
 10.4894 - \hline
 10.4895 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4896 -{\tt console record } & args & All constructor arguments \\ \hline 
 10.4897 -
 10.4898 -\end{tabular}
 10.4899 -
 10.4900 -\vspace{0.3cm}
 10.4901 -
 10.4902 - \noindent {\bf Return Type:} 
 10.4903 -{\tt 
 10.4904 -console ref
 10.4905 -}
 10.4906 -
 10.4907 -
 10.4908 -reference to the newly created object
 10.4909 -\vspace{0.3cm}
 10.4910 -\vspace{0.3cm}
 10.4911 -\vspace{0.3cm}
 10.4912 -\subsubsection{RPC name:~destroy}
 10.4913 -
 10.4914 -{\bf Overview:} 
 10.4915 -Destroy the specified console instance.
 10.4916 -
 10.4917 - \noindent {\bf Signature:} 
 10.4918 -\begin{verbatim} void destroy (session_id s, console ref self)\end{verbatim}
 10.4919 -
 10.4920 -
 10.4921 -\noindent{\bf Arguments:}
 10.4922 -
 10.4923 - 
 10.4924 -\vspace{0.3cm}
 10.4925 -\begin{tabular}{|c|c|p{7cm}|}
 10.4926 - \hline
 10.4927 -{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4928 -{\tt console ref } & self & reference to the object \\ \hline 
 10.4929 -
 10.4930 -\end{tabular}
 10.4931 -
 10.4932 -\vspace{0.3cm}
 10.4933 -
 10.4934 - \noindent {\bf Return Type:} 
 10.4935 -{\tt 
 10.4936 -void
 10.4937 -}
 10.4938 -
 10.4939 -
 10.4940 -
 10.4941 -\vspace{0.3cm}
 10.4942 -\vspace{0.3cm}
 10.4943 -\vspace{0.3cm}
 10.4944  \subsubsection{RPC name:~get\_uuid}
 10.4945  
 10.4946  {\bf Overview:} 
 10.4947 @@ -9898,6 +10946,134 @@ value of the field
 10.4948  \vspace{0.3cm}
 10.4949  \vspace{0.3cm}
 10.4950  \vspace{0.3cm}
 10.4951 +\subsubsection{RPC name:~create}
 10.4952 +
 10.4953 +{\bf Overview:} 
 10.4954 +Create a new console instance, and return its handle.
 10.4955 +
 10.4956 + \noindent {\bf Signature:} 
 10.4957 +\begin{verbatim} (console ref) create (session_id s, console record args)\end{verbatim}
 10.4958 +
 10.4959 +
 10.4960 +\noindent{\bf Arguments:}
 10.4961 +
 10.4962 + 
 10.4963 +\vspace{0.3cm}
 10.4964 +\begin{tabular}{|c|c|p{7cm}|}
 10.4965 + \hline
 10.4966 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4967 +{\tt console record } & args & All constructor arguments \\ \hline 
 10.4968 +
 10.4969 +\end{tabular}
 10.4970 +
 10.4971 +\vspace{0.3cm}
 10.4972 +
 10.4973 + \noindent {\bf Return Type:} 
 10.4974 +{\tt 
 10.4975 +console ref
 10.4976 +}
 10.4977 +
 10.4978 +
 10.4979 +reference to the newly created object
 10.4980 +\vspace{0.3cm}
 10.4981 +\vspace{0.3cm}
 10.4982 +\vspace{0.3cm}
 10.4983 +\subsubsection{RPC name:~destroy}
 10.4984 +
 10.4985 +{\bf Overview:} 
 10.4986 +Destroy the specified console instance.
 10.4987 +
 10.4988 + \noindent {\bf Signature:} 
 10.4989 +\begin{verbatim} void destroy (session_id s, console ref self)\end{verbatim}
 10.4990 +
 10.4991 +
 10.4992 +\noindent{\bf Arguments:}
 10.4993 +
 10.4994 + 
 10.4995 +\vspace{0.3cm}
 10.4996 +\begin{tabular}{|c|c|p{7cm}|}
 10.4997 + \hline
 10.4998 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.4999 +{\tt console ref } & self & reference to the object \\ \hline 
 10.5000 +
 10.5001 +\end{tabular}
 10.5002 +
 10.5003 +\vspace{0.3cm}
 10.5004 +
 10.5005 + \noindent {\bf Return Type:} 
 10.5006 +{\tt 
 10.5007 +void
 10.5008 +}
 10.5009 +
 10.5010 +
 10.5011 +
 10.5012 +\vspace{0.3cm}
 10.5013 +\vspace{0.3cm}
 10.5014 +\vspace{0.3cm}
 10.5015 +\subsubsection{RPC name:~get\_by\_uuid}
 10.5016 +
 10.5017 +{\bf Overview:} 
 10.5018 +Get a reference to the console instance with the specified UUID.
 10.5019 +
 10.5020 + \noindent {\bf Signature:} 
 10.5021 +\begin{verbatim} (console ref) get_by_uuid (session_id s, string uuid)\end{verbatim}
 10.5022 +
 10.5023 +
 10.5024 +\noindent{\bf Arguments:}
 10.5025 +
 10.5026 + 
 10.5027 +\vspace{0.3cm}
 10.5028 +\begin{tabular}{|c|c|p{7cm}|}
 10.5029 + \hline
 10.5030 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.5031 +{\tt string } & uuid & UUID of object to return \\ \hline 
 10.5032 +
 10.5033 +\end{tabular}
 10.5034 +
 10.5035 +\vspace{0.3cm}
 10.5036 +
 10.5037 + \noindent {\bf Return Type:} 
 10.5038 +{\tt 
 10.5039 +console ref
 10.5040 +}
 10.5041 +
 10.5042 +
 10.5043 +reference to the object
 10.5044 +\vspace{0.3cm}
 10.5045 +\vspace{0.3cm}
 10.5046 +\vspace{0.3cm}
 10.5047 +\subsubsection{RPC name:~get\_record}
 10.5048 +
 10.5049 +{\bf Overview:} 
 10.5050 +Get a record containing the current state of the given console.
 10.5051 +
 10.5052 + \noindent {\bf Signature:} 
 10.5053 +\begin{verbatim} (console record) get_record (session_id s, console ref self)\end{verbatim}
 10.5054 +
 10.5055 +
 10.5056 +\noindent{\bf Arguments:}
 10.5057 +
 10.5058 + 
 10.5059 +\vspace{0.3cm}
 10.5060 +\begin{tabular}{|c|c|p{7cm}|}
 10.5061 + \hline
 10.5062 +{\bf type} & {\bf name} & {\bf description} \\ \hline
 10.5063 +{\tt console ref } & self & reference to the object \\ \hline 
 10.5064 +
 10.5065 +\end{tabular}
 10.5066 +
 10.5067 +\vspace{0.3cm}
 10.5068 +
 10.5069 + \noindent {\bf Return Type:} 
 10.5070 +{\tt 
 10.5071 +console record
 10.5072 +}
 10.5073 +
 10.5074 +
 10.5075 +all fields from the object
 10.5076 +\vspace{0.3cm}
 10.5077 +\vspace{0.3cm}
 10.5078 +\vspace{0.3cm}
 10.5079  
 10.5080  \vspace{1cm}
 10.5081  \newpage
 10.5082 @@ -9906,7 +11082,8 @@ value of the field
 10.5083  \begin{longtable}{|lllp{0.38\textwidth}|}
 10.5084  \hline
 10.5085  \multicolumn{1}{|l}{Name} & \multicolumn{3}{l|}{\bf user} \\
 10.5086 -\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A user of the system}} \\
 10.5087 +\multicolumn{1}{|l}{Description} & \multicolumn{3}{l|}{\parbox{11cm}{\em A
 10.5088 +user of the system.}} \\
 10.5089  \hline
 10.5090  Quals & Field & Type & Description \\
 10.5091  \hline
 10.5092 @@ -10205,7 +11382,7 @@ A list of all the IDs of all the debug r
 10.5093  \subsubsection{RPC name:~return\_failure}
 10.5094  
 10.5095  {\bf Overview:} 
 10.5096 -Return an API 'successful' failure
 10.5097 +Return an API 'successful' failure.
 10.5098  
 10.5099   \noindent {\bf Signature:} 
 10.5100  \begin{verbatim} void return_failure (session_id s)\end{verbatim}
 10.5101 @@ -10438,6 +11615,16 @@ The handle parameter echoes the bad valu
 10.5102  \begin{verbatim}HOST_HANDLE_INVALID(handle)\end{verbatim}
 10.5103  \begin{center}\rule{10em}{0.1pt}\end{center}
 10.5104  
 10.5105 +\subsubsection{HOST\_METRICS\_HANDLE\_INVALID}
 10.5106 +
 10.5107 +You gave an invalid host\_metrics handle.  The host\_metrics may have
 10.5108 +recently been deleted.  The handle parameter echoes the bad value given.
 10.5109 +
 10.5110 +\vspace{0.3cm}
 10.5111 +{\bf Signature:}
 10.5112 +\begin{verbatim}HOST_METRICS_HANDLE_INVALID(handle)\end{verbatim}
 10.5113 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5114 +
 10.5115  \subsubsection{INTERNAL\_ERROR}
 10.5116  
 10.5117  The server failed to handle your request, due to an internal error.  The
 10.5118 @@ -10490,6 +11677,46 @@ already attached to some other PIF, and 
 10.5119  \begin{verbatim}NETWORK_ALREADY_CONNECTED(network, connected PIF)\end{verbatim}
 10.5120  \begin{center}\rule{10em}{0.1pt}\end{center}
 10.5121  
 10.5122 +\subsubsection{OPERATION\_NOT\_ALLOWED}
 10.5123 +
 10.5124 +You attempted an operation that was not allowed.
 10.5125 +
 10.5126 +\vspace{0.3cm}
 10.5127 +{\bf Signature:}
 10.5128 +\begin{verbatim}OPERATION_NOT_ALLOWED()\end{verbatim}
 10.5129 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5130 +
 10.5131 +\subsubsection{PIF\_HANDLE\_INVALID}
 10.5132 +
 10.5133 +You gave an invalid PIF handle.  The PIF may have recently been deleted. 
 10.5134 +The handle parameter echoes the bad value given.
 10.5135 +
 10.5136 +\vspace{0.3cm}
 10.5137 +{\bf Signature:}
 10.5138 +\begin{verbatim}PIF_HANDLE_INVALID(handle)\end{verbatim}
 10.5139 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5140 +
 10.5141 +\subsubsection{PIF\_IS\_PHYSICAL}
 10.5142 +
 10.5143 +You tried to destroy a PIF, but it represents an aspect of the physical
 10.5144 +host configuration, and so cannot be destroyed.  The parameter echoes the
 10.5145 +PIF handle you gave.
 10.5146 +
 10.5147 +\vspace{0.3cm}
 10.5148 +{\bf Signature:}
 10.5149 +\begin{verbatim}PIF_IS_PHYSICAL(PIF)\end{verbatim}
 10.5150 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5151 +
 10.5152 +\subsubsection{PIF\_METRICS\_HANDLE\_INVALID}
 10.5153 +
 10.5154 +You gave an invalid PIF\_metrics handle.  The PIF\_metrics may have
 10.5155 +recently been deleted.  The handle parameter echoes the bad value given.
 10.5156 +
 10.5157 +\vspace{0.3cm}
 10.5158 +{\bf Signature:}
 10.5159 +\begin{verbatim}PIF_METRICS_HANDLE_INVALID(handle)\end{verbatim}
 10.5160 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5161 +
 10.5162  \subsubsection{SESSION\_AUTHENTICATION\_FAILED}
 10.5163  
 10.5164  The credentials given by the user are incorrect, so access has been denied,
 10.5165 @@ -10521,6 +11748,16 @@ handle parameter echoes the bad value gi
 10.5166  \begin{verbatim}SR_HANDLE_INVALID(handle)\end{verbatim}
 10.5167  \begin{center}\rule{10em}{0.1pt}\end{center}
 10.5168  
 10.5169 +\subsubsection{TASK\_HANDLE\_INVALID}
 10.5170 +
 10.5171 +You gave an invalid task handle.  The task may have recently been deleted. 
 10.5172 +The handle parameter echoes the bad value given.
 10.5173 +
 10.5174 +\vspace{0.3cm}
 10.5175 +{\bf Signature:}
 10.5176 +\begin{verbatim}TASK_HANDLE_INVALID(handle)\end{verbatim}
 10.5177 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5178 +
 10.5179  \subsubsection{VBD\_HANDLE\_INVALID}
 10.5180  
 10.5181  You gave an invalid VBD handle.  The VBD may have recently been deleted. 
 10.5182 @@ -10551,11 +11788,21 @@ The handle parameter echoes the bad valu
 10.5183  \begin{verbatim}VIF_HANDLE_INVALID(handle)\end{verbatim}
 10.5184  \begin{center}\rule{10em}{0.1pt}\end{center}
 10.5185  
 10.5186 +\subsubsection{VLAN\_TAG\_INVALID}
 10.5187 +
 10.5188 +You tried to create a VLAN, but the tag you gave was invalid -- it mmust be
 10.5189 +between 0 and 4095.  The parameter echoes the VLAN tag you gave.
 10.5190 +
 10.5191 +\vspace{0.3cm}
 10.5192 +{\bf Signature:}
 10.5193 +\begin{verbatim}VLAN_TAG_INVALID(VLAN)\end{verbatim}
 10.5194 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5195 +
 10.5196  \subsubsection{VM\_BAD\_POWER\_STATE}
 10.5197  
 10.5198  You attempted an operation on a VM that was not in an appropriate power
 10.5199  state at the time; for example, you attempted to start a VM that was
 10.5200 -already running.  The parameters returned are the VM's UUID, and the
 10.5201 +already running.  The parameters returned are the VM's handle, and the
 10.5202  expected and actual VM state at the time of the call.
 10.5203  
 10.5204  \vspace{0.3cm}
 10.5205 @@ -10573,6 +11820,16 @@ handle parameter echoes the bad value gi
 10.5206  \begin{verbatim}VM_HANDLE_INVALID(handle)\end{verbatim}
 10.5207  \begin{center}\rule{10em}{0.1pt}\end{center}
 10.5208  
 10.5209 +\subsubsection{VM\_METRICS\_HANDLE\_INVALID}
 10.5210 +
 10.5211 +You gave an invalid VM\_metrics handle.  The VM\_metrics may have recently
 10.5212 +been deleted.  The handle parameter echoes the bad value given.
 10.5213 +
 10.5214 +\vspace{0.3cm}
 10.5215 +{\bf Signature:}
 10.5216 +\begin{verbatim}VM_METRICS_HANDLE_INVALID(handle)\end{verbatim}
 10.5217 +\begin{center}\rule{10em}{0.1pt}\end{center}
 10.5218 +
 10.5219  \subsubsection{VTPM\_HANDLE\_INVALID}
 10.5220  
 10.5221  You gave an invalid VTPM handle.  The VTPM may have recently been deleted. 
    11.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S	Tue Jan 30 23:35:32 2007 -0700
    11.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S	Wed Jan 31 10:30:54 2007 -0700
    11.3 @@ -51,6 +51,7 @@ SECTIONS
    11.4    __tracedata_end = .;
    11.5  
    11.6    /* writeable */
    11.7 +  . = ALIGN(4096);
    11.8    .data : AT(ADDR(.data) - LOAD_OFFSET) {	/* Data */
    11.9  	*(.data)
   11.10  	CONSTRUCTORS
    12.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Tue Jan 30 23:35:32 2007 -0700
    12.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c	Wed Jan 31 10:30:54 2007 -0700
    12.3 @@ -48,6 +48,7 @@ cpumask_t cpu_online_map;
    12.4  EXPORT_SYMBOL(cpu_online_map);
    12.5  cpumask_t cpu_possible_map;
    12.6  EXPORT_SYMBOL(cpu_possible_map);
    12.7 +static cpumask_t cpu_initialized_map;
    12.8  
    12.9  struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned;
   12.10  EXPORT_SYMBOL(cpu_data);
   12.11 @@ -278,6 +279,8 @@ void __init smp_prepare_cpus(unsigned in
   12.12  	if (xen_smp_intr_init(0))
   12.13  		BUG();
   12.14  
   12.15 +	cpu_initialized_map = cpumask_of_cpu(0);
   12.16 +
   12.17  	/* Restrict the possible_map according to max_cpus. */
   12.18  	while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
   12.19  		for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
   12.20 @@ -330,8 +333,6 @@ void __init smp_prepare_cpus(unsigned in
   12.21  #else
   12.22  		cpu_set(cpu, cpu_present_map);
   12.23  #endif
   12.24 -
   12.25 -		cpu_initialize_context(cpu);
   12.26  	}
   12.27  
   12.28  	init_xenbus_allowed_cpumask();
   12.29 @@ -418,6 +419,11 @@ int __devinit __cpu_up(unsigned int cpu)
   12.30  	if (rc)
   12.31  		return rc;
   12.32  
   12.33 +	if (!cpu_isset(cpu, cpu_initialized_map)) {
   12.34 +		cpu_set(cpu, cpu_initialized_map);
   12.35 +		cpu_initialize_context(cpu);
   12.36 +	}
   12.37 +
   12.38  	if (num_online_cpus() == 1)
   12.39  		alternatives_smp_switch(1);
   12.40  
    13.1 --- a/tools/Rules.mk	Tue Jan 30 23:35:32 2007 -0700
    13.2 +++ b/tools/Rules.mk	Wed Jan 31 10:30:54 2007 -0700
    13.3 @@ -53,6 +53,9 @@ mk-symlinks-xen:
    13.4  	mkdir -p xen/arch-x86
    13.5  	( cd xen/arch-x86 && ln -sf ../../$(XEN_ROOT)/xen/include/public/arch-x86/*.h . )
    13.6  	mkdir -p xen/foreign
    13.7 -	( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.h . )
    13.8 +	( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/Makefile . )
    13.9 +	( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/reference.size . )
   13.10 +	( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.py . )
   13.11 +	make -C xen/foreign
   13.12  
   13.13  mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)
    14.1 --- a/tools/blktap/Makefile	Tue Jan 30 23:35:32 2007 -0700
    14.2 +++ b/tools/blktap/Makefile	Wed Jan 31 10:30:54 2007 -0700
    14.3 @@ -9,7 +9,7 @@ SUBDIRS-y += drivers
    14.4  all: build
    14.5  
    14.6  .PHONY: build
    14.7 -build: mk-symlinks
    14.8 +build:
    14.9  	@set -e; for subdir in $(SUBDIRS-y); do \
   14.10  	$(MAKE) -C $$subdir all;       \
   14.11  		done
   14.12 @@ -22,7 +22,7 @@ install:
   14.13  
   14.14  .PHONY: clean
   14.15  clean:
   14.16 -	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS
   14.17 +	rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) TAGS
   14.18  	@set -e; for subdir in $(SUBDIRS-y); do \
   14.19  	$(MAKE) -C $$subdir clean;       \
   14.20  		done
    15.1 --- a/tools/firmware/rombios/tcgbios.c	Tue Jan 30 23:35:32 2007 -0700
    15.2 +++ b/tools/firmware/rombios/tcgbios.c	Wed Jan 31 10:30:54 2007 -0700
    15.3 @@ -39,7 +39,7 @@ Bit32u tcpa_extend_acpi_log(entry_ptr)
    15.4      Bit32u entry_ptr;
    15.5  {
    15.6  	ASM_START
    15.7 -	DoUpcall IDX_TCPA_EXTEND_ACPI_LOG
    15.8 +	DoUpcall(IDX_TCPA_EXTEND_ACPI_LOG)
    15.9  	ASM_END
   15.10  }
   15.11  
   15.12 @@ -52,7 +52,7 @@ Bit32u tcpa_extend_acpi_log(entry_ptr)
   15.13  tcpa_acpi_init()
   15.14  {
   15.15  	ASM_START
   15.16 -	DoUpcall IDX_TCPA_ACPI_INIT
   15.17 +	DoUpcall(IDX_TCPA_ACPI_INIT)
   15.18  	ASM_END
   15.19  }
   15.20  
   15.21 @@ -64,7 +64,7 @@ tcpa_acpi_init()
   15.22  tcpa_calling_int19h()
   15.23  {
   15.24  	ASM_START
   15.25 -	DoUpcall IDX_TCPA_CALLING_INT19H
   15.26 +	DoUpcall(IDX_TCPA_CALLING_INT19H)
   15.27  	ASM_END
   15.28  }
   15.29  
   15.30 @@ -75,7 +75,7 @@ tcpa_calling_int19h()
   15.31  tcpa_returned_int19h()
   15.32  {
   15.33  	ASM_START
   15.34 -	DoUpcall IDX_TCPA_RETURNED_INT19H
   15.35 +	DoUpcall(IDX_TCPA_RETURNED_INT19H)
   15.36  	ASM_END
   15.37  }
   15.38  
   15.39 @@ -86,7 +86,7 @@ tcpa_returned_int19h()
   15.40  tcpa_add_event_separators()
   15.41  {
   15.42  	ASM_START
   15.43 -	DoUpcall IDX_TCPA_ADD_EVENT_SEPARATORS
   15.44 +	DoUpcall(IDX_TCPA_ADD_EVENT_SEPARATORS)
   15.45  	ASM_END
   15.46  }
   15.47  
   15.48 @@ -98,7 +98,7 @@ tcpa_add_event_separators()
   15.49  tcpa_wake_event()
   15.50  {
   15.51  	ASM_START
   15.52 -	DoUpcall IDX_TCPA_WAKE_EVENT
   15.53 +	DoUpcall(IDX_TCPA_WAKE_EVENT)
   15.54  	ASM_END
   15.55  }
   15.56  
   15.57 @@ -111,7 +111,7 @@ tcpa_wake_event()
   15.58  tcpa_start_option_rom_scan()
   15.59  {
   15.60  	ASM_START
   15.61 -	DoUpcall IDX_TCPA_START_OPTION_ROM_SCAN
   15.62 +	DoUpcall(IDX_TCPA_START_OPTION_ROM_SCAN)
   15.63  	ASM_END
   15.64  }
   15.65  
   15.66 @@ -124,7 +124,7 @@ tcpa_option_rom(seg)
   15.67      Bit32u seg;
   15.68  {
   15.69  	ASM_START
   15.70 -	DoUpcall IDX_TCPA_OPTION_ROM
   15.71 +	DoUpcall(IDX_TCPA_OPTION_ROM)
   15.72  	ASM_END
   15.73  }
   15.74  
   15.75 @@ -138,7 +138,7 @@ void
   15.76    Bit32u bootdrv;
   15.77  {
   15.78  	ASM_START
   15.79 -	DoUpcall IDX_TCPA_ADD_BOOTDEVICE
   15.80 +	DoUpcall(IDX_TCPA_ADD_BOOTDEVICE)
   15.81  	ASM_END
   15.82  }
   15.83  
   15.84 @@ -154,7 +154,7 @@ tcpa_ipl(seg)
   15.85      Bit32u seg;
   15.86  {
   15.87  	ASM_START
   15.88 -	DoUpcall IDX_TCPA_IPL
   15.89 +	DoUpcall(IDX_TCPA_IPL)
   15.90  	ASM_END
   15.91  }
   15.92  
   15.93 @@ -164,7 +164,7 @@ tcpa_initialize_tpm(physpres)
   15.94    Bit32u physpres;
   15.95  {
   15.96  	ASM_START
   15.97 -	DoUpcall IDX_TCPA_INITIALIZE_TPM
   15.98 +	DoUpcall(IDX_TCPA_INITIALIZE_TPM)
   15.99  	ASM_END
  15.100  }
  15.101  
  15.102 @@ -174,7 +174,7 @@ tcpa_measure_post(from, to)
  15.103     Bit32u to;
  15.104  {
  15.105  	ASM_START
  15.106 -	DoUpcall IDX_TCPA_MEASURE_POST
  15.107 +	DoUpcall(IDX_TCPA_MEASURE_POST)
  15.108  	ASM_END
  15.109  }
  15.110  
  15.111 @@ -194,12 +194,12 @@ tcpa_do_measure_POSTs()
  15.112  {
  15.113  	ASM_START
  15.114  
  15.115 -	POST_MEASURE post, nmi
  15.116 -	POST_MEASURE floppy_drive_post, hard_drive_post
  15.117 -	POST_MEASURE hard_drive_post, ebda_post
  15.118 -	POST_MEASURE ebda_post, eoi_jmp_post
  15.119 -	POST_MEASURE eoi_jmp_post, timer_tick_post
  15.120 -	POST_MEASURE timer_tick_post, int76_handler
  15.121 +	POST_MEASURE(post, nmi)
  15.122 +	POST_MEASURE(floppy_drive_post, hard_drive_post)
  15.123 +	POST_MEASURE(hard_drive_post, ebda_post)
  15.124 +	POST_MEASURE(ebda_post, eoi_jmp_post)
  15.125 +	POST_MEASURE(eoi_jmp_post, timer_tick_post)
  15.126 +	POST_MEASURE(timer_tick_post, int76_handler)
  15.127  
  15.128  	ret
  15.129  	ASM_END
  15.130 @@ -213,7 +213,7 @@ TCGInterruptHandler(regs_ptr, es, ds, fl
  15.131     Bit32u flags_ptr;
  15.132  {
  15.133  	ASM_START
  15.134 -	DoUpcall IDX_TCGINTERRUPTHANDLER
  15.135 +	DoUpcall(IDX_TCGINTERRUPTHANDLER)
  15.136  	ASM_END
  15.137  }
  15.138  
    16.1 --- a/tools/libxc/xc_dom_boot.c	Tue Jan 30 23:35:32 2007 -0700
    16.2 +++ b/tools/libxc/xc_dom_boot.c	Wed Jan 31 10:30:54 2007 -0700
    16.3 @@ -157,6 +157,12 @@ static int arch_setup_early(struct xc_do
    16.4      return rc;
    16.5  }
    16.6  
    16.7 +static int arch_setup_middle(struct xc_dom_image *dom)
    16.8 +{
    16.9 +    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.10 +    return 0;
   16.11 +}
   16.12 +
   16.13  static int arch_setup_late(struct xc_dom_image *dom)
   16.14  {
   16.15      static const struct {
   16.16 @@ -259,6 +265,12 @@ static int arch_setup_late(struct xc_dom
   16.17  
   16.18  static int arch_setup_early(struct xc_dom_image *dom)
   16.19  {
   16.20 +    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.21 +    return 0;
   16.22 +}
   16.23 +
   16.24 +static int arch_setup_middle(struct xc_dom_image *dom)
   16.25 +{
   16.26      DECLARE_DOMCTL;
   16.27      int rc;
   16.28  
   16.29 @@ -268,16 +280,35 @@ static int arch_setup_early(struct xc_do
   16.30      domctl.cmd = XEN_DOMCTL_arch_setup;
   16.31      domctl.domain = dom->guest_domid;
   16.32      domctl.u.arch_setup.flags = 0;
   16.33 +
   16.34 +    /* dom->start_info_pfn should be initialized by alloc_magic_pages().
   16.35 +     * However it is called later. So we initialize here.
   16.36 +     */
   16.37 +    dom->start_info_pfn = dom->total_pages - 3;
   16.38      domctl.u.arch_setup.bp = (dom->start_info_pfn << PAGE_SHIFT)
   16.39  	+ sizeof(start_info_t);
   16.40 -    domctl.u.arch_setup.maxmem = dom->total_pages << PAGE_SHIFT;
   16.41 +    /* 3 = start info page, xenstore page and console page */
   16.42 +    domctl.u.arch_setup.maxmem = (dom->total_pages - 3) << PAGE_SHIFT;
   16.43      rc = do_domctl(dom->guest_xc, &domctl);
   16.44      return rc;
   16.45  }
   16.46  
   16.47  static int arch_setup_late(struct xc_dom_image *dom)
   16.48  {
   16.49 -    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.50 +    unsigned int page_size = XC_DOM_PAGE_SIZE(dom);
   16.51 +    shared_info_t *shared_info;
   16.52 +
   16.53 +    /* setup shared_info page */
   16.54 +    xc_dom_printf("%s: shared_info: mfn 0x%" PRIpfn "\n",
   16.55 +		  __FUNCTION__, dom->shared_info_mfn);
   16.56 +    shared_info = xc_map_foreign_range(dom->guest_xc, dom->guest_domid,
   16.57 +				       page_size,
   16.58 +				       PROT_READ | PROT_WRITE,
   16.59 +				       dom->shared_info_mfn);
   16.60 +    if (NULL == shared_info)
   16.61 +	return -1;
   16.62 +    dom->arch_hooks->shared_info(dom, shared_info);
   16.63 +    munmap(shared_info, page_size);
   16.64      return 0;
   16.65  }
   16.66  
   16.67 @@ -292,6 +323,12 @@ static int arch_setup_early(struct xc_do
   16.68      return 0;
   16.69  }
   16.70  
   16.71 +static int arch_setup_middle(struct xc_dom_image *dom)
   16.72 +{
   16.73 +    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.74 +    return 0;
   16.75 +}
   16.76 +
   16.77  static int arch_setup_late(struct xc_dom_image *dom)
   16.78  {
   16.79      start_info_t *si =
   16.80 @@ -324,6 +361,12 @@ static int arch_setup_early(struct xc_do
   16.81      return 0;
   16.82  }
   16.83  
   16.84 +static int arch_setup_middle(struct xc_dom_image *dom)
   16.85 +{
   16.86 +    xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.87 +    return 0;
   16.88 +}
   16.89 +
   16.90  static int arch_setup_late(struct xc_dom_image *dom)
   16.91  {
   16.92      xc_dom_printf("%s: doing nothing\n", __FUNCTION__);
   16.93 @@ -395,6 +438,9 @@ int xc_dom_boot_mem_init(struct xc_dom_i
   16.94  	return rc;
   16.95      }
   16.96  
   16.97 +    if (0 != (rc = arch_setup_middle(dom)))
   16.98 +        return rc;
   16.99 +
  16.100      return 0;
  16.101  }
  16.102  
    17.1 --- a/tools/libxc/xc_dom_ia64.c	Tue Jan 30 23:35:32 2007 -0700
    17.2 +++ b/tools/libxc/xc_dom_ia64.c	Wed Jan 31 10:30:54 2007 -0700
    17.3 @@ -26,7 +26,11 @@ static int alloc_magic_pages(struct xc_d
    17.4      /* allocate special pages */
    17.5      dom->console_pfn = dom->total_pages -1;
    17.6      dom->xenstore_pfn = dom->total_pages -2;
    17.7 -    dom->start_info_pfn = dom->total_pages -3;
    17.8 +
    17.9 +    /*
   17.10 +     * this is initialized by arch_setup_middle().
   17.11 +     * dom->start_info_pfn = dom->total_pages -3;
   17.12 +     */
   17.13      return 0;
   17.14  }
   17.15  
   17.16 @@ -39,6 +43,7 @@ static int start_info_ia64(struct xc_dom
   17.17  
   17.18      xc_dom_printf("%s\n", __FUNCTION__);
   17.19  
   17.20 +    memset(start_info, 0, sizeof(*start_info));
   17.21      sprintf(start_info->magic, dom->guest_type);
   17.22      start_info->flags = dom->flags;
   17.23      start_info->nr_pages = dom->total_pages;
   17.24 @@ -54,12 +59,12 @@ static int start_info_ia64(struct xc_dom
   17.25  	bp->initrd_start = start_info->mod_start;
   17.26  	bp->initrd_size = start_info->mod_len;
   17.27      }
   17.28 +    bp->command_line = (dom->start_info_pfn << PAGE_SHIFT_IA64)
   17.29 +	    + offsetof(start_info_t, cmd_line);
   17.30      if (dom->cmdline)
   17.31      {
   17.32  	strncpy((char *)start_info->cmd_line, dom->cmdline, MAX_GUEST_CMDLINE);
   17.33  	start_info->cmd_line[MAX_GUEST_CMDLINE - 1] = '\0';
   17.34 -	bp->command_line = (dom->start_info_pfn << PAGE_SHIFT_IA64)
   17.35 -	    + offsetof(start_info_t, cmd_line);
   17.36      }
   17.37      return 0;
   17.38  }
    18.1 --- a/tools/libxc/xc_hvm_restore.c	Tue Jan 30 23:35:32 2007 -0700
    18.2 +++ b/tools/libxc/xc_hvm_restore.c	Wed Jan 31 10:30:54 2007 -0700
    18.3 @@ -98,6 +98,8 @@ int xc_hvm_restore(int xc_handle, int io
    18.4      /* Types of the pfns in the current region */
    18.5      unsigned long region_pfn_type[MAX_BATCH_SIZE];
    18.6  
    18.7 +    struct xen_add_to_physmap xatp;
    18.8 +
    18.9      /* hvm guest mem size (Mb) */
   18.10      memsize = (unsigned long long)*store_mfn;
   18.11      v_end = memsize << 20;
   18.12 @@ -134,15 +136,6 @@ int xc_hvm_restore(int xc_handle, int io
   18.13          goto out;
   18.14      }
   18.15  
   18.16 -    /* Get the domain's shared-info frame. */
   18.17 -    domctl.cmd = XEN_DOMCTL_getdomaininfo;
   18.18 -    domctl.domain = (domid_t)dom;
   18.19 -    if (xc_domctl(xc_handle, &domctl) < 0) {
   18.20 -        ERROR("Could not get information on new domain");
   18.21 -        goto out;
   18.22 -    }
   18.23 -    shared_info_frame = domctl.u.getdomaininfo.shared_info_frame;
   18.24 -
   18.25      if(xc_domain_setmaxmem(xc_handle, dom, PFN_TO_KB(max_pfn)) != 0) {
   18.26          errno = ENOMEM;
   18.27          goto out;
   18.28 @@ -346,6 +339,21 @@ int xc_hvm_restore(int xc_handle, int io
   18.29          }
   18.30      }
   18.31  
   18.32 +    /* Shared-info pfn */
   18.33 +    if (!read_exact(io_fd, &(shared_info_frame), sizeof(uint32_t)) ) {
   18.34 +        ERROR("reading the shared-info pfn failed!\n");
   18.35 +        goto out;
   18.36 +    }
   18.37 +    /* Map the shared-info frame where it was before */
   18.38 +    xatp.domid = dom;
   18.39 +    xatp.space = XENMAPSPACE_shared_info;
   18.40 +    xatp.idx   = 0;
   18.41 +    xatp.gpfn  = shared_info_frame;
   18.42 +    if ( (rc = xc_memory_op(xc_handle, XENMEM_add_to_physmap, &xatp)) != 0 ) {
   18.43 +        ERROR("setting the shared-info pfn failed!\n");
   18.44 +        goto out;
   18.45 +    }
   18.46 +
   18.47      rc = 0;
   18.48      goto out;
   18.49  
    19.1 --- a/tools/libxc/xc_hvm_save.c	Tue Jan 30 23:35:32 2007 -0700
    19.2 +++ b/tools/libxc/xc_hvm_save.c	Wed Jan 31 10:30:54 2007 -0700
    19.3 @@ -702,6 +702,12 @@ int xc_hvm_save(int xc_handle, int io_fd
    19.4              goto out;
    19.5          }
    19.6      }
    19.7 +
    19.8 +    /* Shared-info pfn */
    19.9 +    if (!write_exact(io_fd, &(shared_info_frame), sizeof(uint32_t)) ) {
   19.10 +        ERROR("write shared-info pfn failed!\n");
   19.11 +        goto out;
   19.12 +    }
   19.13   
   19.14      /* Success! */
   19.15      rc = 0;
    20.1 --- a/tools/libxc/xc_linux_save.c	Tue Jan 30 23:35:32 2007 -0700
    20.2 +++ b/tools/libxc/xc_linux_save.c	Wed Jan 31 10:30:54 2007 -0700
    20.3 @@ -998,7 +998,7 @@ int xc_linux_save(int xc_handle, int io_
    20.4              }
    20.5  
    20.6              for ( j = 0; j < batch; j++ )
    20.7 -                ((uint32_t *)pfn_type)[i] = pfn_type[i];
    20.8 +                ((uint32_t *)pfn_type)[j] = pfn_type[j];
    20.9              if ( xc_get_pfn_type_batch(xc_handle, dom, batch,
   20.10                                         (uint32_t *)pfn_type) )
   20.11              {
   20.12 @@ -1006,7 +1006,7 @@ int xc_linux_save(int xc_handle, int io_
   20.13                  goto out;
   20.14              }
   20.15              for ( j = batch-1; j >= 0; j-- )
   20.16 -                pfn_type[i] = ((uint32_t *)pfn_type)[i];
   20.17 +                pfn_type[j] = ((uint32_t *)pfn_type)[j];
   20.18  
   20.19              for ( j = 0; j < batch; j++ )
   20.20              {
    21.1 --- a/tools/libxen/include/xen_cpu_feature.h	Tue Jan 30 23:35:32 2007 -0700
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,387 +0,0 @@
    21.4 -/*
    21.5 - * Copyright (c) 2006, XenSource Inc.
    21.6 - *
    21.7 - * This library is free software; you can redistribute it and/or
    21.8 - * modify it under the terms of the GNU Lesser General Public
    21.9 - * License as published by the Free Software Foundation; either
   21.10 - * version 2.1 of the License, or (at your option) any later version.
   21.11 - *
   21.12 - * This library is distributed in the hope that it will be useful,
   21.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   21.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   21.15 - * Lesser General Public License for more details.
   21.16 - *
   21.17 - * You should have received a copy of the GNU Lesser General Public
   21.18 - * License along with this library; if not, write to the Free Software
   21.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   21.20 - */
   21.21 -
   21.22 -#ifndef XEN_CPU_FEATURE_H
   21.23 -#define XEN_CPU_FEATURE_H
   21.24 -
   21.25 -
   21.26 -#include "xen_common.h"
   21.27 -
   21.28 -
   21.29 -enum xen_cpu_feature
   21.30 -{
   21.31 -    /**
   21.32 -     *  Onboard FPU
   21.33 -     */
   21.34 -    XEN_CPU_FEATURE_FPU,
   21.35 -
   21.36 -    /**
   21.37 -     *  Virtual Mode Extensions
   21.38 -     */
   21.39 -    XEN_CPU_FEATURE_VME,
   21.40 -
   21.41 -    /**
   21.42 -     *  Debugging Extensions
   21.43 -     */
   21.44 -    XEN_CPU_FEATURE_DE,
   21.45 -
   21.46 -    /**
   21.47 -     *  Page Size Extensions
   21.48 -     */
   21.49 -    XEN_CPU_FEATURE_PSE,
   21.50 -
   21.51 -    /**
   21.52 -     *  Time Stamp Counter
   21.53 -     */
   21.54 -    XEN_CPU_FEATURE_TSC,
   21.55 -
   21.56 -    /**
   21.57 -     *  Model-Specific Registers, RDMSR, WRMSR
   21.58 -     */
   21.59 -    XEN_CPU_FEATURE_MSR,
   21.60 -
   21.61 -    /**
   21.62 -     *  Physical Address Extensions
   21.63 -     */
   21.64 -    XEN_CPU_FEATURE_PAE,
   21.65 -
   21.66 -    /**
   21.67 -     *  Machine Check Architecture
   21.68 -     */
   21.69 -    XEN_CPU_FEATURE_MCE,
   21.70 -
   21.71 -    /**
   21.72 -     *  CMPXCHG8 instruction
   21.73 -     */
   21.74 -    XEN_CPU_FEATURE_CX8,
   21.75 -
   21.76 -    /**
   21.77 -     *  Onboard APIC
   21.78 -     */
   21.79 -    XEN_CPU_FEATURE_APIC,
   21.80 -
   21.81 -    /**
   21.82 -     *  SYSENTER/SYSEXIT
   21.83 -     */
   21.84 -    XEN_CPU_FEATURE_SEP,
   21.85 -
   21.86 -    /**
   21.87 -     *  Memory Type Range Registers
   21.88 -     */
   21.89 -    XEN_CPU_FEATURE_MTRR,
   21.90 -
   21.91 -    /**
   21.92 -     *  Page Global Enable
   21.93 -     */
   21.94 -    XEN_CPU_FEATURE_PGE,
   21.95 -
   21.96 -    /**
   21.97 -     *  Machine Check Architecture
   21.98 -     */
   21.99 -    XEN_CPU_FEATURE_MCA,
  21.100 -
  21.101 -    /**
  21.102 -     *  CMOV instruction (FCMOVCC and FCOMI too if FPU present)
  21.103 -     */
  21.104 -    XEN_CPU_FEATURE_CMOV,
  21.105 -
  21.106 -    /**
  21.107 -     *  Page Attribute Table
  21.108 -     */
  21.109 -    XEN_CPU_FEATURE_PAT,
  21.110 -
  21.111 -    /**
  21.112 -     *  36-bit PSEs
  21.113 -     */
  21.114 -    XEN_CPU_FEATURE_PSE36,
  21.115 -
  21.116 -    /**
  21.117 -     *  Processor serial number
  21.118 -     */
  21.119 -    XEN_CPU_FEATURE_PN,
  21.120 -
  21.121 -    /**
  21.122 -     *  Supports the CLFLUSH instruction
  21.123 -     */
  21.124 -    XEN_CPU_FEATURE_CLFLSH,
  21.125 -
  21.126 -    /**
  21.127 -     *  Debug Trace Store
  21.128 -     */
  21.129 -    XEN_CPU_FEATURE_DTES,
  21.130 -
  21.131 -    /**
  21.132 -     *  ACPI via MSR
  21.133 -     */
  21.134 -    XEN_CPU_FEATURE_ACPI,
  21.135 -
  21.136 -    /**
  21.137 -     *  Multimedia Extensions
  21.138 -     */
  21.139 -    XEN_CPU_FEATURE_MMX,
  21.140 -
  21.141 -    /**
  21.142 -     *  FXSAVE and FXRSTOR instructions (fast save and restore
  21.143 -     */
  21.144 -    XEN_CPU_FEATURE_FXSR,
  21.145 -
  21.146 -    /**
  21.147 -     *  Streaming SIMD Extensions
  21.148 -     */
  21.149 -    XEN_CPU_FEATURE_XMM,
  21.150 -
  21.151 -    /**
  21.152 -     *  Streaming SIMD Extensions-2
  21.153 -     */
  21.154 -    XEN_CPU_FEATURE_XMM2,
  21.155 -
  21.156 -    /**
  21.157 -     *  CPU self snoop
  21.158 -     */
  21.159 -    XEN_CPU_FEATURE_SELFSNOOP,
  21.160 -
  21.161 -    /**
  21.162 -     *  Hyper-Threading
  21.163 -     */
  21.164 -    XEN_CPU_FEATURE_HT,
  21.165 -
  21.166 -    /**
  21.167 -     *  Automatic clock control
  21.168 -     */
  21.169 -    XEN_CPU_FEATURE_ACC,
  21.170 -
  21.171 -    /**
  21.172 -     *  IA-64 processor
  21.173 -     */
  21.174 -    XEN_CPU_FEATURE_IA64,
  21.175 -
  21.176 -    /**
  21.177 -     *  SYSCALL/SYSRET
  21.178 -     */
  21.179 -    XEN_CPU_FEATURE_SYSCALL,
  21.180 -
  21.181 -    /**
  21.182 -     *  MP Capable.
  21.183 -     */
  21.184 -    XEN_CPU_FEATURE_MP,
  21.185 -
  21.186 -    /**
  21.187 -     *  Execute Disable
  21.188 -     */
  21.189 -    XEN_CPU_FEATURE_NX,
  21.190 -
  21.191 -    /**
  21.192 -     *  AMD MMX extensions
  21.193 -     */
  21.194 -    XEN_CPU_FEATURE_MMXEXT,
  21.195 -
  21.196 -    /**
  21.197 -     *  Long Mode (x86-64)
  21.198 -     */
  21.199 -    XEN_CPU_FEATURE_LM,
  21.200 -
  21.201 -    /**
  21.202 -     *  AMD 3DNow! extensions
  21.203 -     */
  21.204 -    XEN_CPU_FEATURE_THREEDNOWEXT,
  21.205 -
  21.206 -    /**
  21.207 -     *  3DNow!
  21.208 -     */
  21.209 -    XEN_CPU_FEATURE_THREEDNOW,
  21.210 -
  21.211 -    /**
  21.212 -     *  CPU in recovery mode
  21.213 -     */
  21.214 -    XEN_CPU_FEATURE_RECOVERY,
  21.215 -
  21.216 -    /**
  21.217 -     *  Longrun power control
  21.218 -     */
  21.219 -    XEN_CPU_FEATURE_LONGRUN,
  21.220 -
  21.221 -    /**
  21.222 -     *  LongRun table interface
  21.223 -     */
  21.224 -    XEN_CPU_FEATURE_LRTI,
  21.225 -
  21.226 -    /**
  21.227 -     *  Cyrix MMX extensions
  21.228 -     */
  21.229 -    XEN_CPU_FEATURE_CXMMX,
  21.230 -
  21.231 -    /**
  21.232 -     *  AMD K6 nonstandard MTRRs
  21.233 -     */
  21.234 -    XEN_CPU_FEATURE_K6_MTRR,
  21.235 -
  21.236 -    /**
  21.237 -     *  Cyrix ARRs (= MTRRs)
  21.238 -     */
  21.239 -    XEN_CPU_FEATURE_CYRIX_ARR,
  21.240 -
  21.241 -    /**
  21.242 -     *  Centaur MCRs (= MTRRs)
  21.243 -     */
  21.244 -    XEN_CPU_FEATURE_CENTAUR_MCR,
  21.245 -
  21.246 -    /**
  21.247 -     *  Opteron, Athlon64
  21.248 -     */
  21.249 -    XEN_CPU_FEATURE_K8,
  21.250 -
  21.251 -    /**
  21.252 -     *  Athlon
  21.253 -     */
  21.254 -    XEN_CPU_FEATURE_K7,
  21.255 -
  21.256 -    /**
  21.257 -     *  P3
  21.258 -     */
  21.259 -    XEN_CPU_FEATURE_P3,
  21.260 -
  21.261 -    /**
  21.262 -     *  P4
  21.263 -     */
  21.264 -    XEN_CPU_FEATURE_P4,
  21.265 -
  21.266 -    /**
  21.267 -     *  TSC ticks at a constant rate
  21.268 -     */
  21.269 -    XEN_CPU_FEATURE_CONSTANT_TSC,
  21.270 -
  21.271 -    /**
  21.272 -     *  FXSAVE leaks FOP/FIP/FOP
  21.273 -     */
  21.274 -    XEN_CPU_FEATURE_FXSAVE_LEAK,
  21.275 -
  21.276 -    /**
  21.277 -     *  Streaming SIMD Extensions-3
  21.278 -     */
  21.279 -    XEN_CPU_FEATURE_XMM3,
  21.280 -
  21.281 -    /**
  21.282 -     *  Monitor/Mwait support
  21.283 -     */
  21.284 -    XEN_CPU_FEATURE_MWAIT,
  21.285 -
  21.286 -    /**
  21.287 -     *  CPL Qualified Debug Store
  21.288 -     */
  21.289 -    XEN_CPU_FEATURE_DSCPL,
  21.290 -
  21.291 -    /**
  21.292 -     *  Enhanced SpeedStep
  21.293 -     */
  21.294 -    XEN_CPU_FEATURE_EST,
  21.295 -
  21.296 -    /**
  21.297 -     *  Thermal Monitor 2
  21.298 -     */
  21.299 -    XEN_CPU_FEATURE_TM2,
  21.300 -
  21.301 -    /**
  21.302 -     *  Context ID
  21.303 -     */
  21.304 -    XEN_CPU_FEATURE_CID,
  21.305 -
  21.306 -    /**
  21.307 -     *  CMPXCHG16B
  21.308 -     */
  21.309 -    XEN_CPU_FEATURE_CX16,
  21.310 -
  21.311 -    /**
  21.312 -     *  Send Task Priority Messages
  21.313 -     */
  21.314 -    XEN_CPU_FEATURE_XTPR,
  21.315 -
  21.316 -    /**
  21.317 -     *  on-CPU RNG present (xstore insn)
  21.318 -     */
  21.319 -    XEN_CPU_FEATURE_XSTORE,
  21.320 -
  21.321 -    /**
  21.322 -     *  on-CPU RNG enabled
  21.323 -     */
  21.324 -    XEN_CPU_FEATURE_XSTORE_EN,
  21.325 -
  21.326 -    /**
  21.327 -     *  on-CPU crypto (xcrypt insn)
  21.328 -     */
  21.329 -    XEN_CPU_FEATURE_XCRYPT,
  21.330 -
  21.331 -    /**
  21.332 -     *  on-CPU crypto enabled
  21.333 -     */
  21.334 -    XEN_CPU_FEATURE_XCRYPT_EN,
  21.335 -
  21.336 -    /**
  21.337 -     *  LAHF/SAHF in long mode
  21.338 -     */
  21.339 -    XEN_CPU_FEATURE_LAHF_LM,
  21.340 -
  21.341 -    /**
  21.342 -     *  If yes HyperThreading not valid
  21.343 -     */
  21.344 -    XEN_CPU_FEATURE_CMP_LEGACY,
  21.345 -
  21.346 -    /**
  21.347 -     *  VMX instruction set
  21.348 -     */
  21.349 -    XEN_CPU_FEATURE_VMX
  21.350 -};
  21.351 -
  21.352 -
  21.353 -typedef struct xen_cpu_feature_set
  21.354 -{
  21.355 -    size_t size;
  21.356 -    enum xen_cpu_feature contents[];
  21.357 -} xen_cpu_feature_set;
  21.358 -
  21.359 -/**
  21.360 - * Allocate a xen_cpu_feature_set of the given size.
  21.361 - */
  21.362 -extern xen_cpu_feature_set *
  21.363 -xen_cpu_feature_set_alloc(size_t size);
  21.364 -
  21.365 -/**
  21.366 - * Free the given xen_cpu_feature_set.  The given set must have been
  21.367 - * allocated by this library.
  21.368 - */
  21.369 -extern void
  21.370 -xen_cpu_feature_set_free(xen_cpu_feature_set *set);
  21.371 -
  21.372 -
  21.373 -/**
  21.374 - * Return the name corresponding to the given code.  This string must
  21.375 - * not be modified or freed.
  21.376 - */
  21.377 -extern const char *
  21.378 -xen_cpu_feature_to_string(enum xen_cpu_feature val);
  21.379 -
  21.380 -
  21.381 -/**
  21.382 - * Return the correct code for the given string, or set the session
  21.383 - * object to failure and return an undefined value if the given string does
  21.384 - * not match a known code.
  21.385 - */
  21.386 -extern enum xen_cpu_feature
  21.387 -xen_cpu_feature_from_string(xen_session *session, const char *str);
  21.388 -
  21.389 -
  21.390 -#endif
    22.1 --- a/tools/libxen/include/xen_cpu_feature_internal.h	Tue Jan 30 23:35:32 2007 -0700
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,37 +0,0 @@
    22.4 -/*
    22.5 - * Copyright (c) 2006, XenSource Inc.
    22.6 - *
    22.7 - * This library is free software; you can redistribute it and/or
    22.8 - * modify it under the terms of the GNU Lesser General Public
    22.9 - * License as published by the Free Software Foundation; either
   22.10 - * version 2.1 of the License, or (at your option) any later version.
   22.11 - *
   22.12 - * This library is distributed in the hope that it will be useful,
   22.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   22.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   22.15 - * Lesser General Public License for more details.
   22.16 - *
   22.17 - * You should have received a copy of the GNU Lesser General Public
   22.18 - * License along with this library; if not, write to the Free Software
   22.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   22.20 - */
   22.21 -
   22.22 -
   22.23 -/*
   22.24 - * Declarations of the abstract types used during demarshalling of enum
   22.25 - * xen_cpu_feature.  Internal to this library -- do not use from outside.
   22.26 - */
   22.27 -
   22.28 -
   22.29 -#ifndef XEN_CPU_FEATURE_INTERNAL_H
   22.30 -#define XEN_CPU_FEATURE_INTERNAL_H
   22.31 -
   22.32 -
   22.33 -#include "xen_internal.h"
   22.34 -
   22.35 -
   22.36 -extern const abstract_type xen_cpu_feature_abstract_type_;
   22.37 -extern const abstract_type xen_cpu_feature_set_abstract_type_;
   22.38 -
   22.39 -
   22.40 -#endif
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/tools/libxen/include/xen_crashdump.h	Wed Jan 31 10:30:54 2007 -0700
    23.3 @@ -0,0 +1,206 @@
    23.4 +/*
    23.5 + * Copyright (c) 2006, XenSource Inc.
    23.6 + *
    23.7 + * This library is free software; you can redistribute it and/or
    23.8 + * modify it under the terms of the GNU Lesser General Public
    23.9 + * License as published by the Free Software Foundation; either
   23.10 + * version 2.1 of the License, or (at your option) any later version.
   23.11 + *
   23.12 + * This library is distributed in the hope that it will be useful,
   23.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   23.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   23.15 + * Lesser General Public License for more details.
   23.16 + *
   23.17 + * You should have received a copy of the GNU Lesser General Public
   23.18 + * License along with this library; if not, write to the Free Software
   23.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   23.20 + */
   23.21 +
   23.22 +#ifndef XEN_CRASHDUMP_H
   23.23 +#define XEN_CRASHDUMP_H
   23.24 +
   23.25 +#include "xen_common.h"
   23.26 +#include "xen_crashdump_decl.h"
   23.27 +#include "xen_vdi_decl.h"
   23.28 +#include "xen_vm_decl.h"
   23.29 +
   23.30 +
   23.31 +/*
   23.32 + * The crashdump class.
   23.33 + * 
   23.34 + * A VM crashdump.
   23.35 + */
   23.36 +
   23.37 +
   23.38 +/**
   23.39 + * Free the given xen_crashdump.  The given handle must have been
   23.40 + * allocated by this library.
   23.41 + */
   23.42 +extern void
   23.43 +xen_crashdump_free(xen_crashdump crashdump);
   23.44 +
   23.45 +
   23.46 +typedef struct xen_crashdump_set
   23.47 +{
   23.48 +    size_t size;
   23.49 +    xen_crashdump *contents[];
   23.50 +} xen_crashdump_set;
   23.51 +
   23.52 +/**
   23.53 + * Allocate a xen_crashdump_set of the given size.
   23.54 + */
   23.55 +extern xen_crashdump_set *
   23.56 +xen_crashdump_set_alloc(size_t size);
   23.57 +
   23.58 +/**
   23.59 + * Free the given xen_crashdump_set.  The given set must have been
   23.60 + * allocated by this library.
   23.61 + */
   23.62 +extern void
   23.63 +xen_crashdump_set_free(xen_crashdump_set *set);
   23.64 +
   23.65 +
   23.66 +typedef struct xen_crashdump_record
   23.67 +{
   23.68 +    xen_crashdump handle;
   23.69 +    char *uuid;
   23.70 +    struct xen_vm_record_opt *vm;
   23.71 +    struct xen_vdi_record_opt *vdi;
   23.72 +} xen_crashdump_record;
   23.73 +
   23.74 +/**
   23.75 + * Allocate a xen_crashdump_record.
   23.76 + */
   23.77 +extern xen_crashdump_record *
   23.78 +xen_crashdump_record_alloc(void);
   23.79 +
   23.80 +/**
   23.81 + * Free the given xen_crashdump_record, and all referenced values.  The
   23.82 + * given record must have been allocated by this library.
   23.83 + */
   23.84 +extern void
   23.85 +xen_crashdump_record_free(xen_crashdump_record *record);
   23.86 +
   23.87 +
   23.88 +typedef struct xen_crashdump_record_opt
   23.89 +{
   23.90 +    bool is_record;
   23.91 +    union
   23.92 +    {
   23.93 +        xen_crashdump handle;
   23.94 +        xen_crashdump_record *record;
   23.95 +    } u;
   23.96 +} xen_crashdump_record_opt;
   23.97 +
   23.98 +/**
   23.99 + * Allocate a xen_crashdump_record_opt.
  23.100 + */
  23.101 +extern xen_crashdump_record_opt *
  23.102 +xen_crashdump_record_opt_alloc(void);
  23.103 +
  23.104 +/**
  23.105 + * Free the given xen_crashdump_record_opt, and all referenced values. 
  23.106 + * The given record_opt must have been allocated by this library.
  23.107 + */
  23.108 +extern void
  23.109 +xen_crashdump_record_opt_free(xen_crashdump_record_opt *record_opt);
  23.110 +
  23.111 +
  23.112 +typedef struct xen_crashdump_record_set
  23.113 +{
  23.114 +    size_t size;
  23.115 +    xen_crashdump_record *contents[];
  23.116 +} xen_crashdump_record_set;
  23.117 +
  23.118 +/**
  23.119 + * Allocate a xen_crashdump_record_set of the given size.
  23.120 + */
  23.121 +extern xen_crashdump_record_set *
  23.122 +xen_crashdump_record_set_alloc(size_t size);
  23.123 +
  23.124 +/**
  23.125 + * Free the given xen_crashdump_record_set, and all referenced values. 
  23.126 + * The given set must have been allocated by this library.
  23.127 + */
  23.128 +extern void
  23.129 +xen_crashdump_record_set_free(xen_crashdump_record_set *set);
  23.130 +
  23.131 +
  23.132 +
  23.133 +typedef struct xen_crashdump_record_opt_set
  23.134 +{
  23.135 +    size_t size;
  23.136 +    xen_crashdump_record_opt *contents[];
  23.137 +} xen_crashdump_record_opt_set;
  23.138 +
  23.139 +/**
  23.140 + * Allocate a xen_crashdump_record_opt_set of the given size.
  23.141 + */
  23.142 +extern xen_crashdump_record_opt_set *
  23.143 +xen_crashdump_record_opt_set_alloc(size_t size);
  23.144 +
  23.145 +/**
  23.146 + * Free the given xen_crashdump_record_opt_set, and all referenced
  23.147 + * values.  The given set must have been allocated by this library.
  23.148 + */
  23.149 +extern void
  23.150 +xen_crashdump_record_opt_set_free(xen_crashdump_record_opt_set *set);
  23.151 +
  23.152 +
  23.153 +/**
  23.154 + * Get a record containing the current state of the given crashdump.
  23.155 + */
  23.156 +extern bool
  23.157 +xen_crashdump_get_record(xen_session *session, xen_crashdump_record **result, xen_crashdump crashdump);
  23.158 +
  23.159 +
  23.160 +/**
  23.161 + * Get a reference to the crashdump instance with the specified UUID.
  23.162 + */
  23.163 +extern bool
  23.164 +xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uuid);
  23.165 +
  23.166 +
  23.167 +/**
  23.168 + * Create a new crashdump instance, and return its handle.
  23.169 + */
  23.170 +extern bool
  23.171 +xen_crashdump_create(xen_session *session, xen_crashdump *result, xen_crashdump_record *record);
  23.172 +
  23.173 +
  23.174 +/**
  23.175 + * Destroy the specified crashdump instance.
  23.176 + */
  23.177 +extern bool
  23.178 +xen_crashdump_destroy(xen_session *session, xen_crashdump crashdump);
  23.179 +
  23.180 +
  23.181 +/**
  23.182 + * Get the uuid field of the given crashdump.
  23.183 + */
  23.184 +extern bool
  23.185 +xen_crashdump_get_uuid(xen_session *session, char **result, xen_crashdump crashdump);
  23.186 +
  23.187 +
  23.188 +/**
  23.189 + * Get the VM field of the given crashdump.
  23.190 + */
  23.191 +extern bool
  23.192 +xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump);
  23.193 +
  23.194 +
  23.195 +/**
  23.196 + * Get the VDI field of the given crashdump.
  23.197 + */
  23.198 +extern bool
  23.199 +xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump);
  23.200 +
  23.201 +
  23.202 +/**
  23.203 + * Return a list of all the crashdumps known to the system.
  23.204 + */
  23.205 +extern bool
  23.206 +xen_crashdump_get_all(xen_session *session, struct xen_crashdump_set **result);
  23.207 +
  23.208 +
  23.209 +#endif
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/tools/libxen/include/xen_crashdump_decl.h	Wed Jan 31 10:30:54 2007 -0700
    24.3 @@ -0,0 +1,30 @@
    24.4 +/*
    24.5 + * Copyright (c) 2006, XenSource Inc.
    24.6 + *
    24.7 + * This library is free software; you can redistribute it and/or
    24.8 + * modify it under the terms of the GNU Lesser General Public
    24.9 + * License as published by the Free Software Foundation; either
   24.10 + * version 2.1 of the License, or (at your option) any later version.
   24.11 + *
   24.12 + * This library is distributed in the hope that it will be useful,
   24.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   24.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   24.15 + * Lesser General Public License for more details.
   24.16 + *
   24.17 + * You should have received a copy of the GNU Lesser General Public
   24.18 + * License along with this library; if not, write to the Free Software
   24.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   24.20 + */
   24.21 +
   24.22 +#ifndef XEN_CRASHDUMP_DECL_H
   24.23 +#define XEN_CRASHDUMP_DECL_H
   24.24 +
   24.25 +typedef void *xen_crashdump;
   24.26 +
   24.27 +struct xen_crashdump_set;
   24.28 +struct xen_crashdump_record;
   24.29 +struct xen_crashdump_record_set;
   24.30 +struct xen_crashdump_record_opt;
   24.31 +struct xen_crashdump_record_opt_set;
   24.32 +
   24.33 +#endif
    25.1 --- a/tools/libxen/include/xen_driver_type.h	Tue Jan 30 23:35:32 2007 -0700
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,77 +0,0 @@
    25.4 -/*
    25.5 - * Copyright (c) 2006, XenSource Inc.
    25.6 - *
    25.7 - * This library is free software; you can redistribute it and/or
    25.8 - * modify it under the terms of the GNU Lesser General Public
    25.9 - * License as published by the Free Software Foundation; either
   25.10 - * version 2.1 of the License, or (at your option) any later version.
   25.11 - *
   25.12 - * This library is distributed in the hope that it will be useful,
   25.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   25.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   25.15 - * Lesser General Public License for more details.
   25.16 - *
   25.17 - * You should have received a copy of the GNU Lesser General Public
   25.18 - * License along with this library; if not, write to the Free Software
   25.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   25.20 - */
   25.21 -
   25.22 -#ifndef XEN_DRIVER_TYPE_H
   25.23 -#define XEN_DRIVER_TYPE_H
   25.24 -
   25.25 -
   25.26 -#include "xen_common.h"
   25.27 -
   25.28 -
   25.29 -enum xen_driver_type
   25.30 -{
   25.31 -    /**
   25.32 -     * use hardware emulation
   25.33 -     */
   25.34 -    XEN_DRIVER_TYPE_IOEMU,
   25.35 -
   25.36 -    /**
   25.37 -     * use paravirtualised driver
   25.38 -     */
   25.39 -    XEN_DRIVER_TYPE_PARAVIRTUALISED
   25.40 -};
   25.41 -
   25.42 -
   25.43 -typedef struct xen_driver_type_set
   25.44 -{
   25.45 -    size_t size;
   25.46 -    enum xen_driver_type contents[];
   25.47 -} xen_driver_type_set;
   25.48 -
   25.49 -/**
   25.50 - * Allocate a xen_driver_type_set of the given size.
   25.51 - */
   25.52 -extern xen_driver_type_set *
   25.53 -xen_driver_type_set_alloc(size_t size);
   25.54 -
   25.55 -/**
   25.56 - * Free the given xen_driver_type_set.  The given set must have been
   25.57 - * allocated by this library.
   25.58 - */
   25.59 -extern void
   25.60 -xen_driver_type_set_free(xen_driver_type_set *set);
   25.61 -
   25.62 -
   25.63 -/**
   25.64 - * Return the name corresponding to the given code.  This string must
   25.65 - * not be modified or freed.
   25.66 - */
   25.67 -extern const char *
   25.68 -xen_driver_type_to_string(enum xen_driver_type val);
   25.69 -
   25.70 -
   25.71 -/**
   25.72 - * Return the correct code for the given string, or set the session
   25.73 - * object to failure and return an undefined value if the given string does
   25.74 - * not match a known code.
   25.75 - */
   25.76 -extern enum xen_driver_type
   25.77 -xen_driver_type_from_string(xen_session *session, const char *str);
   25.78 -
   25.79 -
   25.80 -#endif
    26.1 --- a/tools/libxen/include/xen_driver_type_internal.h	Tue Jan 30 23:35:32 2007 -0700
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,37 +0,0 @@
    26.4 -/*
    26.5 - * Copyright (c) 2006, XenSource Inc.
    26.6 - *
    26.7 - * This library is free software; you can redistribute it and/or
    26.8 - * modify it under the terms of the GNU Lesser General Public
    26.9 - * License as published by the Free Software Foundation; either
   26.10 - * version 2.1 of the License, or (at your option) any later version.
   26.11 - *
   26.12 - * This library is distributed in the hope that it will be useful,
   26.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   26.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   26.15 - * Lesser General Public License for more details.
   26.16 - *
   26.17 - * You should have received a copy of the GNU Lesser General Public
   26.18 - * License along with this library; if not, write to the Free Software
   26.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   26.20 - */
   26.21 -
   26.22 -
   26.23 -/*
   26.24 - * Declarations of the abstract types used during demarshalling of enum
   26.25 - * xen_driver_type.  Internal to this library -- do not use from outside.
   26.26 - */
   26.27 -
   26.28 -
   26.29 -#ifndef XEN_DRIVER_TYPE_INTERNAL_H
   26.30 -#define XEN_DRIVER_TYPE_INTERNAL_H
   26.31 -
   26.32 -
   26.33 -#include "xen_internal.h"
   26.34 -
   26.35 -
   26.36 -extern const abstract_type xen_driver_type_abstract_type_;
   26.37 -extern const abstract_type xen_driver_type_set_abstract_type_;
   26.38 -
   26.39 -
   26.40 -#endif
    27.1 --- a/tools/libxen/include/xen_host.h	Tue Jan 30 23:35:32 2007 -0700
    27.2 +++ b/tools/libxen/include/xen_host.h	Wed Jan 31 10:30:54 2007 -0700
    27.3 @@ -22,14 +22,17 @@
    27.4  #include "xen_common.h"
    27.5  #include "xen_host_cpu_decl.h"
    27.6  #include "xen_host_decl.h"
    27.7 +#include "xen_host_metrics_decl.h"
    27.8 +#include "xen_pbd_decl.h"
    27.9  #include "xen_pif_decl.h"
   27.10 +#include "xen_sr_decl.h"
   27.11  #include "xen_string_string_map.h"
   27.12  #include "xen_vm_decl.h"
   27.13  
   27.14  
   27.15  /*
   27.16 - * The host class. 
   27.17 - *  
   27.18 + * The host class.
   27.19 + * 
   27.20   * A physical host.
   27.21   */
   27.22  
   27.23 @@ -69,9 +72,15 @@ typedef struct xen_host_record
   27.24      char *name_label;
   27.25      char *name_description;
   27.26      xen_string_string_map *software_version;
   27.27 +    xen_string_string_map *other_config;
   27.28      struct xen_vm_record_opt_set *resident_vms;
   27.29 +    xen_string_string_map *logging;
   27.30      struct xen_pif_record_opt_set *pifs;
   27.31 +    struct xen_sr_record_opt *suspend_image_sr;
   27.32 +    struct xen_sr_record_opt *crash_dump_sr;
   27.33 +    struct xen_pbd_record_opt_set *pbds;
   27.34      struct xen_host_cpu_record_opt_set *host_cpus;
   27.35 +    struct xen_host_metrics_record_opt *metrics;
   27.36  } xen_host_record;
   27.37  
   27.38  /**
   27.39 @@ -217,6 +226,13 @@ xen_host_get_software_version(xen_sessio
   27.40  
   27.41  
   27.42  /**
   27.43 + * Get the other_config field of the given host.
   27.44 + */
   27.45 +extern bool
   27.46 +xen_host_get_other_config(xen_session *session, xen_string_string_map **result, xen_host host);
   27.47 +
   27.48 +
   27.49 +/**
   27.50   * Get the resident_VMs field of the given host.
   27.51   */
   27.52  extern bool
   27.53 @@ -224,6 +240,13 @@ xen_host_get_resident_vms(xen_session *s
   27.54  
   27.55  
   27.56  /**
   27.57 + * Get the logging field of the given host.
   27.58 + */
   27.59 +extern bool
   27.60 +xen_host_get_logging(xen_session *session, xen_string_string_map **result, xen_host host);
   27.61 +
   27.62 +
   27.63 +/**
   27.64   * Get the PIFs field of the given host.
   27.65   */
   27.66  extern bool
   27.67 @@ -231,6 +254,27 @@ xen_host_get_pifs(xen_session *session, 
   27.68  
   27.69  
   27.70  /**
   27.71 + * Get the suspend_image_sr field of the given host.
   27.72 + */
   27.73 +extern bool
   27.74 +xen_host_get_suspend_image_sr(xen_session *session, xen_sr *result, xen_host host);
   27.75 +
   27.76 +
   27.77 +/**
   27.78 + * Get the crash_dump_sr field of the given host.
   27.79 + */
   27.80 +extern bool
   27.81 +xen_host_get_crash_dump_sr(xen_session *session, xen_sr *result, xen_host host);
   27.82 +
   27.83 +
   27.84 +/**
   27.85 + * Get the PBDs field of the given host.
   27.86 + */
   27.87 +extern bool
   27.88 +xen_host_get_pbds(xen_session *session, struct xen_pbd_set **result, xen_host host);
   27.89 +
   27.90 +
   27.91 +/**
   27.92   * Get the host_CPUs field of the given host.
   27.93   */
   27.94  extern bool
   27.95 @@ -238,6 +282,13 @@ xen_host_get_host_cpus(xen_session *sess
   27.96  
   27.97  
   27.98  /**
   27.99 + * Get the metrics field of the given host.
  27.100 + */
  27.101 +extern bool
  27.102 +xen_host_get_metrics(xen_session *session, xen_host_metrics *result, xen_host host);
  27.103 +
  27.104 +
  27.105 +/**
  27.106   * Set the name/label field of the given host.
  27.107   */
  27.108  extern bool
  27.109 @@ -252,6 +303,66 @@ xen_host_set_name_description(xen_sessio
  27.110  
  27.111  
  27.112  /**
  27.113 + * Set the other_config field of the given host.
  27.114 + */
  27.115 +extern bool
  27.116 +xen_host_set_other_config(xen_session *session, xen_host host, xen_string_string_map *other_config);
  27.117 +
  27.118 +
  27.119 +/**
  27.120 + * Add the given key-value pair to the other_config field of the given
  27.121 + * host.
  27.122 + */
  27.123 +extern bool
  27.124 +xen_host_add_to_other_config(xen_session *session, xen_host host, char *key, char *value);
  27.125 +
  27.126 +
  27.127 +/**
  27.128 + * Remove the given key and its corresponding value from the
  27.129 + * other_config field of the given host.  If the key is not in that Map, then
  27.130 + * do nothing.
  27.131 + */
  27.132 +extern bool
  27.133 +xen_host_remove_from_other_config(xen_session *session, xen_host host, char *key);
  27.134 +
  27.135 +
  27.136 +/**
  27.137 + * Set the logging field of the given host.
  27.138 + */
  27.139 +extern bool
  27.140 +xen_host_set_logging(xen_session *session, xen_host host, xen_string_string_map *logging);
  27.141 +
  27.142 +
  27.143 +/**
  27.144 + * Add the given key-value pair to the logging field of the given host.
  27.145 + */
  27.146 +extern bool
  27.147 +xen_host_add_to_logging(xen_session *session, xen_host host, char *key, char *value);
  27.148 +
  27.149 +
  27.150 +/**
  27.151 + * Remove the given key and its corresponding value from the logging
  27.152 + * field of the given host.  If the key is not in that Map, then do nothing.
  27.153 + */
  27.154 +extern bool
  27.155 +xen_host_remove_from_logging(xen_session *session, xen_host host, char *key);
  27.156 +
  27.157 +
  27.158 +/**
  27.159 + * Set the suspend_image_sr field of the given host.
  27.160 + */
  27.161 +extern bool
  27.162 +xen_host_set_suspend_image_sr(xen_session *session, xen_host host, xen_sr suspend_image_sr);
  27.163 +
  27.164 +
  27.165 +/**
  27.166 + * Set the crash_dump_sr field of the given host.
  27.167 + */
  27.168 +extern bool
  27.169 +xen_host_set_crash_dump_sr(xen_session *session, xen_host host, xen_sr crash_dump_sr);
  27.170 +
  27.171 +
  27.172 +/**
  27.173   * Puts the host into a state in which no new VMs can be started.
  27.174   * Currently active VMs on the host continue to execute.
  27.175   */
    28.1 --- a/tools/libxen/include/xen_host_cpu.h	Tue Jan 30 23:35:32 2007 -0700
    28.2 +++ b/tools/libxen/include/xen_host_cpu.h	Wed Jan 31 10:30:54 2007 -0700
    28.3 @@ -20,7 +20,6 @@
    28.4  #define XEN_HOST_CPU_H
    28.5  
    28.6  #include "xen_common.h"
    28.7 -#include "xen_cpu_feature.h"
    28.8  #include "xen_host_cpu_decl.h"
    28.9  #include "xen_host_decl.h"
   28.10  
   28.11 @@ -69,7 +68,6 @@ typedef struct xen_host_cpu_record
   28.12      char *vendor;
   28.13      int64_t speed;
   28.14      char *modelname;
   28.15 -    struct xen_cpu_feature_set *features;
   28.16      double utilisation;
   28.17  } xen_host_cpu_record;
   28.18  
   28.19 @@ -223,13 +221,6 @@ xen_host_cpu_get_modelname(xen_session *
   28.20  
   28.21  
   28.22  /**
   28.23 - * Get the features field of the given host_cpu.
   28.24 - */
   28.25 -extern bool
   28.26 -xen_host_cpu_get_features(xen_session *session, struct xen_cpu_feature_set **result, xen_host_cpu host_cpu);
   28.27 -
   28.28 -
   28.29 -/**
   28.30   * Get the utilisation field of the given host_cpu.
   28.31   */
   28.32  extern bool
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/tools/libxen/include/xen_host_metrics.h	Wed Jan 31 10:30:54 2007 -0700
    29.3 @@ -0,0 +1,193 @@
    29.4 +/*
    29.5 + * Copyright (c) 2006, XenSource Inc.
    29.6 + *
    29.7 + * This library is free software; you can redistribute it and/or
    29.8 + * modify it under the terms of the GNU Lesser General Public
    29.9 + * License as published by the Free Software Foundation; either
   29.10 + * version 2.1 of the License, or (at your option) any later version.
   29.11 + *
   29.12 + * This library is distributed in the hope that it will be useful,
   29.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   29.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   29.15 + * Lesser General Public License for more details.
   29.16 + *
   29.17 + * You should have received a copy of the GNU Lesser General Public
   29.18 + * License along with this library; if not, write to the Free Software
   29.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   29.20 + */
   29.21 +
   29.22 +#ifndef XEN_HOST_METRICS_H
   29.23 +#define XEN_HOST_METRICS_H
   29.24 +
   29.25 +#include "xen_common.h"
   29.26 +#include "xen_host_decl.h"
   29.27 +#include "xen_host_metrics_decl.h"
   29.28 +
   29.29 +
   29.30 +/*
   29.31 + * The host_metrics class.
   29.32 + * 
   29.33 + * The metrics associated with a host.
   29.34 + */
   29.35 +
   29.36 +
   29.37 +/**
   29.38 + * Free the given xen_host_metrics.  The given handle must have been
   29.39 + * allocated by this library.
   29.40 + */
   29.41 +extern void
   29.42 +xen_host_metrics_free(xen_host_metrics host_metrics);
   29.43 +
   29.44 +
   29.45 +typedef struct xen_host_metrics_set
   29.46 +{
   29.47 +    size_t size;
   29.48 +    xen_host_metrics *contents[];
   29.49 +} xen_host_metrics_set;
   29.50 +
   29.51 +/**
   29.52 + * Allocate a xen_host_metrics_set of the given size.
   29.53 + */
   29.54 +extern xen_host_metrics_set *
   29.55 +xen_host_metrics_set_alloc(size_t size);
   29.56 +
   29.57 +/**
   29.58 + * Free the given xen_host_metrics_set.  The given set must have been
   29.59 + * allocated by this library.
   29.60 + */
   29.61 +extern void
   29.62 +xen_host_metrics_set_free(xen_host_metrics_set *set);
   29.63 +
   29.64 +
   29.65 +typedef struct xen_host_metrics_record
   29.66 +{
   29.67 +    xen_host_metrics handle;
   29.68 +    char *uuid;
   29.69 +    struct xen_host_record_opt *host;
   29.70 +    int64_t memory_total;
   29.71 +    int64_t memory_free;
   29.72 +} xen_host_metrics_record;
   29.73 +
   29.74 +/**
   29.75 + * Allocate a xen_host_metrics_record.
   29.76 + */
   29.77 +extern xen_host_metrics_record *
   29.78 +xen_host_metrics_record_alloc(void);
   29.79 +
   29.80 +/**
   29.81 + * Free the given xen_host_metrics_record, and all referenced values. 
   29.82 + * The given record must have been allocated by this library.
   29.83 + */
   29.84 +extern void
   29.85 +xen_host_metrics_record_free(xen_host_metrics_record *record);
   29.86 +
   29.87 +
   29.88 +typedef struct xen_host_metrics_record_opt
   29.89 +{
   29.90 +    bool is_record;
   29.91 +    union
   29.92 +    {
   29.93 +        xen_host_metrics handle;
   29.94 +        xen_host_metrics_record *record;
   29.95 +    } u;
   29.96 +} xen_host_metrics_record_opt;
   29.97 +
   29.98 +/**
   29.99 + * Allocate a xen_host_metrics_record_opt.
  29.100 + */
  29.101 +extern xen_host_metrics_record_opt *
  29.102 +xen_host_metrics_record_opt_alloc(void);
  29.103 +
  29.104 +/**
  29.105 + * Free the given xen_host_metrics_record_opt, and all referenced
  29.106 + * values.  The given record_opt must have been allocated by this library.
  29.107 + */
  29.108 +extern void
  29.109 +xen_host_metrics_record_opt_free(xen_host_metrics_record_opt *record_opt);
  29.110 +
  29.111 +
  29.112 +typedef struct xen_host_metrics_record_set
  29.113 +{
  29.114 +    size_t size;
  29.115 +    xen_host_metrics_record *contents[];
  29.116 +} xen_host_metrics_record_set;
  29.117 +
  29.118 +/**
  29.119 + * Allocate a xen_host_metrics_record_set of the given size.
  29.120 + */
  29.121 +extern xen_host_metrics_record_set *
  29.122 +xen_host_metrics_record_set_alloc(size_t size);
  29.123 +
  29.124 +/**
  29.125 + * Free the given xen_host_metrics_record_set, and all referenced
  29.126 + * values.  The given set must have been allocated by this library.
  29.127 + */
  29.128 +extern void
  29.129 +xen_host_metrics_record_set_free(xen_host_metrics_record_set *set);
  29.130 +
  29.131 +
  29.132 +
  29.133 +typedef struct xen_host_metrics_record_opt_set
  29.134 +{
  29.135 +    size_t size;
  29.136 +    xen_host_metrics_record_opt *contents[];
  29.137 +} xen_host_metrics_record_opt_set;
  29.138 +
  29.139 +/**
  29.140 + * Allocate a xen_host_metrics_record_opt_set of the given size.
  29.141 + */
  29.142 +extern xen_host_metrics_record_opt_set *
  29.143 +xen_host_metrics_record_opt_set_alloc(size_t size);
  29.144 +
  29.145 +/**
  29.146 + * Free the given xen_host_metrics_record_opt_set, and all referenced
  29.147 + * values.  The given set must have been allocated by this library.
  29.148 + */
  29.149 +extern void
  29.150 +xen_host_metrics_record_opt_set_free(xen_host_metrics_record_opt_set *set);
  29.151 +
  29.152 +
  29.153 +/**
  29.154 + * Get a record containing the current state of the given host_metrics.
  29.155 + */
  29.156 +extern bool
  29.157 +xen_host_metrics_get_record(xen_session *session, xen_host_metrics_record **result, xen_host_metrics host_metrics);
  29.158 +
  29.159 +
  29.160 +/**
  29.161 + * Get a reference to the host_metrics instance with the specified
  29.162 + * UUID.
  29.163 + */
  29.164 +extern bool
  29.165 +xen_host_metrics_get_by_uuid(xen_session *session, xen_host_metrics *result, char *uuid);
  29.166 +
  29.167 +
  29.168 +/**
  29.169 + * Get the uuid field of the given host_metrics.
  29.170 + */
  29.171 +extern bool
  29.172 +xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics);
  29.173 +
  29.174 +
  29.175 +/**
  29.176 + * Get the host field of the given host_metrics.
  29.177 + */
  29.178 +extern bool
  29.179 +xen_host_metrics_get_host(xen_session *session, xen_host *result, xen_host_metrics host_metrics);
  29.180 +
  29.181 +
  29.182 +/**
  29.183 + * Get the memory/total field of the given host_metrics.
  29.184 + */
  29.185 +extern bool
  29.186 +xen_host_metrics_get_memory_total(xen_session *session, int64_t *result, xen_host_metrics host_metrics);
  29.187 +
  29.188 +
  29.189 +/**
  29.190 + * Get the memory/free field of the given host_metrics.
  29.191 + */
  29.192 +extern bool
  29.193 +xen_host_metrics_get_memory_free(xen_session *session, int64_t *result, xen_host_metrics host_metrics);
  29.194 +
  29.195 +
  29.196 +#endif
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/tools/libxen/include/xen_host_metrics_decl.h	Wed Jan 31 10:30:54 2007 -0700
    30.3 @@ -0,0 +1,30 @@
    30.4 +/*
    30.5 + * Copyright (c) 2006, XenSource Inc.
    30.6 + *
    30.7 + * This library is free software; you can redistribute it and/or
    30.8 + * modify it under the terms of the GNU Lesser General Public
    30.9 + * License as published by the Free Software Foundation; either
   30.10 + * version 2.1 of the License, or (at your option) any later version.
   30.11 + *
   30.12 + * This library is distributed in the hope that it will be useful,
   30.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   30.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   30.15 + * Lesser General Public License for more details.
   30.16 + *
   30.17 + * You should have received a copy of the GNU Lesser General Public
   30.18 + * License along with this library; if not, write to the Free Software
   30.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   30.20 + */
   30.21 +
   30.22 +#ifndef XEN_HOST_METRICS_DECL_H
   30.23 +#define XEN_HOST_METRICS_DECL_H
   30.24 +
   30.25 +typedef void *xen_host_metrics;
   30.26 +
   30.27 +struct xen_host_metrics_set;
   30.28 +struct xen_host_metrics_record;
   30.29 +struct xen_host_metrics_record_set;
   30.30 +struct xen_host_metrics_record_opt;
   30.31 +struct xen_host_metrics_record_opt_set;
   30.32 +
   30.33 +#endif
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/tools/libxen/include/xen_pbd.h	Wed Jan 31 10:30:54 2007 -0700
    31.3 @@ -0,0 +1,216 @@
    31.4 +/*
    31.5 + * Copyright (c) 2006, XenSource Inc.
    31.6 + *
    31.7 + * This library is free software; you can redistribute it and/or
    31.8 + * modify it under the terms of the GNU Lesser General Public
    31.9 + * License as published by the Free Software Foundation; either
   31.10 + * version 2.1 of the License, or (at your option) any later version.
   31.11 + *
   31.12 + * This library is distributed in the hope that it will be useful,
   31.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   31.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   31.15 + * Lesser General Public License for more details.
   31.16 + *
   31.17 + * You should have received a copy of the GNU Lesser General Public
   31.18 + * License along with this library; if not, write to the Free Software
   31.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   31.20 + */
   31.21 +
   31.22 +#ifndef XEN_PBD_H
   31.23 +#define XEN_PBD_H
   31.24 +
   31.25 +#include "xen_common.h"
   31.26 +#include "xen_host_decl.h"
   31.27 +#include "xen_pbd_decl.h"
   31.28 +#include "xen_sr_decl.h"
   31.29 +#include "xen_string_string_map.h"
   31.30 +
   31.31 +
   31.32 +/*
   31.33 + * The PBD class.
   31.34 + * 
   31.35 + * The physical block devices through which hosts access SRs.
   31.36 + */
   31.37 +
   31.38 +
   31.39 +/**
   31.40 + * Free the given xen_pbd.  The given handle must have been allocated
   31.41 + * by this library.
   31.42 + */
   31.43 +extern void
   31.44 +xen_pbd_free(xen_pbd pbd);
   31.45 +
   31.46 +
   31.47 +typedef struct xen_pbd_set
   31.48 +{
   31.49 +    size_t size;
   31.50 +    xen_pbd *contents[];
   31.51 +} xen_pbd_set;
   31.52 +
   31.53 +/**
   31.54 + * Allocate a xen_pbd_set of the given size.
   31.55 + */
   31.56 +extern xen_pbd_set *
   31.57 +xen_pbd_set_alloc(size_t size);
   31.58 +
   31.59 +/**
   31.60 + * Free the given xen_pbd_set.  The given set must have been allocated
   31.61 + * by this library.
   31.62 + */
   31.63 +extern void
   31.64 +xen_pbd_set_free(xen_pbd_set *set);
   31.65 +
   31.66 +
   31.67 +typedef struct xen_pbd_record
   31.68 +{
   31.69 +    xen_pbd handle;
   31.70 +    char *uuid;
   31.71 +    struct xen_host_record_opt *host;
   31.72 +    struct xen_sr_record_opt *sr;
   31.73 +    xen_string_string_map *device_config;
   31.74 +    bool currently_attached;
   31.75 +} xen_pbd_record;
   31.76 +
   31.77 +/**
   31.78 + * Allocate a xen_pbd_record.
   31.79 + */
   31.80 +extern xen_pbd_record *
   31.81 +xen_pbd_record_alloc(void);
   31.82 +
   31.83 +/**
   31.84 + * Free the given xen_pbd_record, and all referenced values.  The given
   31.85 + * record must have been allocated by this library.
   31.86 + */
   31.87 +extern void
   31.88 +xen_pbd_record_free(xen_pbd_record *record);
   31.89 +
   31.90 +
   31.91 +typedef struct xen_pbd_record_opt
   31.92 +{
   31.93 +    bool is_record;
   31.94 +    union
   31.95 +    {
   31.96 +        xen_pbd handle;
   31.97 +        xen_pbd_record *record;
   31.98 +    } u;
   31.99 +} xen_pbd_record_opt;
  31.100 +
  31.101 +/**
  31.102 + * Allocate a xen_pbd_record_opt.
  31.103 + */
  31.104 +extern xen_pbd_record_opt *
  31.105 +xen_pbd_record_opt_alloc(void);
  31.106 +
  31.107 +/**
  31.108 + * Free the given xen_pbd_record_opt, and all referenced values.  The
  31.109 + * given record_opt must have been allocated by this library.
  31.110 + */
  31.111 +extern void
  31.112 +xen_pbd_record_opt_free(xen_pbd_record_opt *record_opt);
  31.113 +
  31.114 +
  31.115 +typedef struct xen_pbd_record_set
  31.116 +{
  31.117 +    size_t size;
  31.118 +    xen_pbd_record *contents[];
  31.119 +} xen_pbd_record_set;
  31.120 +
  31.121 +/**
  31.122 + * Allocate a xen_pbd_record_set of the given size.
  31.123 + */
  31.124 +extern xen_pbd_record_set *
  31.125 +xen_pbd_record_set_alloc(size_t size);
  31.126 +
  31.127 +/**
  31.128 + * Free the given xen_pbd_record_set, and all referenced values.  The
  31.129 + * given set must have been allocated by this library.
  31.130 + */
  31.131 +extern void
  31.132 +xen_pbd_record_set_free(xen_pbd_record_set *set);
  31.133 +
  31.134 +
  31.135 +
  31.136 +typedef struct xen_pbd_record_opt_set
  31.137 +{
  31.138 +    size_t size;
  31.139 +    xen_pbd_record_opt *contents[];
  31.140 +} xen_pbd_record_opt_set;
  31.141 +
  31.142 +/**
  31.143 + * Allocate a xen_pbd_record_opt_set of the given size.
  31.144 + */
  31.145 +extern xen_pbd_record_opt_set *
  31.146 +xen_pbd_record_opt_set_alloc(size_t size);
  31.147 +
  31.148 +/**
  31.149 + * Free the given xen_pbd_record_opt_set, and all referenced values. 
  31.150 + * The given set must have been allocated by this library.
  31.151 + */
  31.152 +extern void
  31.153 +xen_pbd_record_opt_set_free(xen_pbd_record_opt_set *set);
  31.154 +
  31.155 +
  31.156 +/**
  31.157 + * Get a record containing the current state of the given PBD.
  31.158 + */
  31.159 +extern bool
  31.160 +xen_pbd_get_record(xen_session *session, xen_pbd_record **result, xen_pbd pbd);
  31.161 +
  31.162 +
  31.163 +/**
  31.164 + * Get a reference to the PBD instance with the specified UUID.
  31.165 + */
  31.166 +extern bool
  31.167 +xen_pbd_get_by_uuid(xen_session *session, xen_pbd *result, char *uuid);
  31.168 +
  31.169 +
  31.170 +/**
  31.171 + * Create a new PBD instance, and return its handle.
  31.172 + */
  31.173 +extern bool
  31.174 +xen_pbd_create(xen_session *session, xen_pbd *result, xen_pbd_record *record);
  31.175 +
  31.176 +
  31.177 +/**
  31.178 + * Destroy the specified PBD instance.
  31.179 + */
  31.180 +extern bool
  31.181 +xen_pbd_destroy(xen_session *session, xen_pbd pbd);
  31.182 +
  31.183 +
  31.184 +/**
  31.185 + * Get the uuid field of the given PBD.
  31.186 + */
  31.187 +extern bool
  31.188 +xen_pbd_get_uuid(xen_session *session, char **result, xen_pbd pbd);
  31.189 +
  31.190 +
  31.191 +/**
  31.192 + * Get the host field of the given PBD.
  31.193 + */
  31.194 +extern bool
  31.195 +xen_pbd_get_host(xen_session *session, xen_host *result, xen_pbd pbd);
  31.196 +
  31.197 +
  31.198 +/**
  31.199 + * Get the SR field of the given PBD.
  31.200 + */
  31.201 +extern bool
  31.202 +xen_pbd_get_sr(xen_session *session, xen_sr *result, xen_pbd pbd);
  31.203 +
  31.204 +
  31.205 +/**
  31.206 + * Get the device_config field of the given PBD.
  31.207 + */
  31.208 +extern bool
  31.209 +xen_pbd_get_device_config(xen_session *session, xen_string_string_map **result, xen_pbd pbd);
  31.210 +
  31.211 +
  31.212 +/**
  31.213 + * Get the currently_attached field of the given PBD.
  31.214 + */
  31.215 +extern bool
  31.216 +xen_pbd_get_currently_attached(xen_session *session, bool *result, xen_pbd pbd);
  31.217 +
  31.218 +
  31.219 +#endif
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/tools/libxen/include/xen_pbd_decl.h	Wed Jan 31 10:30:54 2007 -0700
    32.3 @@ -0,0 +1,30 @@
    32.4 +/*
    32.5 + * Copyright (c) 2006, XenSource Inc.
    32.6 + *
    32.7 + * This library is free software; you can redistribute it and/or
    32.8 + * modify it under the terms of the GNU Lesser General Public
    32.9 + * License as published by the Free Software Foundation; either
   32.10 + * version 2.1 of the License, or (at your option) any later version.
   32.11 + *
   32.12 + * This library is distributed in the hope that it will be useful,
   32.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   32.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   32.15 + * Lesser General Public License for more details.
   32.16 + *
   32.17 + * You should have received a copy of the GNU Lesser General Public
   32.18 + * License along with this library; if not, write to the Free Software
   32.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   32.20 + */
   32.21 +
   32.22 +#ifndef XEN_PBD_DECL_H
   32.23 +#define XEN_PBD_DECL_H
   32.24 +
   32.25 +typedef void *xen_pbd;
   32.26 +
   32.27 +struct xen_pbd_set;
   32.28 +struct xen_pbd_record;
   32.29 +struct xen_pbd_record_set;
   32.30 +struct xen_pbd_record_opt;
   32.31 +struct xen_pbd_record_opt_set;
   32.32 +
   32.33 +#endif
    33.1 --- a/tools/libxen/include/xen_pif.h	Tue Jan 30 23:35:32 2007 -0700
    33.2 +++ b/tools/libxen/include/xen_pif.h	Wed Jan 31 10:30:54 2007 -0700
    33.3 @@ -23,11 +23,12 @@
    33.4  #include "xen_host_decl.h"
    33.5  #include "xen_network_decl.h"
    33.6  #include "xen_pif_decl.h"
    33.7 +#include "xen_pif_metrics_decl.h"
    33.8  
    33.9  
   33.10  /*
   33.11 - * The PIF class. 
   33.12 - *  
   33.13 + * The PIF class.
   33.14 + * 
   33.15   * A physical network interface (note separate VLANs are represented as
   33.16   * several PIFs).
   33.17   */
   33.18 @@ -65,14 +66,13 @@ typedef struct xen_pif_record
   33.19  {
   33.20      xen_pif handle;
   33.21      char *uuid;
   33.22 -    char *name;
   33.23 +    char *device;
   33.24      struct xen_network_record_opt *network;
   33.25      struct xen_host_record_opt *host;
   33.26      char *mac;
   33.27      int64_t mtu;
   33.28 -    char *vlan;
   33.29 -    double io_read_kbs;
   33.30 -    double io_write_kbs;
   33.31 +    int64_t vlan;
   33.32 +    struct xen_pif_metrics_record_opt *metrics;
   33.33  } xen_pif_record;
   33.34  
   33.35  /**
   33.36 @@ -169,20 +169,6 @@ xen_pif_get_by_uuid(xen_session *session
   33.37  
   33.38  
   33.39  /**
   33.40 - * Create a new PIF instance, and return its handle.
   33.41 - */
   33.42 -extern bool
   33.43 -xen_pif_create(xen_session *session, xen_pif *result, xen_pif_record *record);
   33.44 -
   33.45 -
   33.46 -/**
   33.47 - * Destroy the specified PIF instance.
   33.48 - */
   33.49 -extern bool
   33.50 -xen_pif_destroy(xen_session *session, xen_pif pif);
   33.51 -
   33.52 -
   33.53 -/**
   33.54   * Get the uuid field of the given PIF.
   33.55   */
   33.56  extern bool
   33.57 @@ -190,10 +176,10 @@ xen_pif_get_uuid(xen_session *session, c
   33.58  
   33.59  
   33.60  /**
   33.61 - * Get the name field of the given PIF.
   33.62 + * Get the device field of the given PIF.
   33.63   */
   33.64  extern bool
   33.65 -xen_pif_get_name(xen_session *session, char **result, xen_pif pif);
   33.66 +xen_pif_get_device(xen_session *session, char **result, xen_pif pif);
   33.67  
   33.68  
   33.69  /**
   33.70 @@ -228,42 +214,21 @@ xen_pif_get_mtu(xen_session *session, in
   33.71   * Get the VLAN field of the given PIF.
   33.72   */
   33.73  extern bool
   33.74 -xen_pif_get_vlan(xen_session *session, char **result, xen_pif pif);
   33.75 -
   33.76 -
   33.77 -/**
   33.78 - * Get the io/read_kbs field of the given PIF.
   33.79 - */
   33.80 -extern bool
   33.81 -xen_pif_get_io_read_kbs(xen_session *session, double *result, xen_pif pif);
   33.82 -
   33.83 -
   33.84 -/**
   33.85 - * Get the io/write_kbs field of the given PIF.
   33.86 - */
   33.87 -extern bool
   33.88 -xen_pif_get_io_write_kbs(xen_session *session, double *result, xen_pif pif);
   33.89 +xen_pif_get_vlan(xen_session *session, int64_t *result, xen_pif pif);
   33.90  
   33.91  
   33.92  /**
   33.93 - * Set the name field of the given PIF.
   33.94 + * Get the metrics field of the given PIF.
   33.95   */
   33.96  extern bool
   33.97 -xen_pif_set_name(xen_session *session, xen_pif pif, char *name);
   33.98 +xen_pif_get_metrics(xen_session *session, xen_pif_metrics *result, xen_pif pif);
   33.99  
  33.100  
  33.101  /**
  33.102 - * Set the network field of the given PIF.
  33.103 + * Set the device field of the given PIF.
  33.104   */
  33.105  extern bool
  33.106 -xen_pif_set_network(xen_session *session, xen_pif pif, xen_network network);
  33.107 -
  33.108 -
  33.109 -/**
  33.110 - * Set the host field of the given PIF.
  33.111 - */
  33.112 -extern bool
  33.113 -xen_pif_set_host(xen_session *session, xen_pif pif, xen_host host);
  33.114 +xen_pif_set_device(xen_session *session, xen_pif pif, char *device);
  33.115  
  33.116  
  33.117  /**
  33.118 @@ -284,7 +249,22 @@ xen_pif_set_mtu(xen_session *session, xe
  33.119   * Set the VLAN field of the given PIF.
  33.120   */
  33.121  extern bool
  33.122 -xen_pif_set_vlan(xen_session *session, xen_pif pif, char *vlan);
  33.123 +xen_pif_set_vlan(xen_session *session, xen_pif pif, int64_t vlan);
  33.124 +
  33.125 +
  33.126 +/**
  33.127 + * Create a VLAN interface from an existing physical interface
  33.128 + */
  33.129 +extern bool
  33.130 +xen_pif_create_vlan(xen_session *session, xen_pif *result, char *device, xen_network network, xen_host host, int64_t vlan);
  33.131 +
  33.132 +
  33.133 +/**
  33.134 + * Destroy the interface (provided it is a synthetic interface like a
  33.135 + * VLAN; fail if it is a physical interface)
  33.136 + */
  33.137 +extern bool
  33.138 +xen_pif_destroy(xen_session *session, xen_pif self);
  33.139  
  33.140  
  33.141  #endif
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/tools/libxen/include/xen_pif_metrics.h	Wed Jan 31 10:30:54 2007 -0700
    34.3 @@ -0,0 +1,192 @@
    34.4 +/*
    34.5 + * Copyright (c) 2006, XenSource Inc.
    34.6 + *
    34.7 + * This library is free software; you can redistribute it and/or
    34.8 + * modify it under the terms of the GNU Lesser General Public
    34.9 + * License as published by the Free Software Foundation; either
   34.10 + * version 2.1 of the License, or (at your option) any later version.
   34.11 + *
   34.12 + * This library is distributed in the hope that it will be useful,
   34.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   34.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   34.15 + * Lesser General Public License for more details.
   34.16 + *
   34.17 + * You should have received a copy of the GNU Lesser General Public
   34.18 + * License along with this library; if not, write to the Free Software
   34.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   34.20 + */
   34.21 +
   34.22 +#ifndef XEN_PIF_METRICS_H
   34.23 +#define XEN_PIF_METRICS_H
   34.24 +
   34.25 +#include "xen_common.h"
   34.26 +#include "xen_pif_decl.h"
   34.27 +#include "xen_pif_metrics_decl.h"
   34.28 +
   34.29 +
   34.30 +/*
   34.31 + * The PIF_metrics class.
   34.32 + * 
   34.33 + * The metrics associated with a physical network interface.
   34.34 + */
   34.35 +
   34.36 +
   34.37 +/**
   34.38 + * Free the given xen_pif_metrics.  The given handle must have been
   34.39 + * allocated by this library.
   34.40 + */
   34.41 +extern void
   34.42 +xen_pif_metrics_free(xen_pif_metrics pif_metrics);
   34.43 +
   34.44 +
   34.45 +typedef struct xen_pif_metrics_set
   34.46 +{
   34.47 +    size_t size;
   34.48 +    xen_pif_metrics *contents[];
   34.49 +} xen_pif_metrics_set;
   34.50 +
   34.51 +/**
   34.52 + * Allocate a xen_pif_metrics_set of the given size.
   34.53 + */
   34.54 +extern xen_pif_metrics_set *
   34.55 +xen_pif_metrics_set_alloc(size_t size);
   34.56 +
   34.57 +/**
   34.58 + * Free the given xen_pif_metrics_set.  The given set must have been
   34.59 + * allocated by this library.
   34.60 + */
   34.61 +extern void
   34.62 +xen_pif_metrics_set_free(xen_pif_metrics_set *set);
   34.63 +
   34.64 +
   34.65 +typedef struct xen_pif_metrics_record
   34.66 +{
   34.67 +    xen_pif_metrics handle;
   34.68 +    char *uuid;
   34.69 +    struct xen_pif_record_opt *pif;
   34.70 +    double io_read_kbs;
   34.71 +    double io_write_kbs;
   34.72 +} xen_pif_metrics_record;
   34.73 +
   34.74 +/**
   34.75 + * Allocate a xen_pif_metrics_record.
   34.76 + */
   34.77 +extern xen_pif_metrics_record *
   34.78 +xen_pif_metrics_record_alloc(void);
   34.79 +
   34.80 +/**
   34.81 + * Free the given xen_pif_metrics_record, and all referenced values. 
   34.82 + * The given record must have been allocated by this library.
   34.83 + */
   34.84 +extern void
   34.85 +xen_pif_metrics_record_free(xen_pif_metrics_record *record);
   34.86 +
   34.87 +
   34.88 +typedef struct xen_pif_metrics_record_opt
   34.89 +{
   34.90 +    bool is_record;
   34.91 +    union
   34.92 +    {
   34.93 +        xen_pif_metrics handle;
   34.94 +        xen_pif_metrics_record *record;
   34.95 +    } u;
   34.96 +} xen_pif_metrics_record_opt;
   34.97 +
   34.98 +/**
   34.99 + * Allocate a xen_pif_metrics_record_opt.
  34.100 + */
  34.101 +extern xen_pif_metrics_record_opt *
  34.102 +xen_pif_metrics_record_opt_alloc(void);
  34.103 +
  34.104 +/**
  34.105 + * Free the given xen_pif_metrics_record_opt, and all referenced
  34.106 + * values.  The given record_opt must have been allocated by this library.
  34.107 + */
  34.108 +extern void
  34.109 +xen_pif_metrics_record_opt_free(xen_pif_metrics_record_opt *record_opt);
  34.110 +
  34.111 +
  34.112 +typedef struct xen_pif_metrics_record_set
  34.113 +{
  34.114 +    size_t size;
  34.115 +    xen_pif_metrics_record *contents[];
  34.116 +} xen_pif_metrics_record_set;
  34.117 +
  34.118 +/**
  34.119 + * Allocate a xen_pif_metrics_record_set of the given size.
  34.120 + */
  34.121 +extern xen_pif_metrics_record_set *
  34.122 +xen_pif_metrics_record_set_alloc(size_t size);
  34.123 +
  34.124 +/**
  34.125 + * Free the given xen_pif_metrics_record_set, and all referenced
  34.126 + * values.  The given set must have been allocated by this library.
  34.127 + */
  34.128 +extern void
  34.129 +xen_pif_metrics_record_set_free(xen_pif_metrics_record_set *set);
  34.130 +
  34.131 +
  34.132 +
  34.133 +typedef struct xen_pif_metrics_record_opt_set
  34.134 +{
  34.135 +    size_t size;
  34.136 +    xen_pif_metrics_record_opt *contents[];
  34.137 +} xen_pif_metrics_record_opt_set;
  34.138 +
  34.139 +/**
  34.140 + * Allocate a xen_pif_metrics_record_opt_set of the given size.
  34.141 + */
  34.142 +extern xen_pif_metrics_record_opt_set *
  34.143 +xen_pif_metrics_record_opt_set_alloc(size_t size);
  34.144 +
  34.145 +/**
  34.146 + * Free the given xen_pif_metrics_record_opt_set, and all referenced
  34.147 + * values.  The given set must have been allocated by this library.
  34.148 + */
  34.149 +extern void
  34.150 +xen_pif_metrics_record_opt_set_free(xen_pif_metrics_record_opt_set *set);
  34.151 +
  34.152 +
  34.153 +/**
  34.154 + * Get a record containing the current state of the given PIF_metrics.
  34.155 + */
  34.156 +extern bool
  34.157 +xen_pif_metrics_get_record(xen_session *session, xen_pif_metrics_record **result, xen_pif_metrics pif_metrics);
  34.158 +
  34.159 +
  34.160 +/**
  34.161 + * Get a reference to the PIF_metrics instance with the specified UUID.
  34.162 + */
  34.163 +extern bool
  34.164 +xen_pif_metrics_get_by_uuid(xen_session *session, xen_pif_metrics *result, char *uuid);
  34.165 +
  34.166 +
  34.167 +/**
  34.168 + * Get the uuid field of the given PIF_metrics.
  34.169 + */
  34.170 +extern bool
  34.171 +xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics);
  34.172 +
  34.173 +
  34.174 +/**
  34.175 + * Get the PIF field of the given PIF_metrics.
  34.176 + */
  34.177 +extern bool
  34.178 +xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics pif_metrics);
  34.179 +
  34.180 +
  34.181 +/**
  34.182 + * Get the io/read_kbs field of the given PIF_metrics.
  34.183 + */
  34.184 +extern bool
  34.185 +xen_pif_metrics_get_io_read_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics);
  34.186 +
  34.187 +
  34.188 +/**
  34.189 + * Get the io/write_kbs field of the given PIF_metrics.
  34.190 + */
  34.191 +extern bool
  34.192 +xen_pif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics);
  34.193 +
  34.194 +
  34.195 +#endif
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/tools/libxen/include/xen_pif_metrics_decl.h	Wed Jan 31 10:30:54 2007 -0700
    35.3 @@ -0,0 +1,30 @@
    35.4 +/*
    35.5 + * Copyright (c) 2006, XenSource Inc.
    35.6 + *
    35.7 + * This library is free software; you can redistribute it and/or
    35.8 + * modify it under the terms of the GNU Lesser General Public
    35.9 + * License as published by the Free Software Foundation; either
   35.10 + * version 2.1 of the License, or (at your option) any later version.
   35.11 + *
   35.12 + * This library is distributed in the hope that it will be useful,
   35.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   35.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   35.15 + * Lesser General Public License for more details.
   35.16 + *
   35.17 + * You should have received a copy of the GNU Lesser General Public
   35.18 + * License along with this library; if not, write to the Free Software
   35.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   35.20 + */
   35.21 +
   35.22 +#ifndef XEN_PIF_METRICS_DECL_H
   35.23 +#define XEN_PIF_METRICS_DECL_H
   35.24 +
   35.25 +typedef void *xen_pif_metrics;
   35.26 +
   35.27 +struct xen_pif_metrics_set;
   35.28 +struct xen_pif_metrics_record;
   35.29 +struct xen_pif_metrics_record_set;
   35.30 +struct xen_pif_metrics_record_opt;
   35.31 +struct xen_pif_metrics_record_opt_set;
   35.32 +
   35.33 +#endif
    36.1 --- a/tools/libxen/include/xen_sr.h	Tue Jan 30 23:35:32 2007 -0700
    36.2 +++ b/tools/libxen/include/xen_sr.h	Wed Jan 31 10:30:54 2007 -0700
    36.3 @@ -20,13 +20,14 @@
    36.4  #define XEN_SR_H
    36.5  
    36.6  #include "xen_common.h"
    36.7 +#include "xen_pbd_decl.h"
    36.8  #include "xen_sr_decl.h"
    36.9  #include "xen_vdi_decl.h"
   36.10  
   36.11  
   36.12  /*
   36.13 - * The SR class. 
   36.14 - *  
   36.15 + * The SR class.
   36.16 + * 
   36.17   * A storage repository.
   36.18   */
   36.19  
   36.20 @@ -66,6 +67,7 @@ typedef struct xen_sr_record
   36.21      char *name_label;
   36.22      char *name_description;
   36.23      struct xen_vdi_record_opt_set *vdis;
   36.24 +    struct xen_pbd_record_opt_set *pbds;
   36.25      int64_t virtual_allocation;
   36.26      int64_t physical_utilisation;
   36.27      int64_t physical_size;
   36.28 @@ -216,6 +218,13 @@ xen_sr_get_vdis(xen_session *session, st
   36.29  
   36.30  
   36.31  /**
   36.32 + * Get the PBDs field of the given SR.
   36.33 + */
   36.34 +extern bool
   36.35 +xen_sr_get_pbds(xen_session *session, struct xen_pbd_set **result, xen_sr sr);
   36.36 +
   36.37 +
   36.38 +/**
   36.39   * Get the virtual_allocation field of the given SR.
   36.40   */
   36.41  extern bool
    37.1 --- a/tools/libxen/include/xen_vbd.h	Tue Jan 30 23:35:32 2007 -0700
    37.2 +++ b/tools/libxen/include/xen_vbd.h	Wed Jan 31 10:30:54 2007 -0700
    37.3 @@ -20,7 +20,6 @@
    37.4  #define XEN_VBD_H
    37.5  
    37.6  #include "xen_common.h"
    37.7 -#include "xen_driver_type.h"
    37.8  #include "xen_vbd_decl.h"
    37.9  #include "xen_vbd_mode.h"
   37.10  #include "xen_vdi_decl.h"
   37.11 @@ -28,8 +27,8 @@
   37.12  
   37.13  
   37.14  /*
   37.15 - * The VBD class. 
   37.16 - *  
   37.17 + * The VBD class.
   37.18 + * 
   37.19   * A virtual block device.
   37.20   */
   37.21  
   37.22 @@ -70,8 +69,8 @@ typedef struct xen_vbd_record
   37.23      struct xen_vdi_record_opt *vdi;
   37.24      char *device;
   37.25      char *image;
   37.26 +    bool bootable;
   37.27      enum xen_vbd_mode mode;
   37.28 -    enum xen_driver_type driver;
   37.29      double io_read_kbs;
   37.30      double io_write_kbs;
   37.31  } xen_vbd_record;
   37.32 @@ -212,6 +211,13 @@ xen_vbd_get_device(xen_session *session,
   37.33  
   37.34  
   37.35  /**
   37.36 + * Get the bootable field of the given VBD.
   37.37 + */
   37.38 +extern bool
   37.39 +xen_vbd_get_bootable(xen_session *session, bool *result, xen_vbd vbd);
   37.40 +
   37.41 +
   37.42 +/**
   37.43   * Get the mode field of the given VBD.
   37.44   */
   37.45  extern bool
   37.46 @@ -219,13 +225,6 @@ xen_vbd_get_mode(xen_session *session, e
   37.47  
   37.48  
   37.49  /**
   37.50 - * Get the driver field of the given VBD.
   37.51 - */
   37.52 -extern bool
   37.53 -xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd);
   37.54 -
   37.55 -
   37.56 -/**
   37.57   * Get the io/read_kbs field of the given VBD.
   37.58   */
   37.59  extern bool
   37.60 @@ -240,20 +239,6 @@ xen_vbd_get_io_write_kbs(xen_session *se
   37.61  
   37.62  
   37.63  /**
   37.64 - * Set the VM field of the given VBD.
   37.65 - */
   37.66 -extern bool
   37.67 -xen_vbd_set_vm(xen_session *session, xen_vbd vbd, xen_vm vm);
   37.68 -
   37.69 -
   37.70 -/**
   37.71 - * Set the VDI field of the given VBD.
   37.72 - */
   37.73 -extern bool
   37.74 -xen_vbd_set_vdi(xen_session *session, xen_vbd vbd, xen_vdi vdi);
   37.75 -
   37.76 -
   37.77 -/**
   37.78   * Set the device field of the given VBD.
   37.79   */
   37.80  extern bool
   37.81 @@ -261,6 +246,13 @@ xen_vbd_set_device(xen_session *session,
   37.82  
   37.83  
   37.84  /**
   37.85 + * Set the bootable field of the given VBD.
   37.86 + */
   37.87 +extern bool
   37.88 +xen_vbd_set_bootable(xen_session *session, xen_vbd vbd, bool bootable);
   37.89 +
   37.90 +
   37.91 +/**
   37.92   * Set the mode field of the given VBD.
   37.93   */
   37.94  extern bool
   37.95 @@ -268,13 +260,6 @@ xen_vbd_set_mode(xen_session *session, x
   37.96  
   37.97  
   37.98  /**
   37.99 - * Set the driver field of the given VBD.
  37.100 - */
  37.101 -extern bool
  37.102 -xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver);
  37.103 -
  37.104 -
  37.105 -/**
  37.106   * Change the media in the device for CDROM-like devices only. For
  37.107   * other devices, detach the VBD and attach a new one
  37.108   */
    38.1 --- a/tools/libxen/include/xen_vdi.h	Tue Jan 30 23:35:32 2007 -0700
    38.2 +++ b/tools/libxen/include/xen_vdi.h	Wed Jan 31 10:30:54 2007 -0700
    38.3 @@ -20,6 +20,7 @@
    38.4  #define XEN_VDI_H
    38.5  
    38.6  #include "xen_common.h"
    38.7 +#include "xen_crashdump_decl.h"
    38.8  #include "xen_sr_decl.h"
    38.9  #include "xen_vbd_decl.h"
   38.10  #include "xen_vdi_decl.h"
   38.11 @@ -27,8 +28,8 @@
   38.12  
   38.13  
   38.14  /*
   38.15 - * The VDI class. 
   38.16 - *  
   38.17 + * The VDI class.
   38.18 + * 
   38.19   * A virtual disk image.
   38.20   */
   38.21  
   38.22 @@ -69,12 +70,11 @@ typedef struct xen_vdi_record
   38.23      char *name_description;
   38.24      struct xen_sr_record_opt *sr;
   38.25      struct xen_vbd_record_opt_set *vbds;
   38.26 +    struct xen_crashdump_record_opt_set *crash_dumps;
   38.27      int64_t virtual_size;
   38.28      int64_t physical_utilisation;
   38.29      int64_t sector_size;
   38.30      enum xen_vdi_type type;
   38.31 -    struct xen_vdi_record_opt *parent;
   38.32 -    struct xen_vdi_record_opt_set *children;
   38.33      bool sharable;
   38.34      bool read_only;
   38.35  } xen_vdi_record;
   38.36 @@ -229,6 +229,13 @@ xen_vdi_get_vbds(xen_session *session, s
   38.37  
   38.38  
   38.39  /**
   38.40 + * Get the crash_dumps field of the given VDI.
   38.41 + */
   38.42 +extern bool
   38.43 +xen_vdi_get_crash_dumps(xen_session *session, struct xen_crashdump_set **result, xen_vdi vdi);
   38.44 +
   38.45 +
   38.46 +/**
   38.47   * Get the virtual_size field of the given VDI.
   38.48   */
   38.49  extern bool
   38.50 @@ -257,20 +264,6 @@ xen_vdi_get_type(xen_session *session, e
   38.51  
   38.52  
   38.53  /**
   38.54 - * Get the parent field of the given VDI.
   38.55 - */
   38.56 -extern bool
   38.57 -xen_vdi_get_parent(xen_session *session, xen_vdi *result, xen_vdi vdi);
   38.58 -
   38.59 -
   38.60 -/**
   38.61 - * Get the children field of the given VDI.
   38.62 - */
   38.63 -extern bool
   38.64 -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi);
   38.65 -
   38.66 -
   38.67 -/**
   38.68   * Get the sharable field of the given VDI.
   38.69   */
   38.70  extern bool
    39.1 --- a/tools/libxen/include/xen_vdi_type.h	Tue Jan 30 23:35:32 2007 -0700
    39.2 +++ b/tools/libxen/include/xen_vdi_type.h	Wed Jan 31 10:30:54 2007 -0700
    39.3 @@ -38,7 +38,17 @@ enum xen_vdi_type
    39.4      /**
    39.5       * a disk that may be reformatted on upgrade
    39.6       */
    39.7 -    XEN_VDI_TYPE_EPHEMERAL
    39.8 +    XEN_VDI_TYPE_EPHEMERAL,
    39.9 +
   39.10 +    /**
   39.11 +     * a disk that stores a suspend image
   39.12 +     */
   39.13 +    XEN_VDI_TYPE_SUSPEND,
   39.14 +
   39.15 +    /**
   39.16 +     * a disk that stores VM crashdump information
   39.17 +     */
   39.18 +    XEN_VDI_TYPE_CRASHDUMP
   39.19  };
   39.20  
   39.21  
    40.1 --- a/tools/libxen/include/xen_vif.h	Tue Jan 30 23:35:32 2007 -0700
    40.2 +++ b/tools/libxen/include/xen_vif.h	Wed Jan 31 10:30:54 2007 -0700
    40.3 @@ -20,15 +20,14 @@
    40.4  #define XEN_VIF_H
    40.5  
    40.6  #include "xen_common.h"
    40.7 -#include "xen_driver_type.h"
    40.8  #include "xen_network_decl.h"
    40.9  #include "xen_vif_decl.h"
   40.10  #include "xen_vm_decl.h"
   40.11  
   40.12  
   40.13  /*
   40.14 - * The VIF class. 
   40.15 - *  
   40.16 + * The VIF class.
   40.17 + * 
   40.18   * A virtual network interface.
   40.19   */
   40.20  
   40.21 @@ -65,8 +64,6 @@ typedef struct xen_vif_record
   40.22  {
   40.23      xen_vif handle;
   40.24      char *uuid;
   40.25 -    char *name;
   40.26 -    enum xen_driver_type type;
   40.27      char *device;
   40.28      struct xen_network_record_opt *network;
   40.29      struct xen_vm_record_opt *vm;
   40.30 @@ -191,20 +188,6 @@ xen_vif_get_uuid(xen_session *session, c
   40.31  
   40.32  
   40.33  /**
   40.34 - * Get the name field of the given VIF.
   40.35 - */
   40.36 -extern bool
   40.37 -xen_vif_get_name(xen_session *session, char **result, xen_vif vif);
   40.38 -
   40.39 -
   40.40 -/**
   40.41 - * Get the type field of the given VIF.
   40.42 - */
   40.43 -extern bool
   40.44 -xen_vif_get_type(xen_session *session, enum xen_driver_type *result, xen_vif vif);
   40.45 -
   40.46 -
   40.47 -/**
   40.48   * Get the device field of the given VIF.
   40.49   */
   40.50  extern bool
   40.51 @@ -254,20 +237,6 @@ xen_vif_get_io_write_kbs(xen_session *se
   40.52  
   40.53  
   40.54  /**
   40.55 - * Set the name field of the given VIF.
   40.56 - */
   40.57 -extern bool
   40.58 -xen_vif_set_name(xen_session *session, xen_vif vif, char *name);
   40.59 -
   40.60 -
   40.61 -/**
   40.62 - * Set the type field of the given VIF.
   40.63 - */
   40.64 -extern bool
   40.65 -xen_vif_set_type(xen_session *session, xen_vif vif, enum xen_driver_type type);
   40.66 -
   40.67 -
   40.68 -/**
   40.69   * Set the device field of the given VIF.
   40.70   */
   40.71  extern bool
   40.72 @@ -275,20 +244,6 @@ xen_vif_set_device(xen_session *session,
   40.73  
   40.74  
   40.75  /**
   40.76 - * Set the network field of the given VIF.
   40.77 - */
   40.78 -extern bool
   40.79 -xen_vif_set_network(xen_session *session, xen_vif vif, xen_network network);
   40.80 -
   40.81 -
   40.82 -/**
   40.83 - * Set the VM field of the given VIF.
   40.84 - */
   40.85 -extern bool
   40.86 -xen_vif_set_vm(xen_session *session, xen_vif vif, xen_vm vm);
   40.87 -
   40.88 -
   40.89 -/**
   40.90   * Set the MAC field of the given VIF.
   40.91   */
   40.92  extern bool
    41.1 --- a/tools/libxen/include/xen_vm.h	Tue Jan 30 23:35:32 2007 -0700
    41.2 +++ b/tools/libxen/include/xen_vm.h	Wed Jan 31 10:30:54 2007 -0700
    41.3 @@ -21,15 +21,17 @@
    41.4  
    41.5  #include "xen_common.h"
    41.6  #include "xen_console_decl.h"
    41.7 -#include "xen_cpu_feature.h"
    41.8 +#include "xen_crashdump_decl.h"
    41.9  #include "xen_host_decl.h"
   41.10  #include "xen_int_float_map.h"
   41.11  #include "xen_on_crash_behaviour.h"
   41.12  #include "xen_on_normal_exit.h"
   41.13  #include "xen_string_string_map.h"
   41.14  #include "xen_vbd_decl.h"
   41.15 +#include "xen_vdi_decl.h"
   41.16  #include "xen_vif_decl.h"
   41.17  #include "xen_vm_decl.h"
   41.18 +#include "xen_vm_metrics_decl.h"
   41.19  #include "xen_vm_power_state.h"
   41.20  #include "xen_vtpm_decl.h"
   41.21  
   41.22 @@ -51,7 +53,10 @@
   41.23   * PV/ramdisk, PV/args and PV/bootloader_args will be passed to the bootloader
   41.24   * unmodified, and interpretation of those fields is then specific to the
   41.25   * bootloader itself, including the possibility that the bootloader will
   41.26 - * ignore some or all of those given values.
   41.27 + * ignore some or all of those given values. Finally the paths of all bootable
   41.28 + * disks are added to the bootloader commandline (a disk is bootable if its
   41.29 + * VBD has the bootable flag set). There may be zero, one or many bootable
   41.30 + * disks; the bootloader decides which disk (if any) to boot from.
   41.31   * 
   41.32   * If the bootloader is pygrub, then the menu.lst is parsed if present in the
   41.33   * guest's filesystem, otherwise the specified kernel and ramdisk are used, or
   41.34 @@ -106,27 +111,25 @@ typedef struct xen_vm_record
   41.35      int64_t user_version;
   41.36      bool is_a_template;
   41.37      bool auto_power_on;
   41.38 +    struct xen_vdi_record_opt *suspend_vdi;
   41.39      struct xen_host_record_opt *resident_on;
   41.40      int64_t memory_static_max;
   41.41      int64_t memory_dynamic_max;
   41.42 -    int64_t memory_actual;
   41.43      int64_t memory_dynamic_min;
   41.44      int64_t memory_static_min;
   41.45      char *vcpus_policy;
   41.46 -    char *vcpus_params;
   41.47 +    xen_string_string_map *vcpus_params;
   41.48 +    int64_t vcpus_max;
   41.49 +    int64_t vcpus_at_startup;
   41.50      int64_t vcpus_number;
   41.51      xen_int_float_map *vcpus_utilisation;
   41.52 -    struct xen_cpu_feature_set *vcpus_features_required;
   41.53 -    struct xen_cpu_feature_set *vcpus_features_can_use;
   41.54 -    struct xen_cpu_feature_set *vcpus_features_force_on;
   41.55 -    struct xen_cpu_feature_set *vcpus_features_force_off;
   41.56      enum xen_on_normal_exit actions_after_shutdown;
   41.57      enum xen_on_normal_exit actions_after_reboot;
   41.58 -    enum xen_on_normal_exit actions_after_suspend;
   41.59      enum xen_on_crash_behaviour actions_after_crash;
   41.60      struct xen_console_record_opt_set *consoles;
   41.61      struct xen_vif_record_opt_set *vifs;
   41.62      struct xen_vbd_record_opt_set *vbds;
   41.63 +    struct xen_crashdump_record_opt_set *crash_dumps;
   41.64      struct xen_vtpm_record_opt_set *vtpms;
   41.65      char *pv_bootloader;
   41.66      char *pv_kernel;
   41.67 @@ -141,7 +144,9 @@ typedef struct xen_vm_record
   41.68      bool platform_enable_audio;
   41.69      char *pci_bus;
   41.70      xen_string_string_map *tools_version;
   41.71 -    xen_string_string_map *otherconfig;
   41.72 +    xen_string_string_map *other_config;
   41.73 +    bool is_control_domain;
   41.74 +    struct xen_vm_metrics_record_opt *metrics;
   41.75  } xen_vm_record;
   41.76  
   41.77  /**
   41.78 @@ -310,6 +315,13 @@ xen_vm_get_auto_power_on(xen_session *se
   41.79  
   41.80  
   41.81  /**
   41.82 + * Get the suspend_VDI field of the given VM.
   41.83 + */
   41.84 +extern bool
   41.85 +xen_vm_get_suspend_vdi(xen_session *session, xen_vdi *result, xen_vm vm);
   41.86 +
   41.87 +
   41.88 +/**
   41.89   * Get the resident_on field of the given VM.
   41.90   */
   41.91  extern bool
   41.92 @@ -331,13 +343,6 @@ xen_vm_get_memory_dynamic_max(xen_sessio
   41.93  
   41.94  
   41.95  /**
   41.96 - * Get the memory/actual field of the given VM.
   41.97 - */
   41.98 -extern bool
   41.99 -xen_vm_get_memory_actual(xen_session *session, int64_t *result, xen_vm vm);
  41.100 -
  41.101 -
  41.102 -/**
  41.103   * Get the memory/dynamic_min field of the given VM.
  41.104   */
  41.105  extern bool
  41.106 @@ -362,7 +367,21 @@ xen_vm_get_vcpus_policy(xen_session *ses
  41.107   * Get the VCPUs/params field of the given VM.
  41.108   */
  41.109  extern bool
  41.110 -xen_vm_get_vcpus_params(xen_session *session, char **result, xen_vm vm);
  41.111 +xen_vm_get_vcpus_params(xen_session *session, xen_string_string_map **result, xen_vm vm);
  41.112 +
  41.113 +
  41.114 +/**
  41.115 + * Get the VCPUs/max field of the given VM.
  41.116 + */
  41.117 +extern bool
  41.118 +xen_vm_get_vcpus_max(xen_session *session, int64_t *result, xen_vm vm);
  41.119 +
  41.120 +
  41.121 +/**
  41.122 + * Get the VCPUs/at_startup field of the given VM.
  41.123 + */
  41.124 +extern bool
  41.125 +xen_vm_get_vcpus_at_startup(xen_session *session, int64_t *result, xen_vm vm);
  41.126  
  41.127  
  41.128  /**
  41.129 @@ -380,34 +399,6 @@ xen_vm_get_vcpus_utilisation(xen_session
  41.130  
  41.131  
  41.132  /**
  41.133 - * Get the VCPUs/features/required field of the given VM.
  41.134 - */
  41.135 -extern bool
  41.136 -xen_vm_get_vcpus_features_required(xen_session *session, struct xen_cpu_feature_set **result, xen_vm vm);
  41.137 -
  41.138 -
  41.139 -/**
  41.140 - * Get the VCPUs/features/can_use field of the given VM.
  41.141 - */
  41.142 -extern bool
  41.143 -xen_vm_get_vcpus_features_can_use(xen_session *session, struct xen_cpu_feature_set **result, xen_vm vm);
  41.144 -
  41.145 -
  41.146 -/**
  41.147 - * Get the VCPUs/features/force_on field of the given VM.
  41.148 - */
  41.149 -extern bool
  41.150 -xen_vm_get_vcpus_features_force_on(xen_session *session, struct xen_cpu_feature_set **result, xen_vm vm);
  41.151 -
  41.152 -
  41.153 -/**
  41.154 - * Get the VCPUs/features/force_off field of the given VM.
  41.155 - */
  41.156 -extern bool
  41.157 -xen_vm_get_vcpus_features_force_off(xen_session *session, struct xen_cpu_feature_set **result, xen_vm vm);
  41.158 -
  41.159 -
  41.160 -/**
  41.161   * Get the actions/after_shutdown field of the given VM.
  41.162   */
  41.163  extern bool
  41.164 @@ -422,13 +413,6 @@ xen_vm_get_actions_after_reboot(xen_sess
  41.165  
  41.166  
  41.167  /**
  41.168 - * Get the actions/after_suspend field of the given VM.
  41.169 - */
  41.170 -extern bool
  41.171 -xen_vm_get_actions_after_suspend(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm);
  41.172 -
  41.173 -
  41.174 -/**
  41.175   * Get the actions/after_crash field of the given VM.
  41.176   */
  41.177  extern bool
  41.178 @@ -457,6 +441,13 @@ xen_vm_get_vbds(xen_session *session, st
  41.179  
  41.180  
  41.181  /**
  41.182 + * Get the crash_dumps field of the given VM.
  41.183 + */
  41.184 +extern bool
  41.185 +xen_vm_get_crash_dumps(xen_session *session, struct xen_crashdump_set **result, xen_vm vm);
  41.186 +
  41.187 +
  41.188 +/**
  41.189   * Get the VTPMs field of the given VM.
  41.190   */
  41.191  extern bool
  41.192 @@ -555,10 +546,24 @@ xen_vm_get_tools_version(xen_session *se
  41.193  
  41.194  
  41.195  /**
  41.196 - * Get the otherConfig field of the given VM.
  41.197 + * Get the other_config field of the given VM.
  41.198   */
  41.199  extern bool
  41.200 -xen_vm_get_otherconfig(xen_session *session, xen_string_string_map **result, xen_vm vm);
  41.201 +xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xen_vm vm);
  41.202 +
  41.203 +
  41.204 +/**
  41.205 + * Get the is_control_domain field of the given VM.
  41.206 + */
  41.207 +extern bool
  41.208 +xen_vm_get_is_control_domain(xen_session *session, bool *result, xen_vm vm);
  41.209 +
  41.210 +
  41.211 +/**
  41.212 + * Get the metrics field of the given VM.
  41.213 + */
  41.214 +extern bool
  41.215 +xen_vm_get_metrics(xen_session *session, xen_vm_metrics *result, xen_vm vm);
  41.216  
  41.217  
  41.218  /**
  41.219 @@ -597,6 +602,13 @@ xen_vm_set_auto_power_on(xen_session *se
  41.220  
  41.221  
  41.222  /**
  41.223 + * Set the memory/static_max field of the given VM.
  41.224 + */
  41.225 +extern bool
  41.226 +xen_vm_set_memory_static_max(xen_session *session, xen_vm vm, int64_t static_max);
  41.227 +
  41.228 +
  41.229 +/**
  41.230   * Set the memory/dynamic_max field of the given VM.
  41.231   */
  41.232  extern bool
  41.233 @@ -611,6 +623,13 @@ xen_vm_set_memory_dynamic_min(xen_sessio
  41.234  
  41.235  
  41.236  /**
  41.237 + * Set the memory/static_min field of the given VM.
  41.238 + */
  41.239 +extern bool
  41.240 +xen_vm_set_memory_static_min(xen_session *session, xen_vm vm, int64_t static_min);
  41.241 +
  41.242 +
  41.243 +/**
  41.244   * Set the VCPUs/policy field of the given VM.
  41.245   */
  41.246  extern bool
  41.247 @@ -621,60 +640,38 @@ xen_vm_set_vcpus_policy(xen_session *ses
  41.248   * Set the VCPUs/params field of the given VM.
  41.249   */
  41.250  extern bool
  41.251 -xen_vm_set_vcpus_params(xen_session *session, xen_vm vm, char *params);
  41.252 -
  41.253 -
  41.254 -/**
  41.255 - * Set the VCPUs/number field of the given VM.
  41.256 - */
  41.257 -extern bool
  41.258 -xen_vm_set_vcpus_number(xen_session *session, xen_vm vm, int64_t number);
  41.259 -
  41.260 -
  41.261 -/**
  41.262 - * Set the VCPUs/features/force_on field of the given VM.
  41.263 - */
  41.264 -extern bool
  41.265 -xen_vm_set_vcpus_features_force_on(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_on);
  41.266 -
  41.267 -
  41.268 -/**
  41.269 - * Add the given value to the VCPUs/features/force_on field of the
  41.270 - * given VM.  If the value is already in that Set, then do nothing.
  41.271 - */
  41.272 -extern bool
  41.273 -xen_vm_add_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
  41.274 +xen_vm_set_vcpus_params(xen_session *session, xen_vm vm, xen_string_string_map *params);
  41.275  
  41.276  
  41.277  /**
  41.278 - * Remove the given value from the VCPUs/features/force_on field of the
  41.279 - * given VM.  If the value is not in that Set, then do nothing.
  41.280 + * Add the given key-value pair to the VCPUs/params field of the given
  41.281 + * VM.
  41.282   */
  41.283  extern bool
  41.284 -xen_vm_remove_vcpus_features_force_on(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
  41.285 +xen_vm_add_to_vcpus_params(xen_session *session, xen_vm vm, char *key, char *value);
  41.286  
  41.287  
  41.288  /**
  41.289 - * Set the VCPUs/features/force_off field of the given VM.
  41.290 + * Remove the given key and its corresponding value from the
  41.291 + * VCPUs/params field of the given VM.  If the key is not in that Map, then do
  41.292 + * nothing.
  41.293   */
  41.294  extern bool
  41.295 -xen_vm_set_vcpus_features_force_off(xen_session *session, xen_vm vm, struct xen_cpu_feature_set *force_off);
  41.296 +xen_vm_remove_from_vcpus_params(xen_session *session, xen_vm vm, char *key);
  41.297  
  41.298  
  41.299  /**
  41.300 - * Add the given value to the VCPUs/features/force_off field of the
  41.301 - * given VM.  If the value is already in that Set, then do nothing.
  41.302 + * Set the VCPUs/max field of the given VM.
  41.303   */
  41.304  extern bool
  41.305 -xen_vm_add_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
  41.306 +xen_vm_set_vcpus_max(xen_session *session, xen_vm vm, int64_t max);
  41.307  
  41.308  
  41.309  /**
  41.310 - * Remove the given value from the VCPUs/features/force_off field of
  41.311 - * the given VM.  If the value is not in that Set, then do nothing.
  41.312 + * Set the VCPUs/at_startup field of the given VM.
  41.313   */
  41.314  extern bool
  41.315 -xen_vm_remove_vcpus_features_force_off(xen_session *session, xen_vm vm, enum xen_cpu_feature value);
  41.316 +xen_vm_set_vcpus_at_startup(xen_session *session, xen_vm vm, int64_t at_startup);
  41.317  
  41.318  
  41.319  /**
  41.320 @@ -692,13 +689,6 @@ xen_vm_set_actions_after_reboot(xen_sess
  41.321  
  41.322  
  41.323  /**
  41.324 - * Set the actions/after_suspend field of the given VM.
  41.325 - */
  41.326 -extern bool
  41.327 -xen_vm_set_actions_after_suspend(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_suspend);
  41.328 -
  41.329 -
  41.330 -/**
  41.331   * Set the actions/after_crash field of the given VM.
  41.332   */
  41.333  extern bool
  41.334 @@ -783,10 +773,27 @@ xen_vm_set_platform_enable_audio(xen_ses
  41.335  
  41.336  
  41.337  /**
  41.338 - * Set the otherConfig field of the given VM.
  41.339 + * Set the other_config field of the given VM.
  41.340   */
  41.341  extern bool
  41.342 -xen_vm_set_otherconfig(xen_session *session, xen_vm vm, xen_string_string_map *otherconfig);
  41.343 +xen_vm_set_other_config(xen_session *session, xen_vm vm, xen_string_string_map *other_config);
  41.344 +
  41.345 +
  41.346 +/**
  41.347 + * Add the given key-value pair to the other_config field of the given
  41.348 + * VM.
  41.349 + */
  41.350 +extern bool
  41.351 +xen_vm_add_to_other_config(xen_session *session, xen_vm vm, char *key, char *value);
  41.352 +
  41.353 +
  41.354 +/**
  41.355 + * Remove the given key and its corresponding value from the
  41.356 + * other_config field of the given VM.  If the key is not in that Map, then do
  41.357 + * nothing.
  41.358 + */
  41.359 +extern bool
  41.360 +xen_vm_remove_from_other_config(xen_session *session, xen_vm vm, char *key);
  41.361  
  41.362  
  41.363  /**
  41.364 @@ -829,6 +836,8 @@ xen_vm_unpause(xen_session *session, xen
  41.365   * 
  41.366   * Once shutdown has been completed perform poweroff action specified in guest
  41.367   * configuration.
  41.368 + * 
  41.369 + * This can only be called when the specified VM is in the Running state.
  41.370   */
  41.371  extern bool
  41.372  xen_vm_clean_shutdown(xen_session *session, xen_vm vm);
  41.373 @@ -840,6 +849,8 @@ xen_vm_clean_shutdown(xen_session *sessi
  41.374   * 
  41.375   * Once shutdown has been completed perform reboot action specified in guest
  41.376   * configuration.
  41.377 + * 
  41.378 + * This can only be called when the specified VM is in the Running state.
  41.379   */
  41.380  extern bool
  41.381  xen_vm_clean_reboot(xen_session *session, xen_vm vm);
  41.382 @@ -862,14 +873,16 @@ xen_vm_hard_reboot(xen_session *session,
  41.383  
  41.384  
  41.385  /**
  41.386 - * Suspend the specified VM to disk.
  41.387 + * Suspend the specified VM to disk.  This can only be called when the
  41.388 + * specified VM is in the Running state.
  41.389   */
  41.390  extern bool
  41.391  xen_vm_suspend(xen_session *session, xen_vm vm);
  41.392  
  41.393  
  41.394  /**
  41.395 - * Awaken the specified VM and resume it.
  41.396 + * Awaken the specified VM and resume it.  This can only be called when
  41.397 + * the specified VM is in the Suspended state.
  41.398   */
  41.399  extern bool
  41.400  xen_vm_resume(xen_session *session, xen_vm vm, bool start_paused);
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/tools/libxen/include/xen_vm_metrics.h	Wed Jan 31 10:30:54 2007 -0700
    42.3 @@ -0,0 +1,201 @@
    42.4 +/*
    42.5 + * Copyright (c) 2006, XenSource Inc.
    42.6 + *
    42.7 + * This library is free software; you can redistribute it and/or
    42.8 + * modify it under the terms of the GNU Lesser General Public
    42.9 + * License as published by the Free Software Foundation; either
   42.10 + * version 2.1 of the License, or (at your option) any later version.
   42.11 + *
   42.12 + * This library is distributed in the hope that it will be useful,
   42.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   42.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   42.15 + * Lesser General Public License for more details.
   42.16 + *
   42.17 + * You should have received a copy of the GNU Lesser General Public
   42.18 + * License along with this library; if not, write to the Free Software
   42.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   42.20 + */
   42.21 +
   42.22 +#ifndef XEN_VM_METRICS_H
   42.23 +#define XEN_VM_METRICS_H
   42.24 +
   42.25 +#include "xen_common.h"
   42.26 +#include "xen_int_float_map.h"
   42.27 +#include "xen_vm_decl.h"
   42.28 +#include "xen_vm_metrics_decl.h"
   42.29 +
   42.30 +
   42.31 +/*
   42.32 + * The VM_metrics class.
   42.33 + * 
   42.34 + * The metrics associated with a VM.
   42.35 + */
   42.36 +
   42.37 +
   42.38 +/**
   42.39 + * Free the given xen_vm_metrics.  The given handle must have been
   42.40 + * allocated by this library.
   42.41 + */
   42.42 +extern void
   42.43 +xen_vm_metrics_free(xen_vm_metrics vm_metrics);
   42.44 +
   42.45 +
   42.46 +typedef struct xen_vm_metrics_set
   42.47 +{
   42.48 +    size_t size;
   42.49 +    xen_vm_metrics *contents[];
   42.50 +} xen_vm_metrics_set;
   42.51 +
   42.52 +/**
   42.53 + * Allocate a xen_vm_metrics_set of the given size.
   42.54 + */
   42.55 +extern xen_vm_metrics_set *
   42.56 +xen_vm_metrics_set_alloc(size_t size);
   42.57 +
   42.58 +/**
   42.59 + * Free the given xen_vm_metrics_set.  The given set must have been
   42.60 + * allocated by this library.
   42.61 + */
   42.62 +extern void
   42.63 +xen_vm_metrics_set_free(xen_vm_metrics_set *set);
   42.64 +
   42.65 +
   42.66 +typedef struct xen_vm_metrics_record
   42.67 +{
   42.68 +    xen_vm_metrics handle;
   42.69 +    char *uuid;
   42.70 +    struct xen_vm_record_opt *vm;
   42.71 +    int64_t memory_actual;
   42.72 +    int64_t vcpus_number;
   42.73 +    xen_int_float_map *vcpus_utilisation;
   42.74 +} xen_vm_metrics_record;
   42.75 +
   42.76 +/**
   42.77 + * Allocate a xen_vm_metrics_record.
   42.78 + */
   42.79 +extern xen_vm_metrics_record *
   42.80 +xen_vm_metrics_record_alloc(void);
   42.81 +
   42.82 +/**
   42.83 + * Free the given xen_vm_metrics_record, and all referenced values. 
   42.84 + * The given record must have been allocated by this library.
   42.85 + */
   42.86 +extern void
   42.87 +xen_vm_metrics_record_free(xen_vm_metrics_record *record);
   42.88 +
   42.89 +
   42.90 +typedef struct xen_vm_metrics_record_opt
   42.91 +{
   42.92 +    bool is_record;
   42.93 +    union
   42.94 +    {
   42.95 +        xen_vm_metrics handle;
   42.96 +        xen_vm_metrics_record *record;
   42.97 +    } u;
   42.98 +} xen_vm_metrics_record_opt;
   42.99 +
  42.100 +/**
  42.101 + * Allocate a xen_vm_metrics_record_opt.
  42.102 + */
  42.103 +extern xen_vm_metrics_record_opt *
  42.104 +xen_vm_metrics_record_opt_alloc(void);
  42.105 +
  42.106 +/**
  42.107 + * Free the given xen_vm_metrics_record_opt, and all referenced values.
  42.108 + *  The given record_opt must have been allocated by this library.
  42.109 + */
  42.110 +extern void
  42.111 +xen_vm_metrics_record_opt_free(xen_vm_metrics_record_opt *record_opt);
  42.112 +
  42.113 +
  42.114 +typedef struct xen_vm_metrics_record_set
  42.115 +{
  42.116 +    size_t size;
  42.117 +    xen_vm_metrics_record *contents[];
  42.118 +} xen_vm_metrics_record_set;
  42.119 +
  42.120 +/**
  42.121 + * Allocate a xen_vm_metrics_record_set of the given size.
  42.122 + */
  42.123 +extern xen_vm_metrics_record_set *
  42.124 +xen_vm_metrics_record_set_alloc(size_t size);
  42.125 +
  42.126 +/**
  42.127 + * Free the given xen_vm_metrics_record_set, and all referenced values.
  42.128 + *  The given set must have been allocated by this library.
  42.129 + */
  42.130 +extern void
  42.131 +xen_vm_metrics_record_set_free(xen_vm_metrics_record_set *set);
  42.132 +
  42.133 +
  42.134 +
  42.135 +typedef struct xen_vm_metrics_record_opt_set
  42.136 +{
  42.137 +    size_t size;
  42.138 +    xen_vm_metrics_record_opt *contents[];
  42.139 +} xen_vm_metrics_record_opt_set;
  42.140 +
  42.141 +/**
  42.142 + * Allocate a xen_vm_metrics_record_opt_set of the given size.
  42.143 + */
  42.144 +extern xen_vm_metrics_record_opt_set *
  42.145 +xen_vm_metrics_record_opt_set_alloc(size_t size);
  42.146 +
  42.147 +/**
  42.148 + * Free the given xen_vm_metrics_record_opt_set, and all referenced
  42.149 + * values.  The given set must have been allocated by this library.
  42.150 + */
  42.151 +extern void
  42.152 +xen_vm_metrics_record_opt_set_free(xen_vm_metrics_record_opt_set *set);
  42.153 +
  42.154 +
  42.155 +/**
  42.156 + * Get a record containing the current state of the given VM_metrics.
  42.157 + */
  42.158 +extern bool
  42.159 +xen_vm_metrics_get_record(xen_session *session, xen_vm_metrics_record **result, xen_vm_metrics vm_metrics);
  42.160 +
  42.161 +
  42.162 +/**
  42.163 + * Get a reference to the VM_metrics instance with the specified UUID.
  42.164 + */
  42.165 +extern bool
  42.166 +xen_vm_metrics_get_by_uuid(xen_session *session, xen_vm_metrics *result, char *uuid);
  42.167 +
  42.168 +
  42.169 +/**
  42.170 + * Get the uuid field of the given VM_metrics.
  42.171 + */
  42.172 +extern bool
  42.173 +xen_vm_metrics_get_uuid(xen_session *session, char **result, xen_vm_metrics vm_metrics);
  42.174 +
  42.175 +
  42.176 +/**
  42.177 + * Get the VM field of the given VM_metrics.
  42.178 + */
  42.179 +extern bool
  42.180 +xen_vm_metrics_get_vm(xen_session *session, xen_vm *result, xen_vm_metrics vm_metrics);
  42.181 +
  42.182 +
  42.183 +/**
  42.184 + * Get the memory/actual field of the given VM_metrics.
  42.185 + */
  42.186 +extern bool
  42.187 +xen_vm_metrics_get_memory_actual(xen_session *session, int64_t *result, xen_vm_metrics vm_metrics);
  42.188 +
  42.189 +
  42.190 +/**
  42.191 + * Get the VCPUs/number field of the given VM_metrics.
  42.192 + */
  42.193 +extern bool
  42.194 +xen_vm_metrics_get_vcpus_number(xen_session *session, int64_t *result, xen_vm_metrics vm_metrics);
  42.195 +
  42.196 +
  42.197 +/**
  42.198 + * Get the VCPUs/utilisation field of the given VM_metrics.
  42.199 + */
  42.200 +extern bool
  42.201 +xen_vm_metrics_get_vcpus_utilisation(xen_session *session, xen_int_float_map **result, xen_vm_metrics vm_metrics);
  42.202 +
  42.203 +
  42.204 +#endif
    43.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    43.2 +++ b/tools/libxen/include/xen_vm_metrics_decl.h	Wed Jan 31 10:30:54 2007 -0700
    43.3 @@ -0,0 +1,30 @@
    43.4 +/*
    43.5 + * Copyright (c) 2006, XenSource Inc.
    43.6 + *
    43.7 + * This library is free software; you can redistribute it and/or
    43.8 + * modify it under the terms of the GNU Lesser General Public
    43.9 + * License as published by the Free Software Foundation; either
   43.10 + * version 2.1 of the License, or (at your option) any later version.
   43.11 + *
   43.12 + * This library is distributed in the hope that it will be useful,
   43.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   43.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   43.15 + * Lesser General Public License for more details.
   43.16 + *
   43.17 + * You should have received a copy of the GNU Lesser General Public
   43.18 + * License along with this library; if not, write to the Free Software
   43.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   43.20 + */
   43.21 +
   43.22 +#ifndef XEN_VM_METRICS_DECL_H
   43.23 +#define XEN_VM_METRICS_DECL_H
   43.24 +
   43.25 +typedef void *xen_vm_metrics;
   43.26 +
   43.27 +struct xen_vm_metrics_set;
   43.28 +struct xen_vm_metrics_record;
   43.29 +struct xen_vm_metrics_record_set;
   43.30 +struct xen_vm_metrics_record_opt;
   43.31 +struct xen_vm_metrics_record_opt_set;
   43.32 +
   43.33 +#endif
    44.1 --- a/tools/libxen/include/xen_vtpm.h	Tue Jan 30 23:35:32 2007 -0700
    44.2 +++ b/tools/libxen/include/xen_vtpm.h	Wed Jan 31 10:30:54 2007 -0700
    44.3 @@ -21,7 +21,6 @@
    44.4  #define XEN_VTPM_H
    44.5  
    44.6  #include "xen_common.h"
    44.7 -#include "xen_driver_type.h"
    44.8  #include "xen_vm_decl.h"
    44.9  #include "xen_vtpm_decl.h"
   44.10  
   44.11 @@ -67,8 +66,6 @@ typedef struct xen_vtpm_record
   44.12      char *uuid;
   44.13      struct xen_vm_record_opt *vm;
   44.14      struct xen_vm_record_opt *backend;
   44.15 -    enum xen_driver_type driver;
   44.16 -    int64_t instance;
   44.17  } xen_vtpm_record;
   44.18  
   44.19  /**
   44.20 @@ -198,19 +195,4 @@ xen_vtpm_get_vm(xen_session *session, xe
   44.21  extern bool
   44.22  xen_vtpm_get_backend(xen_session *session, xen_vm *result, xen_vtpm vtpm);
   44.23  
   44.24 -
   44.25 -/**
   44.26 - * Get the driver field of the given VTPM.
   44.27 - */
   44.28 -extern bool
   44.29 -xen_vtpm_get_driver(xen_session *session, enum xen_driver_type *result, xen_vtpm vtpm);
   44.30 -
   44.31 -
   44.32 -/**
   44.33 - * Get the instance field of the given VTPM.
   44.34 - */
   44.35 -extern bool
   44.36 -xen_vtpm_get_instance(xen_session *session, int64_t *result, xen_vtpm vtpm);
   44.37 -
   44.38 -
   44.39  #endif
    45.1 --- a/tools/libxen/src/xen_cpu_feature.c	Tue Jan 30 23:35:32 2007 -0700
    45.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.3 @@ -1,143 +0,0 @@
    45.4 -/*
    45.5 - * Copyright (c) 2006, XenSource Inc.
    45.6 - *
    45.7 - * This library is free software; you can redistribute it and/or
    45.8 - * modify it under the terms of the GNU Lesser General Public
    45.9 - * License as published by the Free Software Foundation; either
   45.10 - * version 2.1 of the License, or (at your option) any later version.
   45.11 - *
   45.12 - * This library is distributed in the hope that it will be useful,
   45.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   45.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   45.15 - * Lesser General Public License for more details.
   45.16 - *
   45.17 - * You should have received a copy of the GNU Lesser General Public
   45.18 - * License along with this library; if not, write to the Free Software
   45.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   45.20 - */
   45.21 -
   45.22 -#include <string.h>
   45.23 -
   45.24 -#include "xen_internal.h"
   45.25 -#include "xen_cpu_feature.h"
   45.26 -#include "xen_cpu_feature_internal.h"
   45.27 -
   45.28 -
   45.29 -/*
   45.30 - * Maintain this in the same order as the enum declaration!
   45.31 - */
   45.32 -static const char *lookup_table[] =
   45.33 -{
   45.34 -    "FPU",
   45.35 -    "VME",
   45.36 -    "DE",
   45.37 -    "PSE",
   45.38 -    "TSC",
   45.39 -    "MSR",
   45.40 -    "PAE",
   45.41 -    "MCE",
   45.42 -    "CX8",
   45.43 -    "APIC",
   45.44 -    "SEP",
   45.45 -    "MTRR",
   45.46 -    "PGE",
   45.47 -    "MCA",
   45.48 -    "CMOV",
   45.49 -    "PAT",
   45.50 -    "PSE36",
   45.51 -    "PN",
   45.52 -    "CLFLSH",
   45.53 -    "DTES",
   45.54 -    "ACPI",
   45.55 -    "MMX",
   45.56 -    "FXSR",
   45.57 -    "XMM",
   45.58 -    "XMM2",
   45.59 -    "SELFSNOOP",
   45.60 -    "HT",
   45.61 -    "ACC",
   45.62 -    "IA64",
   45.63 -    "SYSCALL",
   45.64 -    "MP",
   45.65 -    "NX",
   45.66 -    "MMXEXT",
   45.67 -    "LM",
   45.68 -    "THREEDNOWEXT",
   45.69 -    "THREEDNOW",
   45.70 -    "RECOVERY",
   45.71 -    "LONGRUN",
   45.72 -    "LRTI",
   45.73 -    "CXMMX",
   45.74 -    "K6_MTRR",
   45.75 -    "CYRIX_ARR",
   45.76 -    "CENTAUR_MCR",
   45.77 -    "K8",
   45.78 -    "K7",
   45.79 -    "P3",
   45.80 -    "P4",
   45.81 -    "CONSTANT_TSC",
   45.82 -    "FXSAVE_LEAK",
   45.83 -    "XMM3",
   45.84 -    "MWAIT",
   45.85 -    "DSCPL",
   45.86 -    "EST",
   45.87 -    "TM2",
   45.88 -    "CID",
   45.89 -    "CX16",
   45.90 -    "XTPR",
   45.91 -    "XSTORE",
   45.92 -    "XSTORE_EN",
   45.93 -    "XCRYPT",
   45.94 -    "XCRYPT_EN",
   45.95 -    "LAHF_LM",
   45.96 -    "CMP_LEGACY",
   45.97 -    "VMX"
   45.98 -};
   45.99 -
  45.100 -
  45.101 -extern xen_cpu_feature_set *
  45.102 -xen_cpu_feature_set_alloc(size_t size)
  45.103 -{
  45.104 -    return calloc(1, sizeof(xen_cpu_feature_set) +
  45.105 -                  size * sizeof(enum xen_cpu_feature));
  45.106 -}
  45.107 -
  45.108 -
  45.109 -extern void
  45.110 -xen_cpu_feature_set_free(xen_cpu_feature_set *set)
  45.111 -{
  45.112 -    free(set);
  45.113 -}
  45.114 -
  45.115 -
  45.116 -const char *
  45.117 -xen_cpu_feature_to_string(enum xen_cpu_feature val)
  45.118 -{
  45.119 -    return lookup_table[val];
  45.120 -}
  45.121 -
  45.122 -
  45.123 -extern enum xen_cpu_feature
  45.124 -xen_cpu_feature_from_string(xen_session *session, const char *str)
  45.125 -{
  45.126 -    return ENUM_LOOKUP(session, str, lookup_table);
  45.127 -}
  45.128 -
  45.129 -
  45.130 -const abstract_type xen_cpu_feature_abstract_type_ =
  45.131 -    {
  45.132 -        .typename = ENUM,
  45.133 -        .enum_marshaller =
  45.134 -             (const char *(*)(int))&xen_cpu_feature_to_string,
  45.135 -        .enum_demarshaller =
  45.136 -             (int (*)(xen_session *, const char *))&xen_cpu_feature_from_string
  45.137 -    };
  45.138 -
  45.139 -
  45.140 -const abstract_type xen_cpu_feature_set_abstract_type_ =
  45.141 -    {
  45.142 -        .typename = SET,
  45.143 -        .child = &xen_cpu_feature_abstract_type_
  45.144 -    };
  45.145 -
  45.146 -
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/tools/libxen/src/xen_crashdump.c	Wed Jan 31 10:30:54 2007 -0700
    46.3 @@ -0,0 +1,199 @@
    46.4 +/*
    46.5 + * Copyright (c) 2006, XenSource Inc.
    46.6 + *
    46.7 + * This library is free software; you can redistribute it and/or
    46.8 + * modify it under the terms of the GNU Lesser General Public
    46.9 + * License as published by the Free Software Foundation; either
   46.10 + * version 2.1 of the License, or (at your option) any later version.
   46.11 + *
   46.12 + * This library is distributed in the hope that it will be useful,
   46.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   46.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   46.15 + * Lesser General Public License for more details.
   46.16 + *
   46.17 + * You should have received a copy of the GNU Lesser General Public
   46.18 + * License along with this library; if not, write to the Free Software
   46.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   46.20 + */
   46.21 +
   46.22 +
   46.23 +#include <stddef.h>
   46.24 +#include <stdlib.h>
   46.25 +
   46.26 +#include "xen_common.h"
   46.27 +#include "xen_crashdump.h"
   46.28 +#include "xen_internal.h"
   46.29 +#include "xen_vdi.h"
   46.30 +#include "xen_vm.h"
   46.31 +
   46.32 +
   46.33 +XEN_FREE(xen_crashdump)
   46.34 +XEN_SET_ALLOC_FREE(xen_crashdump)
   46.35 +XEN_ALLOC(xen_crashdump_record)
   46.36 +XEN_SET_ALLOC_FREE(xen_crashdump_record)
   46.37 +XEN_ALLOC(xen_crashdump_record_opt)
   46.38 +XEN_RECORD_OPT_FREE(xen_crashdump)
   46.39 +XEN_SET_ALLOC_FREE(xen_crashdump_record_opt)
   46.40 +
   46.41 +
   46.42 +static const struct_member xen_crashdump_record_struct_members[] =
   46.43 +    {
   46.44 +        { .key = "uuid",
   46.45 +          .type = &abstract_type_string,
   46.46 +          .offset = offsetof(xen_crashdump_record, uuid) },
   46.47 +        { .key = "VM",
   46.48 +          .type = &abstract_type_ref,
   46.49 +          .offset = offsetof(xen_crashdump_record, vm) },
   46.50 +        { .key = "VDI",
   46.51 +          .type = &abstract_type_ref,
   46.52 +          .offset = offsetof(xen_crashdump_record, vdi) }
   46.53 +    };
   46.54 +
   46.55 +const abstract_type xen_crashdump_record_abstract_type_ =
   46.56 +    {
   46.57 +       .typename = STRUCT,
   46.58 +       .struct_size = sizeof(xen_crashdump_record),
   46.59 +       .member_count =
   46.60 +           sizeof(xen_crashdump_record_struct_members) / sizeof(struct_member),
   46.61 +       .members = xen_crashdump_record_struct_members
   46.62 +    };
   46.63 +
   46.64 +
   46.65 +void
   46.66 +xen_crashdump_record_free(xen_crashdump_record *record)
   46.67 +{
   46.68 +    if (record == NULL)
   46.69 +    {
   46.70 +        return;
   46.71 +    }
   46.72 +    free(record->handle);
   46.73 +    free(record->uuid);
   46.74 +    xen_vm_record_opt_free(record->vm);
   46.75 +    xen_vdi_record_opt_free(record->vdi);
   46.76 +    free(record);
   46.77 +}
   46.78 +
   46.79 +
   46.80 +bool
   46.81 +xen_crashdump_get_record(xen_session *session, xen_crashdump_record **result, xen_crashdump crashdump)
   46.82 +{
   46.83 +    abstract_value param_values[] =
   46.84 +        {
   46.85 +            { .type = &abstract_type_string,
   46.86 +              .u.string_val = crashdump }
   46.87 +        };
   46.88 +
   46.89 +    abstract_type result_type = xen_crashdump_record_abstract_type_;
   46.90 +
   46.91 +    *result = NULL;
   46.92 +    XEN_CALL_("crashdump.get_record");
   46.93 +
   46.94 +    if (session->ok)
   46.95 +    {
   46.96 +       (*result)->handle = xen_strdup_((*result)->uuid);
   46.97 +    }
   46.98 +
   46.99 +    return session->ok;
  46.100 +}
  46.101 +
  46.102 +
  46.103 +bool
  46.104 +xen_crashdump_get_by_uuid(xen_session *session, xen_crashdump *result, char *uuid)
  46.105 +{
  46.106 +    abstract_value param_values[] =
  46.107 +        {
  46.108 +            { .type = &abstract_type_string,
  46.109 +              .u.string_val = uuid }
  46.110 +        };
  46.111 +
  46.112 +    abstract_type result_type = abstract_type_string;
  46.113 +
  46.114 +    *result = NULL;
  46.115 +    XEN_CALL_("crashdump.get_by_uuid");
  46.116 +    return session->ok;
  46.117 +}
  46.118 +
  46.119 +
  46.120 +bool
  46.121 +xen_crashdump_create(xen_session *session, xen_crashdump *result, xen_crashdump_record *record)
  46.122 +{
  46.123 +    abstract_value param_values[] =
  46.124 +        {
  46.125 +            { .type = &xen_crashdump_record_abstract_type_,
  46.126 +              .u.struct_val = record }
  46.127 +        };
  46.128 +
  46.129 +    abstract_type result_type = abstract_type_string;
  46.130 +
  46.131 +    *result = NULL;
  46.132 +    XEN_CALL_("crashdump.create");
  46.133 +    return session->ok;
  46.134 +}
  46.135 +
  46.136 +
  46.137 +bool
  46.138 +xen_crashdump_destroy(xen_session *session, xen_crashdump crashdump)
  46.139 +{
  46.140 +    abstract_value param_values[] =
  46.141 +        {
  46.142 +            { .type = &abstract_type_string,
  46.143 +              .u.string_val = crashdump }
  46.144 +        };
  46.145 +
  46.146 +    xen_call_(session, "crashdump.destroy", param_values, 1, NULL, NULL);
  46.147 +    return session->ok;
  46.148 +}
  46.149 +
  46.150 +
  46.151 +bool
  46.152 +xen_crashdump_get_vm(xen_session *session, xen_vm *result, xen_crashdump crashdump)
  46.153 +{
  46.154 +    abstract_value param_values[] =
  46.155 +        {
  46.156 +            { .type = &abstract_type_string,
  46.157 +              .u.string_val = crashdump }
  46.158 +        };
  46.159 +
  46.160 +    abstract_type result_type = abstract_type_string;
  46.161 +
  46.162 +    *result = NULL;
  46.163 +    XEN_CALL_("crashdump.get_VM");
  46.164 +    return session->ok;
  46.165 +}
  46.166 +
  46.167 +
  46.168 +bool
  46.169 +xen_crashdump_get_vdi(xen_session *session, xen_vdi *result, xen_crashdump crashdump)
  46.170 +{
  46.171 +    abstract_value param_values[] =
  46.172 +        {
  46.173 +            { .type = &abstract_type_string,
  46.174 +              .u.string_val = crashdump }
  46.175 +        };
  46.176 +
  46.177 +    abstract_type result_type = abstract_type_string;
  46.178 +
  46.179 +    *result = NULL;
  46.180 +    XEN_CALL_("crashdump.get_VDI");
  46.181 +    return session->ok;
  46.182 +}
  46.183 +
  46.184 +
  46.185 +bool
  46.186 +xen_crashdump_get_all(xen_session *session, struct xen_crashdump_set **result)
  46.187 +{
  46.188 +
  46.189 +    abstract_type result_type = abstract_type_string_set;
  46.190 +
  46.191 +    *result = NULL;
  46.192 +    xen_call_(session, "crashdump.get_all", NULL, 0, &result_type, result);
  46.193 +    return session->ok;
  46.194 +}
  46.195 +
  46.196 +
  46.197 +bool
  46.198 +xen_crashdump_get_uuid(xen_session *session, char **result, xen_crashdump crashdump)
  46.199 +{
  46.200 +    *result = session->ok ? xen_strdup_((char *)crashdump) : NULL;
  46.201 +    return session->ok;
  46.202 +}
    47.1 --- a/tools/libxen/src/xen_driver_type.c	Tue Jan 30 23:35:32 2007 -0700
    47.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.3 @@ -1,81 +0,0 @@
    47.4 -/*
    47.5 - * Copyright (c) 2006, XenSource Inc.
    47.6 - *
    47.7 - * This library is free software; you can redistribute it and/or
    47.8 - * modify it under the terms of the GNU Lesser General Public
    47.9 - * License as published by the Free Software Foundation; either
   47.10 - * version 2.1 of the License, or (at your option) any later version.
   47.11 - *
   47.12 - * This library is distributed in the hope that it will be useful,
   47.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
   47.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   47.15 - * Lesser General Public License for more details.
   47.16 - *
   47.17 - * You should have received a copy of the GNU Lesser General Public
   47.18 - * License along with this library; if not, write to the Free Software
   47.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   47.20 - */
   47.21 -
   47.22 -#include <string.h>
   47.23 -
   47.24 -#include "xen_internal.h"
   47.25 -#include "xen_driver_type.h"
   47.26 -#include "xen_driver_type_internal.h"
   47.27 -
   47.28 -
   47.29 -/*
   47.30 - * Maintain this in the same order as the enum declaration!
   47.31 - */
   47.32 -static const char *lookup_table[] =
   47.33 -{
   47.34 -    "ioemu",
   47.35 -    "paravirtualised"
   47.36 -};
   47.37 -
   47.38 -
   47.39 -extern xen_driver_type_set *
   47.40 -xen_driver_type_set_alloc(size_t size)
   47.41 -{
   47.42 -    return calloc(1, sizeof(xen_driver_type_set) +
   47.43 -                  size * sizeof(enum xen_driver_type));
   47.44 -}
   47.45 -
   47.46 -
   47.47 -extern void
   47.48 -xen_driver_type_set_free(xen_driver_type_set *set)
   47.49 -{
   47.50 -    free(set);
   47.51 -}
   47.52 -
   47.53 -
   47.54 -const char *
   47.55 -xen_driver_type_to_string(enum xen_driver_type val)
   47.56 -{
   47.57 -    return lookup_table[val];
   47.58 -}
   47.59 -
   47.60 -
   47.61 -extern enum xen_driver_type
   47.62 -xen_driver_type_from_string(xen_session *session, const char *str)
   47.63 -{
   47.64 -    return ENUM_LOOKUP(session, str, lookup_table);
   47.65 -}
   47.66 -
   47.67 -
   47.68 -const abstract_type xen_driver_type_abstract_type_ =
   47.69 -    {
   47.70 -        .typename = ENUM,
   47.71 -        .enum_marshaller =
   47.72 -             (const char *(*)(int))&xen_driver_type_to_string,
   47.73 -        .enum_demarshaller =
   47.74 -             (int (*)(xen_session *, const char *))&xen_driver_type_from_string
   47.75 -    };
   47.76 -
   47.77 -
   47.78 -const abstract_type xen_driver_type_set_abstract_type_ =
   47.79 -    {
   47.80 -        .typename = SET,
   47.81 -        .child = &xen_driver_type_abstract_type_
   47.82 -    };
   47.83 -
   47.84 -
    48.1 --- a/tools/libxen/src/xen_host.c	Tue Jan 30 23:35:32 2007 -0700
    48.2 +++ b/tools/libxen/src/xen_host.c	Wed Jan 31 10:30:54 2007 -0700
    48.3 @@ -23,8 +23,11 @@
    48.4  #include "xen_common.h"
    48.5  #include "xen_host.h"
    48.6  #include "xen_host_cpu.h"
    48.7 +#include "xen_host_metrics.h"
    48.8  #include "xen_internal.h"
    48.9 +#include "xen_pbd.h"
   48.10  #include "xen_pif.h"
   48.11 +#include "xen_sr.h"
   48.12  #include "xen_string_string_map.h"
   48.13  #include "xen_vm.h"
   48.14  
   48.15 @@ -52,15 +55,33 @@ static const struct_member xen_host_reco
   48.16          { .key = "software_version",
   48.17            .type = &abstract_type_string_string_map,
   48.18            .offset = offsetof(xen_host_record, software_version) },
   48.19 +        { .key = "other_config",
   48.20 +          .type = &abstract_type_string_string_map,
   48.21 +          .offset = offsetof(xen_host_record, other_config) },
   48.22          { .key = "resident_VMs",
   48.23            .type = &abstract_type_ref_set,
   48.24            .offset = offsetof(xen_host_record, resident_vms) },
   48.25 +        { .key = "logging",
   48.26 +          .type = &abstract_type_string_string_map,
   48.27 +          .offset = offsetof(xen_host_record, logging) },
   48.28          { .key = "PIFs",
   48.29            .type = &abstract_type_ref_set,
   48.30            .offset = offsetof(xen_host_record, pifs) },
   48.31 +        { .key = "suspend_image_sr",
   48.32 +          .type = &abstract_type_ref,
   48.33 +          .offset = offsetof(xen_host_record, suspend_image_sr) },
   48.34 +        { .key = "crash_dump_sr",
   48.35 +          .type = &abstract_type_ref,
   48.36 +          .offset = offsetof(xen_host_record, crash_dump_sr) },
   48.37 +        { .key = "PBDs",
   48.38 +          .type = &abstract_type_ref_set,
   48.39 +          .offset = offsetof(xen_host_record, pbds) },
   48.40          { .key = "host_CPUs",
   48.41            .type = &abstract_type_ref_set,
   48.42 -          .offset = offsetof(xen_host_record, host_cpus) }
   48.43 +          .offset = offsetof(xen_host_record, host_cpus) },
   48.44 +        { .key = "metrics",
   48.45 +          .type = &abstract_type_ref,
   48.46 +          .offset = offsetof(xen_host_record, metrics) }
   48.47      };
   48.48  
   48.49  const abstract_type xen_host_record_abstract_type_ =
   48.50 @@ -85,9 +106,15 @@ xen_host_record_free(xen_host_record *re
   48.51      free(record->name_label);
   48.52      free(record->name_description);
   48.53      xen_string_string_map_free(record->software_version);
   48.54 +    xen_string_string_map_free(record->other_config);
   48.55      xen_vm_record_opt_set_free(record->resident_vms);
   48.56 +    xen_string_string_map_free(record->logging);
   48.57      xen_pif_record_opt_set_free(record->pifs);
   48.58 +    xen_sr_record_opt_free(record->suspend_image_sr);
   48.59 +    xen_sr_record_opt_free(record->crash_dump_sr);
   48.60 +    xen_pbd_record_opt_set_free(record->pbds);
   48.61      xen_host_cpu_record_opt_set_free(record->host_cpus);
   48.62 +    xen_host_metrics_record_opt_free(record->metrics);
   48.63      free(record);
   48.64  }
   48.65  
   48.66 @@ -232,6 +259,23 @@ xen_host_get_software_version(xen_sessio
   48.67  
   48.68  
   48.69  bool
   48.70 +xen_host_get_other_config(xen_session *session, xen_string_string_map **result, xen_host host)
   48.71 +{
   48.72 +    abstract_value param_values[] =
   48.73 +        {
   48.74 +            { .type = &abstract_type_string,
   48.75 +              .u.string_val = host }
   48.76 +        };
   48.77 +
   48.78 +    abstract_type result_type = abstract_type_string_string_map;
   48.79 +
   48.80 +    *result = NULL;
   48.81 +    XEN_CALL_("host.get_other_config");
   48.82 +    return session->ok;
   48.83 +}
   48.84 +
   48.85 +
   48.86 +bool
   48.87  xen_host_get_resident_vms(xen_session *session, struct xen_vm_set **result, xen_host host)
   48.88  {
   48.89      abstract_value param_values[] =
   48.90 @@ -249,6 +293,23 @@ xen_host_get_resident_vms(xen_session *s
   48.91  
   48.92  
   48.93  bool
   48.94 +xen_host_get_logging(xen_session *session, xen_string_string_map **result, xen_host host)
   48.95 +{
   48.96 +    abstract_value param_values[] =
   48.97 +        {
   48.98 +            { .type = &abstract_type_string,
   48.99 +              .u.string_val = host }
  48.100 +        };
  48.101 +
  48.102 +    abstract_type result_type = abstract_type_string_string_map;
  48.103 +
  48.104 +    *result = NULL;
  48.105 +    XEN_CALL_("host.get_logging");
  48.106 +    return session->ok;
  48.107 +}
  48.108 +
  48.109 +
  48.110 +bool
  48.111  xen_host_get_pifs(xen_session *session, struct xen_pif_set **result, xen_host host)
  48.112  {
  48.113      abstract_value param_values[] =
  48.114 @@ -266,6 +327,57 @@ xen_host_get_pifs(xen_session *session, 
  48.115  
  48.116  
  48.117  bool
  48.118 +xen_host_get_suspend_image_sr(xen_session *session, xen_sr *result, xen_host host)
  48.119 +{
  48.120 +    abstract_value param_values[] =
  48.121 +        {
  48.122 +            { .type = &abstract_type_string,
  48.123 +              .u.string_val = host }
  48.124 +        };
  48.125 +
  48.126 +    abstract_type result_type = abstract_type_string;
  48.127 +
  48.128 +    *result = NULL;
  48.129 +    XEN_CALL_("host.get_suspend_image_sr");
  48.130 +    return session->ok;
  48.131 +}
  48.132 +
  48.133 +
  48.134 +bool
  48.135 +xen_host_get_crash_dump_sr(xen_session *session, xen_sr *result, xen_host host)
  48.136 +{
  48.137 +    abstract_value param_values[] =
  48.138 +        {
  48.139 +            { .type = &abstract_type_string,
  48.140 +              .u.string_val = host }
  48.141 +        };
  48.142 +
  48.143 +    abstract_type result_type = abstract_type_string;
  48.144 +
  48.145 +    *result = NULL;
  48.146 +    XEN_CALL_("host.get_crash_dump_sr");
  48.147 +    return session->ok;
  48.148 +}
  48.149 +
  48.150 +
  48.151 +bool
  48.152 +xen_host_get_pbds(xen_session *session, struct xen_pbd_set **result, xen_host host)
  48.153 +{
  48.154 +    abstract_value param_values[] =
  48.155 +        {
  48.156 +            { .type = &abstract_type_string,
  48.157 +              .u.string_val = host }
  48.158 +        };
  48.159 +
  48.160 +    abstract_type result_type = abstract_type_string_set;
  48.161 +
  48.162 +    *result = NULL;
  48.163 +    XEN_CALL_("host.get_PBDs");
  48.164 +    return session->ok;
  48.165 +}
  48.166 +
  48.167 +
  48.168 +bool
  48.169  xen_host_get_host_cpus(xen_session *session, struct xen_host_cpu_set **result, xen_host host)
  48.170  {
  48.171      abstract_value param_values[] =
  48.172 @@ -283,6 +395,23 @@ xen_host_get_host_cpus(xen_session *sess
  48.173  
  48.174  
  48.175  bool
  48.176 +xen_host_get_metrics(xen_session *session, xen_host_metrics *result, xen_host host)
  48.177 +{
  48.178 +    abstract_value param_values[] =
  48.179 +        {
  48.180 +            { .type = &abstract_type_string,
  48.181 +              .u.string_val = host }
  48.182 +        };
  48.183 +
  48.184 +    abstract_type result_type = abstract_type_string;
  48.185 +
  48.186 +    *result = NULL;
  48.187 +    XEN_CALL_("host.get_metrics");
  48.188 +    return session->ok;
  48.189 +}
  48.190 +
  48.191 +
  48.192 +bool
  48.193  xen_host_set_name_label(xen_session *session, xen_host host, char *label)
  48.194  {
  48.195      abstract_value param_values[] =
  48.196 @@ -315,6 +444,138 @@ xen_host_set_name_description(xen_sessio
  48.197  
  48.198  
  48.199  bool
  48.200 +xen_host_set_other_config(xen_session *session, xen_host host, xen_string_string_map *other_config)
  48.201 +{
  48.202 +    abstract_value param_values[] =
  48.203 +        {
  48.204 +            { .type = &abstract_type_string,
  48.205 +              .u.string_val = host },
  48.206 +            { .type = &abstract_type_string_string_map,
  48.207 +              .u.set_val = (arbitrary_set *)other_config }
  48.208 +        };
  48.209 +
  48.210 +    xen_call_(session, "host.set_other_config", param_values, 2, NULL, NULL);
  48.211 +    return session->ok;
  48.212 +}
  48.213 +
  48.214 +
  48.215 +bool
  48.216 +xen_host_add_to_other_config(xen_session *session, xen_host host, char *key, char *value)
  48.217 +{
  48.218 +    abstract_value param_values[] =
  48.219 +        {
  48.220 +            { .type = &abstract_type_string,
  48.221 +              .u.string_val = host },
  48.222 +            { .type = &abstract_type_string,
  48.223 +              .u.string_val = key },
  48.224 +            { .type = &abstract_type_string,
  48.225 +              .u.string_val = value }
  48.226 +        };
  48.227 +
  48.228 +    xen_call_(session, "host.add_to_other_config", param_values, 3, NULL, NULL);
  48.229 +    return session->ok;
  48.230 +}
  48.231 +
  48.232 +
  48.233 +bool
  48.234 +xen_host_remove_from_other_config(xen_session *session, xen_host host, char *key)
  48.235 +{
  48.236 +    abstract_value param_values[] =
  48.237 +        {
  48.238 +            { .type = &abstract_type_string,
  48.239 +              .u.string_val = host },
  48.240 +            { .type = &abstract_type_string,
  48.241 +              .u.string_val = key }
  48.242 +        };
  48.243 +
  48.244 +    xen_call_(session, "host.remove_from_other_config", param_values, 2, NULL, NULL);
  48.245 +    return session->ok;
  48.246 +}
  48.247 +
  48.248 +
  48.249 +bool
  48.250 +xen_host_set_logging(xen_session *session, xen_host host, xen_string_string_map *logging)
  48.251 +{
  48.252 +    abstract_value param_values[] =
  48.253 +        {
  48.254 +            { .type = &abstract_type_string,
  48.255 +              .u.string_val = host },
  48.256 +            { .type = &abstract_type_string_string_map,
  48.257 +              .u.set_val = (arbitrary_set *)logging }
  48.258 +        };
  48.259 +
  48.260 +    xen_call_(session, "host.set_logging", param_values, 2, NULL, NULL);
  48.261 +    return session->ok;
  48.262 +}
  48.263 +
  48.264 +
  48.265 +bool
  48.266 +xen_host_add_to_logging(xen_session *session, xen_host host, char *key, char *value)
  48.267 +{
  48.268 +    abstract_value param_values[] =
  48.269 +        {
  48.270 +            { .type = &abstract_type_string,
  48.271 +              .u.string_val = host },
  48.272 +            { .type = &abstract_type_string,
  48.273 +              .u.string_val = key },
  48.274 +            { .type = &abstract_type_string,
  48.275 +              .u.string_val = value }
  48.276 +        };
  48.277 +
  48.278 +    xen_call_(session, "host.add_to_logging", param_values, 3, NULL, NULL);
  48.279 +    return session->ok;
  48.280 +}
  48.281 +
  48.282 +
  48.283 +bool
  48.284 +xen_host_remove_from_logging(xen_session *session, xen_host host, char *key)
  48.285 +{
  48.286 +    abstract_value param_values[] =
  48.287 +        {
  48.288 +            { .type = &abstract_type_string,
  48.289 +              .u.string_val = host },
  48.290 +            { .type = &abstract_type_string,
  48.291 +              .u.string_val = key }
  48.292 +        };
  48.293 +
  48.294 +    xen_call_(session, "host.remove_from_logging", param_values, 2, NULL, NULL);
  48.295 +    return session->ok;
  48.296 +}
  48.297 +
  48.298 +
  48.299 +bool
  48.300 +xen_host_set_suspend_image_sr(xen_session *session, xen_host host, xen_sr suspend_image_sr)
  48.301 +{
  48.302 +    abstract_value param_values[] =
  48.303 +        {
  48.304 +            { .type = &abstract_type_string,
  48.305 +              .u.string_val = host },
  48.306 +            { .type = &abstract_type_string,
  48.307 +              .u.string_val = suspend_image_sr }
  48.308 +        };
  48.309 +
  48.310 +    xen_call_(session, "host.set_suspend_image_sr", param_values, 2, NULL, NULL);
  48.311 +    return session->ok;
  48.312 +}
  48.313 +
  48.314 +
  48.315 +bool
  48.316 +xen_host_set_crash_dump_sr(xen_session *session, xen_host host, xen_sr crash_dump_sr)
  48.317 +{
  48.318 +    abstract_value param_values[] =
  48.319 +        {
  48.320 +            { .type = &abstract_type_string,
  48.321 +              .u.string_val = host },
  48.322 +            { .type = &abstract_type_string,
  48.323 +              .u.string_val = crash_dump_sr }
  48.324 +        };
  48.325 +
  48.326 +    xen_call_(session, "host.set_crash_dump_sr", param_values, 2, NULL, NULL);
  48.327 +    return session->ok;
  48.328 +}
  48.329 +
  48.330 +
  48.331 +bool
  48.332  xen_host_disable(xen_session *session, xen_host host)
  48.333  {
  48.334      abstract_value param_values[] =
    49.1 --- a/tools/libxen/src/xen_host_cpu.c	Tue Jan 30 23:35:32 2007 -0700
    49.2 +++ b/tools/libxen/src/xen_host_cpu.c	Wed Jan 31 10:30:54 2007 -0700
    49.3 @@ -21,8 +21,6 @@
    49.4  #include <stdlib.h>
    49.5  
    49.6  #include "xen_common.h"
    49.7 -#include "xen_cpu_feature.h"
    49.8 -#include "xen_cpu_feature_internal.h"
    49.9  #include "xen_host.h"
   49.10  #include "xen_host_cpu.h"
   49.11  #include "xen_internal.h"
   49.12 @@ -57,9 +55,6 @@ static const struct_member xen_host_cpu_
   49.13          { .key = "modelname",
   49.14            .type = &abstract_type_string,
   49.15            .offset = offsetof(xen_host_cpu_record, modelname) },
   49.16 -        { .key = "features",
   49.17 -          .type = &xen_cpu_feature_set_abstract_type_,
   49.18 -          .offset = offsetof(xen_host_cpu_record, features) },
   49.19          { .key = "utilisation",
   49.20            .type = &abstract_type_float,
   49.21            .offset = offsetof(xen_host_cpu_record, utilisation) }
   49.22 @@ -87,7 +82,6 @@ xen_host_cpu_record_free(xen_host_cpu_re
   49.23      xen_host_record_opt_free(record->host);
   49.24      free(record->vendor);
   49.25      free(record->modelname);
   49.26 -    xen_cpu_feature_set_free(record->features);
   49.27      free(record);
   49.28  }
   49.29  
   49.30 @@ -247,23 +241,6 @@ xen_host_cpu_get_modelname(xen_session *
   49.31  
   49.32  
   49.33  bool
   49.34 -xen_host_cpu_get_features(xen_session *session, struct xen_cpu_feature_set **result, xen_host_cpu host_cpu)
   49.35 -{
   49.36 -    abstract_value param_values[] =
   49.37 -        {
   49.38 -            { .type = &abstract_type_string,
   49.39 -              .u.string_val = host_cpu }
   49.40 -        };
   49.41 -
   49.42 -    abstract_type result_type = xen_cpu_feature_set_abstract_type_;
   49.43 -
   49.44 -    *result = NULL;
   49.45 -    XEN_CALL_("host_cpu.get_features");
   49.46 -    return session->ok;
   49.47 -}
   49.48 -
   49.49 -
   49.50 -bool
   49.51  xen_host_cpu_get_utilisation(xen_session *session, double *result, xen_host_cpu host_cpu)
   49.52  {
   49.53      abstract_value param_values[] =
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/tools/libxen/src/xen_host_metrics.c	Wed Jan 31 10:30:54 2007 -0700
    50.3 @@ -0,0 +1,172 @@
    50.4 +/*
    50.5 + * Copyright (c) 2006, XenSource Inc.
    50.6 + *
    50.7 + * This library is free software; you can redistribute it and/or
    50.8 + * modify it under the terms of the GNU Lesser General Public
    50.9 + * License as published by the Free Software Foundation; either
   50.10 + * version 2.1 of the License, or (at your option) any later version.
   50.11 + *
   50.12 + * This library is distributed in the hope that it will be useful,
   50.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   50.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   50.15 + * Lesser General Public License for more details.
   50.16 + *
   50.17 + * You should have received a copy of the GNU Lesser General Public
   50.18 + * License along with this library; if not, write to the Free Software
   50.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   50.20 + */
   50.21 +
   50.22 +
   50.23 +#include <stddef.h>
   50.24 +#include <stdlib.h>
   50.25 +
   50.26 +#include "xen_common.h"
   50.27 +#include "xen_host.h"
   50.28 +#include "xen_host_metrics.h"
   50.29 +#include "xen_internal.h"
   50.30 +
   50.31 +
   50.32 +XEN_FREE(xen_host_metrics)
   50.33 +XEN_SET_ALLOC_FREE(xen_host_metrics)
   50.34 +XEN_ALLOC(xen_host_metrics_record)
   50.35 +XEN_SET_ALLOC_FREE(xen_host_metrics_record)
   50.36 +XEN_ALLOC(xen_host_metrics_record_opt)
   50.37 +XEN_RECORD_OPT_FREE(xen_host_metrics)
   50.38 +XEN_SET_ALLOC_FREE(xen_host_metrics_record_opt)
   50.39 +
   50.40 +
   50.41 +static const struct_member xen_host_metrics_record_struct_members[] =
   50.42 +    {
   50.43 +        { .key = "uuid",
   50.44 +          .type = &abstract_type_string,
   50.45 +          .offset = offsetof(xen_host_metrics_record, uuid) },
   50.46 +        { .key = "host",
   50.47 +          .type = &abstract_type_ref,
   50.48 +          .offset = offsetof(xen_host_metrics_record, host) },
   50.49 +        { .key = "memory_total",
   50.50 +          .type = &abstract_type_int,
   50.51 +          .offset = offsetof(xen_host_metrics_record, memory_total) },
   50.52 +        { .key = "memory_free",
   50.53 +          .type = &abstract_type_int,
   50.54 +          .offset = offsetof(xen_host_metrics_record, memory_free) }
   50.55 +    };
   50.56 +
   50.57 +const abstract_type xen_host_metrics_record_abstract_type_ =
   50.58 +    {
   50.59 +       .typename = STRUCT,
   50.60 +       .struct_size = sizeof(xen_host_metrics_record),
   50.61 +       .member_count =
   50.62 +           sizeof(xen_host_metrics_record_struct_members) / sizeof(struct_member),
   50.63 +       .members = xen_host_metrics_record_struct_members
   50.64 +    };
   50.65 +
   50.66 +
   50.67 +void
   50.68 +xen_host_metrics_record_free(xen_host_metrics_record *record)
   50.69 +{
   50.70 +    if (record == NULL)
   50.71 +    {
   50.72 +        return;
   50.73 +    }
   50.74 +    free(record->handle);
   50.75 +    free(record->uuid);
   50.76 +    xen_host_record_opt_free(record->host);
   50.77 +    free(record);
   50.78 +}
   50.79 +
   50.80 +
   50.81 +bool
   50.82 +xen_host_metrics_get_record(xen_session *session, xen_host_metrics_record **result, xen_host_metrics host_metrics)
   50.83 +{
   50.84 +    abstract_value param_values[] =
   50.85 +        {
   50.86 +            { .type = &abstract_type_string,
   50.87 +              .u.string_val = host_metrics }
   50.88 +        };
   50.89 +
   50.90 +    abstract_type result_type = xen_host_metrics_record_abstract_type_;
   50.91 +
   50.92 +    *result = NULL;
   50.93 +    XEN_CALL_("host_metrics.get_record");
   50.94 +
   50.95 +    if (session->ok)
   50.96 +    {
   50.97 +       (*result)->handle = xen_strdup_((*result)->uuid);
   50.98 +    }
   50.99 +
  50.100 +    return session->ok;
  50.101 +}
  50.102 +
  50.103 +
  50.104 +bool
  50.105 +xen_host_metrics_get_by_uuid(xen_session *session, xen_host_metrics *result, char *uuid)
  50.106 +{
  50.107 +    abstract_value param_values[] =
  50.108 +        {
  50.109 +            { .type = &abstract_type_string,
  50.110 +              .u.string_val = uuid }
  50.111 +        };
  50.112 +
  50.113 +    abstract_type result_type = abstract_type_string;
  50.114 +
  50.115 +    *result = NULL;
  50.116 +    XEN_CALL_("host_metrics.get_by_uuid");
  50.117 +    return session->ok;
  50.118 +}
  50.119 +
  50.120 +
  50.121 +bool
  50.122 +xen_host_metrics_get_host(xen_session *session, xen_host *result, xen_host_metrics host_metrics)
  50.123 +{
  50.124 +    abstract_value param_values[] =
  50.125 +        {
  50.126 +            { .type = &abstract_type_string,
  50.127 +              .u.string_val = host_metrics }
  50.128 +        };
  50.129 +
  50.130 +    abstract_type result_type = abstract_type_string;
  50.131 +
  50.132 +    *result = NULL;
  50.133 +    XEN_CALL_("host_metrics.get_host");
  50.134 +    return session->ok;
  50.135 +}
  50.136 +
  50.137 +
  50.138 +bool
  50.139 +xen_host_metrics_get_memory_total(xen_session *session, int64_t *result, xen_host_metrics host_metrics)
  50.140 +{
  50.141 +    abstract_value param_values[] =
  50.142 +        {
  50.143 +            { .type = &abstract_type_string,
  50.144 +              .u.string_val = host_metrics }
  50.145 +        };
  50.146 +
  50.147 +    abstract_type result_type = abstract_type_int;
  50.148 +
  50.149 +    XEN_CALL_("host_metrics.get_memory_total");
  50.150 +    return session->ok;
  50.151 +}
  50.152 +
  50.153 +
  50.154 +bool
  50.155 +xen_host_metrics_get_memory_free(xen_session *session, int64_t *result, xen_host_metrics host_metrics)
  50.156 +{
  50.157 +    abstract_value param_values[] =
  50.158 +        {
  50.159 +            { .type = &abstract_type_string,
  50.160 +              .u.string_val = host_metrics }
  50.161 +        };
  50.162 +
  50.163 +    abstract_type result_type = abstract_type_int;
  50.164 +
  50.165 +    XEN_CALL_("host_metrics.get_memory_free");
  50.166 +    return session->ok;
  50.167 +}
  50.168 +
  50.169 +
  50.170 +bool
  50.171 +xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics)
  50.172 +{
  50.173 +    *result = session->ok ? xen_strdup_((char *)host_metrics) : NULL;
  50.174 +    return session->ok;
  50.175 +}
    51.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.2 +++ b/tools/libxen/src/xen_pbd.c	Wed Jan 31 10:30:54 2007 -0700
    51.3 @@ -0,0 +1,228 @@
    51.4 +/*
    51.5 + * Copyright (c) 2006, XenSource Inc.
    51.6 + *
    51.7 + * This library is free software; you can redistribute it and/or
    51.8 + * modify it under the terms of the GNU Lesser General Public
    51.9 + * License as published by the Free Software Foundation; either
   51.10 + * version 2.1 of the License, or (at your option) any later version.
   51.11 + *
   51.12 + * This library is distributed in the hope that it will be useful,
   51.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   51.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   51.15 + * Lesser General Public License for more details.
   51.16 + *
   51.17 + * You should have received a copy of the GNU Lesser General Public
   51.18 + * License along with this library; if not, write to the Free Software
   51.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   51.20 + */
   51.21 +
   51.22 +
   51.23 +#include <stddef.h>
   51.24 +#include <stdlib.h>
   51.25 +
   51.26 +#include "xen_common.h"
   51.27 +#include "xen_host.h"
   51.28 +#include "xen_internal.h"
   51.29 +#include "xen_pbd.h"
   51.30 +#include "xen_sr.h"
   51.31 +#include "xen_string_string_map.h"
   51.32 +
   51.33 +
   51.34 +XEN_FREE(xen_pbd)
   51.35 +XEN_SET_ALLOC_FREE(xen_pbd)
   51.36 +XEN_ALLOC(xen_pbd_record)
   51.37 +XEN_SET_ALLOC_FREE(xen_pbd_record)
   51.38 +XEN_ALLOC(xen_pbd_record_opt)
   51.39 +XEN_RECORD_OPT_FREE(xen_pbd)
   51.40 +XEN_SET_ALLOC_FREE(xen_pbd_record_opt)
   51.41 +
   51.42 +
   51.43 +static const struct_member xen_pbd_record_struct_members[] =
   51.44 +    {
   51.45 +        { .key = "uuid",
   51.46 +          .type = &abstract_type_string,
   51.47 +          .offset = offsetof(xen_pbd_record, uuid) },
   51.48 +        { .key = "host",
   51.49 +          .type = &abstract_type_ref,
   51.50 +          .offset = offsetof(xen_pbd_record, host) },
   51.51 +        { .key = "SR",
   51.52 +          .type = &abstract_type_ref,
   51.53 +          .offset = offsetof(xen_pbd_record, sr) },
   51.54 +        { .key = "device_config",
   51.55 +          .type = &abstract_type_string_string_map,
   51.56 +          .offset = offsetof(xen_pbd_record, device_config) },
   51.57 +        { .key = "currently_attached",
   51.58 +          .type = &abstract_type_bool,
   51.59 +          .offset = offsetof(xen_pbd_record, currently_attached) }
   51.60 +    };
   51.61 +
   51.62 +const abstract_type xen_pbd_record_abstract_type_ =
   51.63 +    {
   51.64 +       .typename = STRUCT,
   51.65 +       .struct_size = sizeof(xen_pbd_record),
   51.66 +       .member_count =
   51.67 +           sizeof(xen_pbd_record_struct_members) / sizeof(struct_member),
   51.68 +       .members = xen_pbd_record_struct_members
   51.69 +    };
   51.70 +
   51.71 +
   51.72 +void
   51.73 +xen_pbd_record_free(xen_pbd_record *record)
   51.74 +{
   51.75 +    if (record == NULL)
   51.76 +    {
   51.77 +        return;
   51.78 +    }
   51.79 +    free(record->handle);
   51.80 +    free(record->uuid);
   51.81 +    xen_host_record_opt_free(record->host);
   51.82 +    xen_sr_record_opt_free(record->sr);
   51.83 +    xen_string_string_map_free(record->device_config);
   51.84 +    free(record);
   51.85 +}
   51.86 +
   51.87 +
   51.88 +bool
   51.89 +xen_pbd_get_record(xen_session *session, xen_pbd_record **result, xen_pbd pbd)
   51.90 +{
   51.91 +    abstract_value param_values[] =
   51.92 +        {
   51.93 +            { .type = &abstract_type_string,
   51.94 +              .u.string_val = pbd }
   51.95 +        };
   51.96 +
   51.97 +    abstract_type result_type = xen_pbd_record_abstract_type_;
   51.98 +
   51.99 +    *result = NULL;
  51.100 +    XEN_CALL_("PBD.get_record");
  51.101 +
  51.102 +    if (session->ok)
  51.103 +    {
  51.104 +       (*result)->handle = xen_strdup_((*result)->uuid);
  51.105 +    }
  51.106 +
  51.107 +    return session->ok;
  51.108 +}
  51.109 +
  51.110 +
  51.111 +bool
  51.112 +xen_pbd_get_by_uuid(xen_session *session, xen_pbd *result, char *uuid)
  51.113 +{
  51.114 +    abstract_value param_values[] =
  51.115 +        {
  51.116 +            { .type = &abstract_type_string,
  51.117 +              .u.string_val = uuid }
  51.118 +        };
  51.119 +
  51.120 +    abstract_type result_type = abstract_type_string;
  51.121 +
  51.122 +    *result = NULL;
  51.123 +    XEN_CALL_("PBD.get_by_uuid");
  51.124 +    return session->ok;
  51.125 +}
  51.126 +
  51.127 +
  51.128 +bool
  51.129 +xen_pbd_create(xen_session *session, xen_pbd *result, xen_pbd_record *record)
  51.130 +{
  51.131 +    abstract_value param_values[] =
  51.132 +        {
  51.133 +            { .type = &xen_pbd_record_abstract_type_,
  51.134 +              .u.struct_val = record }
  51.135 +        };
  51.136 +
  51.137 +    abstract_type result_type = abstract_type_string;
  51.138 +
  51.139 +    *result = NULL;
  51.140 +    XEN_CALL_("PBD.create");
  51.141 +    return session->ok;
  51.142 +}
  51.143 +
  51.144 +
  51.145 +bool
  51.146 +xen_pbd_destroy(xen_session *session, xen_pbd pbd)
  51.147 +{
  51.148 +    abstract_value param_values[] =
  51.149 +        {
  51.150 +            { .type = &abstract_type_string,
  51.151 +              .u.string_val = pbd }
  51.152 +        };
  51.153 +
  51.154 +    xen_call_(session, "PBD.destroy", param_values, 1, NULL, NULL);
  51.155 +    return session->ok;
  51.156 +}
  51.157 +
  51.158 +
  51.159 +bool
  51.160 +xen_pbd_get_host(xen_session *session, xen_host *result, xen_pbd pbd)
  51.161 +{
  51.162 +    abstract_value param_values[] =
  51.163 +        {
  51.164 +            { .type = &abstract_type_string,
  51.165 +              .u.string_val = pbd }
  51.166 +        };
  51.167 +
  51.168 +    abstract_type result_type = abstract_type_string;
  51.169 +
  51.170 +    *result = NULL;
  51.171 +    XEN_CALL_("PBD.get_host");
  51.172 +    return session->ok;
  51.173 +}
  51.174 +
  51.175 +
  51.176 +bool
  51.177 +xen_pbd_get_sr(xen_session *session, xen_sr *result, xen_pbd pbd)
  51.178 +{
  51.179 +    abstract_value param_values[] =
  51.180 +        {
  51.181 +            { .type = &abstract_type_string,
  51.182 +              .u.string_val = pbd }
  51.183 +        };
  51.184 +
  51.185 +    abstract_type result_type = abstract_type_string;
  51.186 +
  51.187 +    *result = NULL;
  51.188 +    XEN_CALL_("PBD.get_SR");
  51.189 +    return session->ok;
  51.190 +}
  51.191 +
  51.192 +
  51.193 +bool
  51.194 +xen_pbd_get_device_config(xen_session *session, xen_string_string_map **result, xen_pbd pbd)
  51.195 +{
  51.196 +    abstract_value param_values[] =
  51.197 +        {
  51.198 +            { .type = &abstract_type_string,
  51.199 +              .u.string_val = pbd }
  51.200 +        };
  51.201 +
  51.202 +    abstract_type result_type = abstract_type_string_string_map;
  51.203 +
  51.204 +    *result = NULL;
  51.205 +    XEN_CALL_("PBD.get_device_config");
  51.206 +    return session->ok;
  51.207 +}
  51.208 +
  51.209 +
  51.210 +bool
  51.211 +xen_pbd_get_currently_attached(xen_session *session, bool *result, xen_pbd pbd)
  51.212 +{
  51.213 +    abstract_value param_values[] =
  51.214 +        {
  51.215 +            { .type = &abstract_type_string,
  51.216 +              .u.string_val = pbd }
  51.217 +        };
  51.218 +
  51.219 +    abstract_type result_type = abstract_type_bool;
  51.220 +
  51.221 +    XEN_CALL_("PBD.get_currently_attached");
  51.222 +    return session->ok;
  51.223 +}
  51.224 +
  51.225 +
  51.226 +bool
  51.227 +xen_pbd_get_uuid(xen_session *session, char **result, xen_pbd pbd)
  51.228 +{
  51.229 +    *result = session->ok ? xen_strdup_((char *)pbd) : NULL;
  51.230 +    return session->ok;
  51.231 +}
    52.1 --- a/tools/libxen/src/xen_pif.c	Tue Jan 30 23:35:32 2007 -0700
    52.2 +++ b/tools/libxen/src/xen_pif.c	Wed Jan 31 10:30:54 2007 -0700
    52.3 @@ -25,6 +25,7 @@
    52.4  #include "xen_internal.h"
    52.5  #include "xen_network.h"
    52.6  #include "xen_pif.h"
    52.7 +#include "xen_pif_metrics.h"
    52.8  
    52.9  
   52.10  XEN_FREE(xen_pif)
   52.11 @@ -41,9 +42,9 @@ static const struct_member xen_pif_recor
   52.12          { .key = "uuid",
   52.13            .type = &abstract_type_string,
   52.14            .offset = offsetof(xen_pif_record, uuid) },
   52.15 -        { .key = "name",
   52.16 +        { .key = "device",
   52.17            .type = &abstract_type_string,
   52.18 -          .offset = offsetof(xen_pif_record, name) },
   52.19 +          .offset = offsetof(xen_pif_record, device) },
   52.20          { .key = "network",
   52.21            .type = &abstract_type_ref,
   52.22            .offset = offsetof(xen_pif_record, network) },
   52.23 @@ -57,14 +58,11 @@ static const struct_member xen_pif_recor
   52.24            .type = &abstract_type_int,
   52.25            .offset = offsetof(xen_pif_record, mtu) },
   52.26          { .key = "VLAN",
   52.27 -          .type = &abstract_type_string,
   52.28 +          .type = &abstract_type_int,
   52.29            .offset = offsetof(xen_pif_record, vlan) },
   52.30 -        { .key = "io_read_kbs",
   52.31 -          .type = &abstract_type_float,
   52.32 -          .offset = offsetof(xen_pif_record, io_read_kbs) },
   52.33 -        { .key = "io_write_kbs",
   52.34 -          .type = &abstract_type_float,
   52.35 -          .offset = offsetof(xen_pif_record, io_write_kbs) }
   52.36 +        { .key = "metrics",
   52.37 +          .type = &abstract_type_ref,
   52.38 +          .offset = offsetof(xen_pif_record, metrics) }
   52.39      };
   52.40  
   52.41  const abstract_type xen_pif_record_abstract_type_ =
   52.42 @@ -86,11 +84,11 @@ xen_pif_record_free(xen_pif_record *reco
   52.43      }
   52.44      free(record->handle);
   52.45      free(record->uuid);
   52.46 -    free(record->name);
   52.47 +    free(record->device);
   52.48      xen_network_record_opt_free(record->network);
   52.49      xen_host_record_opt_free(record->host);
   52.50      free(record->mac);
   52.51 -    free(record->vlan);
   52.52 +    xen_pif_metrics_record_opt_free(record->metrics);
   52.53      free(record);
   52.54  }
   52.55  
   52.56 @@ -136,38 +134,7 @@ xen_pif_get_by_uuid(xen_session *session
   52.57  
   52.58  
   52.59  bool
   52.60 -xen_pif_create(xen_session *session, xen_pif *result, xen_pif_record *record)
   52.61 -{
   52.62 -    abstract_value param_values[] =
   52.63 -        {
   52.64 -            { .type = &xen_pif_record_abstract_type_,
   52.65 -              .u.struct_val = record }
   52.66 -        };
   52.67 -
   52.68 -    abstract_type result_type = abstract_type_string;
   52.69 -
   52.70 -    *result = NULL;
   52.71 -    XEN_CALL_("PIF.create");
   52.72 -    return session->ok;
   52.73 -}
   52.74 -
   52.75 -
   52.76 -bool
   52.77 -xen_pif_destroy(xen_session *session, xen_pif pif)
   52.78 -{
   52.79 -    abstract_value param_values[] =
   52.80 -        {
   52.81 -            { .type = &abstract_type_string,
   52.82 -              .u.string_val = pif }
   52.83 -        };
   52.84 -
   52.85 -    xen_call_(session, "PIF.destroy", param_values, 1, NULL, NULL);
   52.86 -    return session->ok;
   52.87 -}
   52.88 -
   52.89 -
   52.90 -bool
   52.91 -xen_pif_get_name(xen_session *session, char **result, xen_pif pif)
   52.92 +xen_pif_get_device(xen_session *session, char **result, xen_pif pif)
   52.93  {
   52.94      abstract_value param_values[] =
   52.95          {
   52.96 @@ -178,7 +145,7 @@ xen_pif_get_name(xen_session *session, c
   52.97      abstract_type result_type = abstract_type_string;
   52.98  
   52.99      *result = NULL;
  52.100 -    XEN_CALL_("PIF.get_name");
  52.101 +    XEN_CALL_("PIF.get_device");
  52.102      return session->ok;
  52.103  }
  52.104  
  52.105 @@ -251,7 +218,23 @@ xen_pif_get_mtu(xen_session *session, in
  52.106  
  52.107  
  52.108  bool
  52.109 -xen_pif_get_vlan(xen_session *session, char **result, xen_pif pif)
  52.110 +xen_pif_get_vlan(xen_session *session, int64_t *result, xen_pif pif)
  52.111 +{
  52.112 +    abstract_value param_values[] =
  52.113 +        {
  52.114 +            { .type = &abstract_type_string,
  52.115 +              .u.string_val = pif }
  52.116 +        };
  52.117 +
  52.118 +    abstract_type result_type = abstract_type_int;
  52.119 +
  52.120 +    XEN_CALL_("PIF.get_VLAN");
  52.121 +    return session->ok;
  52.122 +}
  52.123 +
  52.124 +
  52.125 +bool
  52.126 +xen_pif_get_metrics(xen_session *session, xen_pif_metrics *result, xen_pif pif)
  52.127  {
  52.128      abstract_value param_values[] =
  52.129          {
  52.130 @@ -262,87 +245,23 @@ xen_pif_get_vlan(xen_session *session, c
  52.131      abstract_type result_type = abstract_type_string;
  52.132  
  52.133      *result = NULL;
  52.134 -    XEN_CALL_("PIF.get_VLAN");
  52.135 +    XEN_CALL_("PIF.get_metrics");
  52.136      return session->ok;
  52.137  }
  52.138  
  52.139  
  52.140  bool
  52.141 -xen_pif_get_io_read_kbs(xen_session *session, double *result, xen_pif pif)
  52.142 -{
  52.143 -    abstract_value param_values[] =
  52.144 -        {
  52.145 -            { .type = &abstract_type_string,
  52.146 -              .u.string_val = pif }
  52.147 -        };
  52.148 -
  52.149 -    abstract_type result_type = abstract_type_float;
  52.150 -
  52.151 -    XEN_CALL_("PIF.get_io_read_kbs");
  52.152 -    return session->ok;
  52.153 -}
  52.154 -
  52.155 -
  52.156 -bool
  52.157 -xen_pif_get_io_write_kbs(xen_session *session, double *result, xen_pif pif)
  52.158 -{
  52.159 -    abstract_value param_values[] =
  52.160 -        {
  52.161 -            { .type = &abstract_type_string,
  52.162 -              .u.string_val = pif }
  52.163 -        };
  52.164 -
  52.165 -    abstract_type result_type = abstract_type_float;
  52.166 -
  52.167 -    XEN_CALL_("PIF.get_io_write_kbs");
  52.168 -    return session->ok;
  52.169 -}
  52.170 -
  52.171 -
  52.172 -bool
  52.173 -xen_pif_set_name(xen_session *session, xen_pif pif, char *name)
  52.174 +xen_pif_set_device(xen_session *session, xen_pif pif, char *device)
  52.175  {
  52.176      abstract_value param_values[] =
  52.177          {
  52.178              { .type = &abstract_type_string,
  52.179                .u.string_val = pif },
  52.180              { .type = &abstract_type_string,
  52.181 -              .u.string_val = name }
  52.182 +              .u.string_val = device }
  52.183          };
  52.184  
  52.185 -    xen_call_(session, "PIF.set_name", param_values, 2, NULL, NULL);
  52.186 -    return session->ok;
  52.187 -}
  52.188 -
  52.189 -
  52.190 -bool
  52.191 -xen_pif_set_network(xen_session *session, xen_pif pif, xen_network network)
  52.192 -{
  52.193 -    abstract_value param_values[] =
  52.194 -        {
  52.195 -            { .type = &abstract_type_string,
  52.196 -              .u.string_val = pif },
  52.197 -            { .type = &abstract_type_string,
  52.198 -              .u.string_val = network }
  52.199 -        };
  52.200 -
  52.201 -    xen_call_(session, "PIF.set_network", param_values, 2, NULL, NULL);
  52.202 -    return session->ok;
  52.203 -}
  52.204 -
  52.205 -
  52.206 -bool
  52.207 -xen_pif_set_host(xen_session *session, xen_pif pif, xen_host host)
  52.208 -{
  52.209 -    abstract_value param_values[] =
  52.210 -        {
  52.211 -            { .type = &abstract_type_string,
  52.212 -              .u.string_val = pif },
  52.213 -            { .type = &abstract_type_string,
  52.214 -              .u.string_val = host }
  52.215 -        };
  52.216 -
  52.217 -    xen_call_(session, "PIF.set_host", param_values, 2, NULL, NULL);
  52.218 +    xen_call_(session, "PIF.set_device", param_values, 2, NULL, NULL);
  52.219      return session->ok;
  52.220  }
  52.221  
  52.222 @@ -380,14 +299,14 @@ xen_pif_set_mtu(xen_session *session, xe
  52.223  
  52.224  
  52.225  bool
  52.226 -xen_pif_set_vlan(xen_session *session, xen_pif pif, char *vlan)
  52.227 +xen_pif_set_vlan(xen_session *session, xen_pif pif, int64_t vlan)
  52.228  {
  52.229      abstract_value param_values[] =
  52.230          {
  52.231              { .type = &abstract_type_string,
  52.232                .u.string_val = pif },
  52.233 -            { .type = &abstract_type_string,
  52.234 -              .u.string_val = vlan }
  52.235 +            { .type = &abstract_type_int,
  52.236 +              .u.int_val = vlan }
  52.237          };
  52.238  
  52.239      xen_call_(session, "PIF.set_VLAN", param_values, 2, NULL, NULL);
  52.240 @@ -396,6 +315,43 @@ xen_pif_set_vlan(xen_session *session, x
  52.241  
  52.242  
  52.243  bool
  52.244 +xen_pif_create_vlan(xen_session *session, xen_pif *result, char *device, xen_network network, xen_host host, int64_t vlan)
  52.245 +{
  52.246 +    abstract_value param_values[] =
  52.247 +        {
  52.248 +            { .type = &abstract_type_string,
  52.249 +              .u.string_val = device },
  52.250 +            { .type = &abstract_type_string,
  52.251 +              .u.string_val = network },
  52.252 +            { .type = &abstract_type_string,
  52.253 +              .u.string_val = host },
  52.254 +            { .type = &abstract_type_int,
  52.255 +              .u.int_val = vlan }
  52.256 +        };
  52.257 +
  52.258 +    abstract_type result_type = abstract_type_string;
  52.259 +
  52.260 +    *result = NULL;
  52.261 +    XEN_CALL_("PIF.create_VLAN");
  52.262 +    return session->ok;
  52.263 +}
  52.264 +
  52.265 +
  52.266 +bool
  52.267 +xen_pif_destroy(xen_session *session, xen_pif self)
  52.268 +{
  52.269 +    abstract_value param_values[] =
  52.270 +        {
  52.271 +            { .type = &abstract_type_string,
  52.272 +              .u.string_val = self }
  52.273 +        };
  52.274 +
  52.275 +    xen_call_(session, "PIF.destroy", param_values, 1, NULL, NULL);
  52.276 +    return session->ok;
  52.277 +}
  52.278 +
  52.279 +
  52.280 +bool
  52.281  xen_pif_get_uuid(xen_session *session, char **result, xen_pif pif)
  52.282  {
  52.283      *result = session->ok ? xen_strdup_((char *)pif) : NULL;
    53.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.2 +++ b/tools/libxen/src/xen_pif_metrics.c	Wed Jan 31 10:30:54 2007 -0700
    53.3 @@ -0,0 +1,172 @@
    53.4 +/*
    53.5 + * Copyright (c) 2006, XenSource Inc.
    53.6 + *
    53.7 + * This library is free software; you can redistribute it and/or
    53.8 + * modify it under the terms of the GNU Lesser General Public
    53.9 + * License as published by the Free Software Foundation; either
   53.10 + * version 2.1 of the License, or (at your option) any later version.
   53.11 + *
   53.12 + * This library is distributed in the hope that it will be useful,
   53.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
   53.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   53.15 + * Lesser General Public License for more details.
   53.16 + *
   53.17 + * You should have received a copy of the GNU Lesser General Public
   53.18 + * License along with this library; if not, write to the Free Software
   53.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
   53.20 + */
   53.21 +
   53.22 +
   53.23 +#include <stddef.h>
   53.24 +#include <stdlib.h>
   53.25 +
   53.26 +#include "xen_common.h"
   53.27 +#include "xen_internal.h"
   53.28 +#include "xen_pif.h"
   53.29 +#include "xen_pif_metrics.h"
   53.30 +
   53.31 +
   53.32 +XEN_FREE(xen_pif_metrics)
   53.33 +XEN_SET_ALLOC_FREE(xen_pif_metrics)
   53.34 +XEN_ALLOC(xen_pif_metrics_record)
   53.35 +XEN_SET_ALLOC_FREE(xen_pif_metrics_record)
   53.36 +XEN_ALLOC(xen_pif_metrics_record_opt)
   53.37 +XEN_RECORD_OPT_FREE(xen_pif_metrics)
   53.38 +XEN_SET_ALLOC_FREE(xen_pif_metrics_record_opt)
   53.39 +
   53.40 +
   53.41 +static const struct_member xen_pif_metrics_record_struct_members[] =
   53.42 +    {
   53.43 +        { .key = "uuid",
   53.44 +          .type = &abstract_type_string,
   53.45 +          .offset = offsetof(xen_pif_metrics_record, uuid) },
   53.46 +        { .key = "PIF",
   53.47 +          .type = &abstract_type_ref,
   53.48 +          .offset = offsetof(xen_pif_metrics_record, pif) },
   53.49 +        { .key = "io_read_kbs",
   53.50 +          .type = &abstract_type_float,
   53.51 +          .offset = offsetof(xen_pif_metrics_record, io_read_kbs) },
   53.52 +        { .key = "io_write_kbs",
   53.53 +          .type = &abstract_type_float,
   53.54 +          .offset = offsetof(xen_pif_metrics_record, io_write_kbs) }
   53.55 +    };
   53.56 +
   53.57 +const abstract_type xen_pif_metrics_record_abstract_type_ =
   53.58 +    {
   53.59 +       .typename = STRUCT,
   53.60 +       .struct_size = sizeof(xen_pif_metrics_record),
   53.61 +       .member_count =
   53.62 +           sizeof(xen_pif_metrics_record_struct_members) / sizeof(struct_member),
   53.63 +       .members = xen_pif_metrics_record_struct_members
   53.64 +    };
   53.65 +
   53.66 +
   53.67 +void
   53.68 +xen_pif_metrics_record_free(xen_pif_metrics_record *record)
   53.69 +{
   53.70 +    if (record == NULL)
   53.71 +    {
   53.72 +        return;
   53.73 +    }
   53.74 +    free(record->handle);
   53.75 +    free(record->uuid);
   53.76 +    xen_pif_record_opt_free(record->pif);
   53.77 +    free(record);
   53.78 +}
   53.79 +
   53.80 +
   53.81 +bool
   53.82 +xen_pif_metrics_get_record(xen_session *session, xen_pif_metrics_record **result, xen_pif_metrics pif_metrics)
   53.83 +{
   53.84 +    abstract_value param_values[] =
   53.85 +        {
   53.86 +            { .type = &abstract_type_string,
   53.87 +              .u.string_val = pif_metrics }
   53.88 +        };
   53.89 +
   53.90 +    abstract_type result_type = xen_pif_metrics_record_abstract_type_;
   53.91 +
   53.92 +    *result = NULL;
   53.93 +    XEN_CALL_("PIF_metrics.get_record");
   53.94 +
   53.95 +    if (session->ok)
   53.96 +    {
   53.97 +       (*result)->handle = xen_strdup_((*result)->uuid);
   53.98 +    }
   53.99 +
  53.100 +    return session->ok;
  53.101 +}
  53.102 +
  53.103 +
  53.104 +bool
  53.105 +xen_pif_metrics_get_by_uuid(xen_session *session, xen_pif_metrics *result, char *uuid)
  53.106 +{
  53.107 +    abstract_value param_values[] =
  53.108 +        {
  53.109 +            { .type = &abstract_type_string,
  53.110 +              .u.string_val = uuid }
  53.111 +        };
  53.112 +
  53.113 +    abstract_type result_type = abstract_type_string;
  53.114 +
  53.115 +    *result = NULL;
  53.116 +    XEN_CALL_("PIF_metrics.get_by_uuid");
  53.117 +    return session->ok;
  53.118 +}
  53.119 +
  53.120 +
  53.121 +bool
  53.122 +xen_pif_metrics_get_pif(xen_session *session, xen_pif *result, xen_pif_metrics pif_metrics)
  53.123 +{
  53.124 +    abstract_value param_values[] =
  53.125 +        {
  53.126 +            { .type = &abstract_type_string,
  53.127 +              .u.string_val = pif_metrics }
  53.128 +        };
  53.129 +
  53.130 +    abstract_type result_type = abstract_type_string;
  53.131 +
  53.132 +    *result = NULL;
  53.133 +    XEN_CALL_("PIF_metrics.get_PIF");
  53.134 +    return session->ok;
  53.135 +}
  53.136 +
  53.137 +
  53.138 +bool
  53.139 +xen_pif_metrics_get_io_read_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics)
  53.140 +{
  53.141 +    abstract_value param_values[] =
  53.142 +        {
  53.143 +            { .type = &abstract_type_string,
  53.144 +              .u.string_val = pif_metrics }
  53.145 +        };
  53.146 +
  53.147 +    abstract_type result_type = abstract_type_float;
  53.148 +
  53.149 +    XEN_CALL_("PIF_metrics.get_io_read_kbs");
  53.150 +    return session->ok;
  53.151 +}
  53.152 +
  53.153 +
  53.154 +bool
  53.155 +xen_pif_metrics_get_io_write_kbs(xen_session *session, double *result, xen_pif_metrics pif_metrics)
  53.156 +{
  53.157 +    abstract_value param_values[] =
  53.158 +        {
  53.159 +            { .type = &abstract_type_string,
  53.160 +              .u.string_val = pif_metrics }
  53.161 +        };
  53.162 +
  53.163 +    abstract_type result_type = abstract_type_float;
  53.164 +
  53.165 +    XEN_CALL_("PIF_metrics.get_io_write_kbs");
  53.166 +    return session->ok;
  53.167 +}
  53.168 +
  53.169 +
  53.170 +bool
  53.171 +xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics)
  53.172 +{
  53.173 +    *result = session->ok ? xen_strdup_((char *)pif_metrics) : NULL;
  53.174 +    return session->ok;
  53.175 +}
    54.1 --- a/tools/libxen/src/xen_sr.c	Tue Jan 30 23:35:32 2007 -0700
    54.2 +++ b/tools/libxen/src/xen_sr.c	Wed Jan 31 10:30:54 2007 -0700
    54.3 @@ -22,6 +22,7 @@
    54.4  
    54.5  #include "xen_common.h"
    54.6  #include "xen_internal.h"
    54.7 +#include "xen_pbd.h"
    54.8  #include "xen_sr.h"
    54.9  #include "xen_vdi.h"
   54.10  
   54.11 @@ -49,6 +50,9 @@ static const struct_member xen_sr_record
   54.12          { .key = "VDIs",
   54.13            .type = &abstract_type_ref_set,
   54.14            .offset = offsetof(xen_sr_record, vdis) },
   54.15 +        { .key = "PBDs",
   54.16 +          .type = &abstract_type_ref_set,
   54.17 +          .offset = offsetof(xen_sr_record, pbds) },
   54.18          { .key = "virtual_allocation",
   54.19            .type = &abstract_type_int,
   54.20            .offset = offsetof(xen_sr_record, virtual_allocation) },
   54.21 @@ -88,6 +92,7 @@ xen_sr_record_free(xen_sr_record *record
   54.22      free(record->name_label);
   54.23      free(record->name_description);
   54.24      xen_vdi_record_opt_set_free(record->vdis);
   54.25 +    xen_pbd_record_opt_set_free(record->pbds);
   54.26      free(record->type);
   54.27      free(record->location);
   54.28      free(record);
    55.1 --- a/tools/libxen/src/xen_vbd.c	Tue Jan 30 23:35:32 2007 -0700
    55.2 +++ b/tools/libxen/src/xen_vbd.c	Wed Jan 31 10:30:54 2007 -0700
    55.3 @@ -21,7 +21,6 @@
    55.4  #include <stdlib.h>
    55.5  
    55.6  #include "xen_common.h"
    55.7 -#include "xen_driver_type_internal.h"
    55.8  #include "xen_internal.h"
    55.9  #include "xen_vbd.h"
   55.10  #include "xen_vbd_mode_internal.h"
   55.11 @@ -55,12 +54,12 @@ static const struct_member xen_vbd_recor
   55.12          { .key = "image",
   55.13            .type = &abstract_type_string,
   55.14            .offset = offsetof(xen_vbd_record, image) },
   55.15 +        { .key = "bootable",
   55.16 +          .type = &abstract_type_bool,
   55.17 +          .offset = offsetof(xen_vbd_record, bootable) },
   55.18          { .key = "mode",
   55.19            .type = &xen_vbd_mode_abstract_type_,
   55.20            .offset = offsetof(xen_vbd_record, mode) },
   55.21 -        { .key = "driver",
   55.22 -          .type = &xen_driver_type_abstract_type_,
   55.23 -          .offset = offsetof(xen_vbd_record, driver) },
   55.24          { .key = "io_read_kbs",
   55.25            .type = &abstract_type_float,
   55.26            .offset = offsetof(xen_vbd_record, io_read_kbs) },
   55.27 @@ -218,6 +217,22 @@ xen_vbd_get_device(xen_session *session,
   55.28  
   55.29  
   55.30  bool
   55.31 +xen_vbd_get_bootable(xen_session *session, bool *result, xen_vbd vbd)
   55.32 +{
   55.33 +    abstract_value param_values[] =
   55.34 +        {
   55.35 +            { .type = &abstract_type_string,
   55.36 +              .u.string_val = vbd }
   55.37 +        };
   55.38 +
   55.39 +    abstract_type result_type = abstract_type_bool;
   55.40 +
   55.41 +    XEN_CALL_("VBD.get_bootable");
   55.42 +    return session->ok;
   55.43 +}
   55.44 +
   55.45 +
   55.46 +bool
   55.47  xen_vbd_get_mode(xen_session *session, enum xen_vbd_mode *result, xen_vbd vbd)
   55.48  {
   55.49      abstract_value param_values[] =
   55.50 @@ -235,23 +250,6 @@ xen_vbd_get_mode(xen_session *session, e
   55.51  
   55.52  
   55.53  bool
   55.54 -xen_vbd_get_driver(xen_session *session, enum xen_driver_type *result, xen_vbd vbd)
   55.55 -{
   55.56 -    abstract_value param_values[] =
   55.57 -        {
   55.58 -            { .type = &abstract_type_string,
   55.59 -              .u.string_val = vbd }
   55.60 -        };
   55.61 -
   55.62 -    abstract_type result_type = xen_driver_type_abstract_type_;
   55.63 -    char *result_str = NULL;
   55.64 -    XEN_CALL_("VBD.get_driver");
   55.65 -    *result = xen_driver_type_from_string(session, result_str);
   55.66 -    return session->ok;
   55.67 -}
   55.68 -
   55.69 -
   55.70 -bool
   55.71  xen_vbd_get_io_read_kbs(xen_session *session, double *result, xen_vbd vbd)
   55.72  {
   55.73      abstract_value param_values[] =
   55.74 @@ -284,38 +282,6 @@ xen_vbd_get_io_write_kbs(xen_session *se
   55.75  
   55.76  
   55.77  bool
   55.78 -xen_vbd_set_vm(xen_session *session, xen_vbd vbd, xen_vm vm)
   55.79 -{
   55.80 -    abstract_value param_values[] =
   55.81 -        {
   55.82 -            { .type = &abstract_type_string,
   55.83 -              .u.string_val = vbd },
   55.84 -            { .type = &abstract_type_string,
   55.85 -              .u.string_val = vm }
   55.86 -        };
   55.87 -
   55.88 -    xen_call_(session, "VBD.set_VM", param_values, 2, NULL, NULL);
   55.89 -    return session->ok;
   55.90 -}
   55.91 -
   55.92 -
   55.93 -bool
   55.94 -xen_vbd_set_vdi(xen_session *session, xen_vbd vbd, xen_vdi vdi)
   55.95 -{
   55.96 -    abstract_value param_values[] =
   55.97 -        {
   55.98 -            { .type = &abstract_type_string,
   55.99 -              .u.string_val = vbd },
  55.100 -            { .type = &abstract_type_string,
  55.101 -              .u.string_val = vdi }
  55.102 -        };
  55.103 -
  55.104 -    xen_call_(session, "VBD.set_VDI", param_values, 2, NULL, NULL);
  55.105 -    return session->ok;
  55.106 -}
  55.107 -
  55.108 -
  55.109 -bool
  55.110  xen_vbd_set_device(xen_session *session, xen_vbd vbd, char *device)
  55.111  {
  55.112      abstract_value param_values[] =
  55.113 @@ -332,6 +298,22 @@ xen_vbd_set_device(xen_session *session,
  55.114  
  55.115  
  55.116  bool
  55.117 +xen_vbd_set_bootable(xen_session *session, xen_vbd vbd, bool bootable)
  55.118 +{
  55.119 +    abstract_value param_values[] =
  55.120 +        {
  55.121 +            { .type = &abstract_type_string,
  55.122 +              .u.string_val = vbd },
  55.123 +            { .type = &abstract_type_bool,
  55.124 +              .u.bool_val = bootable }
  55.125 +        };
  55.126 +
  55.127 +    xen_call_(session, "VBD.set_bootable", param_values, 2, NULL, NULL);
  55.128 +    return session->ok;
  55.129 +}
  55.130 +
  55.131 +
  55.132 +bool
  55.133  xen_vbd_set_mode(xen_session *session, xen_vbd vbd, enum xen_vbd_mode mode)
  55.134  {
  55.135      abstract_value param_values[] =
  55.136 @@ -348,22 +330,6 @@ xen_vbd_set_mode(xen_session *session, x
  55.137  
  55.138  
  55.139  bool
  55.140 -xen_vbd_set_driver(xen_session *session, xen_vbd vbd, enum xen_driver_type driver)
  55.141 -{
  55.142 -    abstract_value param_values[] =
  55.143 -        {
  55.144 -            { .type = &abstract_type_string,
  55.145 -              .u.string_val = vbd },
  55.146 -            { .type = &xen_driver_type_abstract_type_,
  55.147 -              .u.string_val = xen_driver_type_to_string(driver) }
  55.148 -        };
  55.149 -
  55.150 -    xen_call_(session, "VBD.set_driver", param_values, 2, NULL, NULL);
  55.151 -    return session->ok;
  55.152 -}
  55.153 -
  55.154 -
  55.155 -bool
  55.156  xen_vbd_media_change(xen_session *session, xen_vbd vbd, xen_vdi vdi)
  55.157  {
  55.158      abstract_value param_values[] =
    56.1 --- a/tools/libxen/src/xen_vdi.c	Tue Jan 30 23:35:32 2007 -0700
    56.2 +++ b/tools/libxen/src/xen_vdi.c	Wed Jan 31 10:30:54 2007 -0700
    56.3 @@ -21,6 +21,7 @@
    56.4  #include <stdlib.h>
    56.5  
    56.6  #include "xen_common.h"
    56.7 +#include "xen_crashdump.h"
    56.8  #include "xen_internal.h"
    56.9  #include "xen_sr.h"
   56.10  #include "xen_vbd.h"
   56.11 @@ -54,6 +55,9 @@ static const struct_member xen_vdi_recor
   56.12          { .key = "VBDs",
   56.13            .type = &abstract_type_ref_set,
   56.14            .offset = offsetof(xen_vdi_record, vbds) },
   56.15 +        { .key = "crash_dumps",
   56.16 +          .type = &abstract_type_ref_set,
   56.17 +          .offset = offsetof(xen_vdi_record, crash_dumps) },
   56.18          { .key = "virtual_size",
   56.19            .type = &abstract_type_int,
   56.20            .offset = offsetof(xen_vdi_record, virtual_size) },
   56.21 @@ -66,12 +70,6 @@ static const struct_member xen_vdi_recor
   56.22          { .key = "type",
   56.23            .type = &xen_vdi_type_abstract_type_,
   56.24            .offset = offsetof(xen_vdi_record, type) },
   56.25 -        { .key = "parent",
   56.26 -          .type = &abstract_type_ref,
   56.27 -          .offset = offsetof(xen_vdi_record, parent) },
   56.28 -        { .key = "children",
   56.29 -          .type = &abstract_type_ref_set,
   56.30 -          .offset = offsetof(xen_vdi_record, children) },
   56.31          { .key = "sharable",
   56.32            .type = &abstract_type_bool,
   56.33            .offset = offsetof(xen_vdi_record, sharable) },
   56.34 @@ -103,8 +101,7 @@ xen_vdi_record_free(xen_vdi_record *reco
   56.35      free(record->name_description);
   56.36      xen_sr_record_opt_free(record->sr);
   56.37      xen_vbd_record_opt_set_free(record->vbds);
   56.38 -    xen_vdi_record_opt_free(record->parent);
   56.39 -    xen_vdi_record_opt_set_free(record->children);
   56.40 +    xen_crashdump_record_opt_set_free(record->crash_dumps);
   56.41      free(record);
   56.42  }
   56.43  
   56.44 @@ -266,6 +263,23 @@ xen_vdi_get_vbds(xen_session *session, s
   56.45  
   56.46  
   56.47  bool
   56.48 +xen_vdi_get_crash_dumps(xen_session *session, struct xen_crashdump_set **result, xen_vdi vdi)
   56.49 +{
   56.50 +    abstract_value param_values[] =
   56.51 +        {
   56.52 +            { .type = &abstract_type_string,
   56.53 +              .u.string_val = vdi }
   56.54 +        };
   56.55 +
   56.56 +    abstract_type result_type = abstract_type_string_set;
   56.57 +
   56.58 +    *result = NULL;
   56.59 +    XEN_CALL_("VDI.get_crash_dumps");
   56.60 +    return session->ok;
   56.61 +}
   56.62 +
   56.63 +
   56.64 +bool
   56.65  xen_vdi_get_virtual_size(xen_session *session, int64_t *result, xen_vdi vdi)
   56.66  {
   56.67      abstract_value param_values[] =
   56.68 @@ -323,43 +337,7 @@ xen_vdi_get_type(xen_session *session, e
   56.69          };
   56.70  
   56.71      abstract_type result_type = xen_vdi_type_abstract_type_;
   56.72 -    char *result_str = NULL;
   56.73      XEN_CALL_("VDI.get_type");
   56.74 -    *result = xen_vdi_type_from_string(session, result_str);
   56.75 -    return session->ok;
   56.76 -}
   56.77 -
   56.78 -
   56.79 -bool
   56.80 -xen_vdi_get_parent(xen_session *session, xen_vdi *result, xen_vdi vdi)
   56.81 -{
   56.82 -    abstract_value param_values[] =
   56.83 -        {
   56.84 -            { .type = &abstract_type_string,
   56.85 -              .u.string_val = vdi }
   56.86 -        };
   56.87 -
   56.88 -    abstract_type result_type = abstract_type_string;
   56.89 -
   56.90 -    *result = NULL;
   56.91 -    XEN_CALL_("VDI.get_parent");
   56.92 -    return session->ok;
   56.93 -}
   56.94 -
   56.95 -
   56.96 -bool
   56.97 -xen_vdi_get_children(xen_session *session, struct xen_vdi_set **result, xen_vdi vdi)
   56.98 -{
   56.99 -    abstract_value param_values[] =
  56.100 -        {
  56.101 -            { .type = &abstract_type_string,
  56.102 -              .u.string_val = vdi }
  56.103 -        };
  56.104 -
  56.105 -    abstract_type result_type = abstract_type_string_set;
  56.106 -
  56.107 -    *result = NULL;
  56.108 -    XEN_