From cf62e5ae4da84969c5a7dc1d310ac6ad76dd0741d2c7b40039c210ec4c9c6689 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 20 Dec 2007 15:46:41 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xen?expand=0&rev=36 --- 15048-localtime.diff | 24 - 15054-hvm-save-restore.patch | 22 - 15059-check-libvncserver.patch | 29 - 15060-check-xenapi.patch | 114 -- 15061-kill-sh_mapcache.patch | 29 - 15128_xend_dev_disconnect.patch | 25 - 15152-save-restore-fix-cpu-affinity.patch | 92 -- 15153_xend_dom_teardown.patch | 44 - 15157_xend_device_destroy.patch | 104 -- 15168-check-dup-domians.patch | 21 - 15173-32on64-runstate.patch | 31 - 15183-32on64-multicall.patch | 82 -- 15185-vtpr.patch | 468 -------- 15189-pmtimer.patch | 93 -- 15190-clocksource-opt.patch | 74 -- 15211-partial-changeset.patch | 13 - 15217-hvm-save-restore.patch | 31 - 15228-hvm-usb-windows-crash.patch | 74 -- 15230-hvm-usb-windows-crash.patch | 55 - 15234-hvm-usb-windows-crash.patch | 21 - 15250_xend_device_destroy.patch | 69 -- 15257-hvm-save-restore.patch | 21 - 15273_libxenapi.patch | 66 -- 15274_xenapi.patch | 30 - 15275_xenapi.patch | 27 - 15277-hvm-intel2amd-windows-migrate.patch | 51 - 15381-log-svm-npt.patch | 31 - 15383-hvm-usb-windows-crash.patch | 72 -- 15389-32on64-memop-error-path.patch | 33 - 15390-32on64-setup-error-path.patch | 76 -- 15391-32on64-setup-pgtable.patch | 20 - 15410-domain-restore.patch | 32 - 15416-x86_64-failsafe.patch | 80 -- 15418-hvm-usb-windows-crash.patch | 21 - 15433-pae-ptwr-check.patch | 33 - 15434-irq-permissions.patch | 20 - 15444-vmxassist-p2r.patch | 158 --- 15469-hvm-save-restore.patch | 67 -- 15477_dev_attach.patch | 34 - 15480-man-xm.patch | 776 ------------- 15528-hvm-sles9-install.patch | 35 - 15587-domid-reset.patch | 27 - 15595-rtl8139-data-corruption.patch | 15 - 15596-rtl8139-crc-fix.patch | 42 - 15609-save-mem-values.patch | 40 - 15642_uuid_unique.patch | 73 -- 15645-hvm-save-restore.patch | 62 -- 15649_xenapi.patch | 26 - 15650_xenapi.patch | 25 - 15651_xenapi.patch | 81 -- 15689_dev_destroy_cleanup.patch | 198 ---- 15691-hvm-save-restore.patch | 49 - 15693-32on64-gnttab-err.patch | 31 - 15716_dev_detach.patch | 292 ----- 16157-xenmon-security.patch | 46 - 32on64-call-gates.patch | 484 -------- 32on64-cpuid.patch | 13 - 32on64-extra-mem.patch | 8 +- 32on64-ioemu.patch | 119 -- blktap.patch | 51 +- block-flags.diff | 20 +- block-losetup-retry.diff | 192 +++- cross-build-fix.diff | 16 +- dmi-table.patch | 160 --- edd.patch | 551 ---------- edid.patch | 195 ---- fix-ioemu-vnc-shift-key.patch | 547 ---------- fix-vncfb-shift-key.patch | 142 --- fix_15716.patch | 14 - guest-copy.patch | 469 -------- hvm-debug-msg.patch | 401 ------- hvm-efer.patch | 670 ------------ hvm-hypercall-context.patch | 309 ------ hvm-hypercall-debug.patch | 58 - hvm-pio-read.patch | 37 - hvm-shared-info-size.patch | 34 - hvm_vnc.diff | 11 - intpte_t-cast.patch | 40 - inval-sh-ldt.patch | 25 - keymap_nl-be.patch | 11 +- multinet-common.sh | 1214 +++++++++++++++++++++ netfront_mac.patch | 8 +- network-multinet | 730 ++----------- pci-passthru-reboot-fix.patch | 13 - ptwr-sanity.patch | 74 -- pv-driver-build.patch | 88 +- qemu-security-etch1.diff | 157 +-- realmode.patch | 406 ------- rpmlint.diff | 23 +- svm-lmsl.patch | 73 ++ svm-reg-save.patch | 264 ----- sysconfig.xend | 157 ++- tools-xc_kexec.diff | 90 +- usercopy-gcc43-fix.patch | 22 - vgacon-50-lines.patch | 13 - vgacon-keep.patch | 113 -- vmx-check-descr.patch | 25 - vmx-no-cstar.patch | 78 -- vnc-i18n-keys.diff | 97 +- x86-emul-rf.patch | 131 --- x86-extra-trap-info.patch | 16 +- x86-machine-check.patch | 881 --------------- x86-nmi-inject.patch | 276 ----- x86-page-cacheability.patch | 713 ------------ x86_64-syscall-clear-df.patch | 14 +- x86_emulate-eflags.patch | 623 +++++++++++ x86_emulate.patch | 108 +- xen-3.1-testing-src.tar.bz2 | 3 - xen-3.2-testing-src.tar.bz2 | 3 + xen-changeset.diff | 8 +- xen-config.diff | 10 +- xen-destdir.diff | 106 +- xen-dhcpd | 270 +++++ xen-disable-qemu-monitor.diff | 38 +- xen-domUloader.diff | 14 +- xen-hvm-default-bridge.diff | 57 +- xen-hvm-default-pae.diff | 20 +- xen-hvm-netfront.diff | 8 +- xen-ioapic-ack-default.diff | 10 +- xen-ioemu-hvm-pv-support.diff | 105 +- xen-lowmem-emergency-pool.diff | 26 +- xen-max-free-mem.diff | 38 +- xen-no-dummy-nfs-ip.diff | 8 +- xen-rpmoptflags.diff | 38 +- xen-tightvnc-args.diff | 8 +- xen-warnings.diff | 515 ++------- xen-xm-top-needs-root.diff | 10 +- xen-xmexample.diff | 38 +- xen.changes | 5 + xen.spec | 315 ++---- xenapi-console-protocol.patch | 8 +- xend-reboot.diff | 13 - xend-relocation.sh | 159 +++ xend_mem_leak.diff | 11 - xmclone.sh | 973 ++++++++++------- 135 files changed, 4018 insertions(+), 13988 deletions(-) delete mode 100644 15048-localtime.diff delete mode 100644 15054-hvm-save-restore.patch delete mode 100644 15059-check-libvncserver.patch delete mode 100644 15060-check-xenapi.patch delete mode 100644 15061-kill-sh_mapcache.patch delete mode 100644 15128_xend_dev_disconnect.patch delete mode 100644 15152-save-restore-fix-cpu-affinity.patch delete mode 100644 15153_xend_dom_teardown.patch delete mode 100644 15157_xend_device_destroy.patch delete mode 100644 15168-check-dup-domians.patch delete mode 100644 15173-32on64-runstate.patch delete mode 100644 15183-32on64-multicall.patch delete mode 100644 15185-vtpr.patch delete mode 100644 15189-pmtimer.patch delete mode 100644 15190-clocksource-opt.patch delete mode 100644 15211-partial-changeset.patch delete mode 100644 15217-hvm-save-restore.patch delete mode 100644 15228-hvm-usb-windows-crash.patch delete mode 100644 15230-hvm-usb-windows-crash.patch delete mode 100644 15234-hvm-usb-windows-crash.patch delete mode 100644 15250_xend_device_destroy.patch delete mode 100644 15257-hvm-save-restore.patch delete mode 100644 15273_libxenapi.patch delete mode 100644 15274_xenapi.patch delete mode 100644 15275_xenapi.patch delete mode 100644 15277-hvm-intel2amd-windows-migrate.patch delete mode 100644 15381-log-svm-npt.patch delete mode 100644 15383-hvm-usb-windows-crash.patch delete mode 100644 15389-32on64-memop-error-path.patch delete mode 100644 15390-32on64-setup-error-path.patch delete mode 100644 15391-32on64-setup-pgtable.patch delete mode 100644 15410-domain-restore.patch delete mode 100644 15416-x86_64-failsafe.patch delete mode 100644 15418-hvm-usb-windows-crash.patch delete mode 100644 15433-pae-ptwr-check.patch delete mode 100644 15434-irq-permissions.patch delete mode 100644 15444-vmxassist-p2r.patch delete mode 100644 15469-hvm-save-restore.patch delete mode 100644 15477_dev_attach.patch delete mode 100644 15480-man-xm.patch delete mode 100644 15528-hvm-sles9-install.patch delete mode 100644 15587-domid-reset.patch delete mode 100644 15595-rtl8139-data-corruption.patch delete mode 100644 15596-rtl8139-crc-fix.patch delete mode 100644 15609-save-mem-values.patch delete mode 100644 15642_uuid_unique.patch delete mode 100644 15645-hvm-save-restore.patch delete mode 100644 15649_xenapi.patch delete mode 100644 15650_xenapi.patch delete mode 100644 15651_xenapi.patch delete mode 100644 15689_dev_destroy_cleanup.patch delete mode 100644 15691-hvm-save-restore.patch delete mode 100644 15693-32on64-gnttab-err.patch delete mode 100644 15716_dev_detach.patch delete mode 100644 16157-xenmon-security.patch delete mode 100644 32on64-call-gates.patch delete mode 100644 32on64-cpuid.patch delete mode 100644 32on64-ioemu.patch delete mode 100644 dmi-table.patch delete mode 100644 edd.patch delete mode 100644 edid.patch delete mode 100644 fix-ioemu-vnc-shift-key.patch delete mode 100644 fix-vncfb-shift-key.patch delete mode 100644 fix_15716.patch delete mode 100644 guest-copy.patch delete mode 100644 hvm-debug-msg.patch delete mode 100644 hvm-efer.patch delete mode 100644 hvm-hypercall-context.patch delete mode 100644 hvm-hypercall-debug.patch delete mode 100644 hvm-pio-read.patch delete mode 100644 hvm-shared-info-size.patch delete mode 100644 hvm_vnc.diff delete mode 100644 intpte_t-cast.patch delete mode 100644 inval-sh-ldt.patch create mode 100644 multinet-common.sh delete mode 100644 pci-passthru-reboot-fix.patch delete mode 100644 ptwr-sanity.patch delete mode 100644 realmode.patch create mode 100644 svm-lmsl.patch delete mode 100644 svm-reg-save.patch delete mode 100644 usercopy-gcc43-fix.patch delete mode 100644 vgacon-50-lines.patch delete mode 100644 vgacon-keep.patch delete mode 100644 vmx-check-descr.patch delete mode 100644 vmx-no-cstar.patch delete mode 100644 x86-emul-rf.patch delete mode 100644 x86-machine-check.patch delete mode 100644 x86-nmi-inject.patch delete mode 100644 x86-page-cacheability.patch create mode 100644 x86_emulate-eflags.patch delete mode 100644 xen-3.1-testing-src.tar.bz2 create mode 100644 xen-3.2-testing-src.tar.bz2 create mode 100644 xen-dhcpd delete mode 100644 xend-reboot.diff create mode 100644 xend-relocation.sh delete mode 100644 xend_mem_leak.diff diff --git a/15048-localtime.diff b/15048-localtime.diff deleted file mode 100644 index c7cff3c..0000000 --- a/15048-localtime.diff +++ /dev/null @@ -1,24 +0,0 @@ -# HG changeset patch -# User Jim Fehlig -# Date 1178858624 21600 -# Node ID 29b301382bb60ce54e0ac9dc5e5163306de577ff -# Parent 3ef0510e44d04eb837ae238203251b969fc45df9 -Configuration option 'localtime = 1' is not honored for PV domains. -This patch fixes an oversight when platform_* config options were collected in a dictionary. - -Signed-off-by: Jim Fehlig - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1472,8 +1472,7 @@ class XendDomainInfo: - try: - self.image = image.create(self, self.info) - -- localtime = self.info.get('platform_localtime', False) -- if localtime: -+ if self.info['platform'].get('localtime', 0): - xc.domain_set_time_offset(self.domid) - - xc.domain_setcpuweight(self.domid, self.info['cpu_weight']) diff --git a/15054-hvm-save-restore.patch b/15054-hvm-save-restore.patch deleted file mode 100644 index 84934ce..0000000 --- a/15054-hvm-save-restore.patch +++ /dev/null @@ -1,22 +0,0 @@ -# HG changeset patch -# User Steven Hand -# Date 1179152192 -3600 -# Node ID 9c2a616722da143f8abcd0eabb45159341f3cce0 -# Parent 3ecf516896719b667833183a4aa87975824b931b -HVM save/restore: handle larger domain ids. - -Signed-off-by: Steven Hand - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/helper2.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/helper2.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/helper2.c -@@ -615,7 +615,7 @@ int main_loop(void) - extern int suspend_requested; - CPUState *env = cpu_single_env; - int evtchn_fd = xc_evtchn_fd(xce_handle); -- char qemu_file[20]; -+ char qemu_file[32]; - - buffered_io_timer = qemu_new_timer(rt_clock, handle_buffered_io, - cpu_single_env); diff --git a/15059-check-libvncserver.patch b/15059-check-libvncserver.patch deleted file mode 100644 index 3663934..0000000 --- a/15059-check-libvncserver.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: 2007-04-27/tools/check/check_libvncserver -=================================================================== ---- 2007-04-27.orig/tools/check/check_libvncserver 2006-12-04 08:49:57.000000000 +0100 -+++ 2007-04-27/tools/check/check_libvncserver 2007-04-27 09:31:02.000000000 +0200 -@@ -10,6 +10,7 @@ fi - RC=0 - - LIBVNCSERVER_CONFIG="$(which libvncserver-config)" -+tmpfile=$(mktemp) - - if test -z ${LIBVNCSERVER_CONFIG}; then - RC=1 -@@ -22,6 +23,16 @@ if test $RC -ne 0; then - echo "FAILED" - echo " *** libvncserver-config is missing. " - echo " *** Please install libvncserver." -+elif ! ld $($LIBVNCSERVER_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then -+ echo "FAILED" -+ echo " *** dependency libraries for libvncserver are missing: " -+ RC=1 -+ for i in $(ld $($LIBVNCSERVER_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do -+ case $i in -+ -l*) echo lib${i#-l} -+ esac -+ done - fi -+rm -f $tmpfile - - exit $RC diff --git a/15060-check-xenapi.patch b/15060-check-xenapi.patch deleted file mode 100644 index 0abd7e1..0000000 --- a/15060-check-xenapi.patch +++ /dev/null @@ -1,114 +0,0 @@ - -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1179219794 -3600 -# Node ID e72e94d2987cfa20d3ac6b34972d0ce639efb1fa -# Parent e1d9d2884245461576631134db46dda67994989b -tools: check for curl-devel and libxml2-devel -when they are required for LIBXENAPI_BINDINGS. - -Signed-off-by: Jan Beulich - ---- a/tools/check/Makefile Tue May 15 10:01:14 2007 +0100 -+++ b/tools/check/Makefile Tue May 15 10:03:14 2007 +0100 -@@ -7,7 +7,7 @@ all: build - # Check this machine is OK for building on. - .PHONY: build - build: -- XENFB_TOOLS=$(XENFB_TOOLS) ./chk build -+ XENFB_TOOLS=$(XENFB_TOOLS) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk build - - # Check this machine is OK for installing on. - # DO NOT use this check from 'make install' in the parent -@@ -15,7 +15,7 @@ build: - # copy rather than actually installing. - .PHONY: install - install: -- XENFB_TOOLS=$(XENFB_TOOLS) ./chk install -+ XENFB_TOOLS=$(XENFB_TOOLS) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ./chk install - - .PHONY: clean - clean: ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/tools/check/check_curl Tue May 15 10:03:14 2007 +0100 -@@ -0,0 +1,38 @@ -+#!/bin/sh -+# CHECK-BUILD CHECK-INSTALL -+ -+if [ ! "$LIBXENAPI_BINDINGS" = "y" ] -+then -+ echo -n "unused, " -+ exit 0 -+fi -+ -+RC=0 -+ -+CURL_CONFIG="$(which curl-config)" -+tmpfile=$(mktemp) -+ -+if test -z ${CURL_CONFIG}; then -+ RC=1 -+else -+ ${CURL_CONFIG} --libs 2>&1 > /dev/null -+ RC=$? -+fi -+ -+if test $RC -ne 0; then -+ echo "FAILED" -+ echo " *** curl-config is missing. " -+ echo " *** Please install curl-devel." -+elif ! ld $($CURL_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then -+ echo "FAILED" -+ echo " *** dependency libraries for curl are missing: " -+ RC=1 -+ for i in $(ld $($CURL_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do -+ case $i in -+ -l*) echo lib${i#-l} -+ esac -+ done -+fi -+rm -f $tmpfile -+ -+exit $RC ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ b/tools/check/check_xml2 Tue May 15 10:03:14 2007 +0100 -@@ -0,0 +1,38 @@ -+#!/bin/sh -+# CHECK-BUILD CHECK-INSTALL -+ -+if [ ! "$LIBXENAPI_BINDINGS" = "y" ] -+then -+ echo -n "unused, " -+ exit 0 -+fi -+ -+RC=0 -+ -+XML2_CONFIG="$(which xml2-config)" -+tmpfile=$(mktemp) -+ -+if test -z ${XML2_CONFIG}; then -+ RC=1 -+else -+ ${XML2_CONFIG} --libs 2>&1 > /dev/null -+ RC=$? -+fi -+ -+if test $RC -ne 0; then -+ echo "FAILED" -+ echo " *** xml2-config is missing. " -+ echo " *** Please install libxml2-devel." -+elif ! ld $($XML2_CONFIG --libs) -o $tmpfile >/dev/null 2>&1; then -+ echo "FAILED" -+ echo " *** dependency libraries for xml2 are missing: " -+ RC=1 -+ for i in $(ld $($XML2_CONFIG --libs) -o $tmpfile 2>&1 >/dev/null); do -+ case $i in -+ -l*) echo lib${i#-l} -+ esac -+ done -+fi -+rm -f $tmpfile -+ -+exit $RC - diff --git a/15061-kill-sh_mapcache.patch b/15061-kill-sh_mapcache.patch deleted file mode 100644 index a07549f..0000000 --- a/15061-kill-sh_mapcache.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: 2007-05-14/xen/arch/x86/mm.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-14 08:39:16.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-14 08:40:14.000000000 +0200 -@@ -2261,7 +2261,7 @@ int do_mmu_update( - struct vcpu *v = current; - struct domain *d = v->domain; - unsigned long type_info; -- struct domain_mmap_cache mapcache, sh_mapcache; -+ struct domain_mmap_cache mapcache; - - if ( unlikely(count & MMU_UPDATE_PREEMPTED) ) - { -@@ -2285,7 +2285,6 @@ int do_mmu_update( - } - - domain_mmap_cache_init(&mapcache); -- domain_mmap_cache_init(&sh_mapcache); - - LOCK_BIGLOCK(d); - -@@ -2447,7 +2446,6 @@ int do_mmu_update( - UNLOCK_BIGLOCK(d); - - domain_mmap_cache_destroy(&mapcache); -- domain_mmap_cache_destroy(&sh_mapcache); - - perfc_add(num_page_updates, i); - diff --git a/15128_xend_dev_disconnect.patch b/15128_xend_dev_disconnect.patch deleted file mode 100644 index 6c3f242..0000000 --- a/15128_xend_dev_disconnect.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User Steven Hand -# Date 1179844370 -3600 -# Node ID f6928d6369999cd063edd361d592579c2483196b -# Parent 98cf6c05c32a59ad3f4fcd505ca60348589e6096 -This patch fixes the issue with waiting for devices to disconnect during the end -stage of migration in Xend. The problem was cause by a deletion of the VM domain -ID which is used by testDevicecompleComplete ->deviceIDs->backendRoot() to get -the virtual backend device path. The virtual backend device path is used to -check if a device still exists in xenstore. - -Signed-off-by: Yung Giang - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1680,7 +1680,6 @@ class XendDomainInfo: - try: - if self.domid is not None: - xc.domain_destroy(self.domid) -- self.domid = None - for state in DOM_STATES_OLD: - self.info[state] = 0 - self._stateSet(DOM_STATE_HALTED) diff --git a/15152-save-restore-fix-cpu-affinity.patch b/15152-save-restore-fix-cpu-affinity.patch deleted file mode 100644 index 59e0c36..0000000 --- a/15152-save-restore-fix-cpu-affinity.patch +++ /dev/null @@ -1,92 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1180011729 -3600 -# Node ID 853853686147c4e863551b5742ca424e2929599a -# Parent 6223d154e55f6cf7144c758979e6d3364d5d436e -xend: Fix CPU affinity reset across save/restore. -Fixes bug #936. -Signed-off-by: Masaki Kanno - -Index: xen-3.1-testing/tools/python/xen/xend/XendConfig.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendConfig.py -+++ xen-3.1-testing/tools/python/xen/xend/XendConfig.py -@@ -587,30 +587,46 @@ class XendConfig(dict): - else: - cfg['cpus'] = str(cfg['cpu']) - -- # convert 'cpus' string to list of ints -- # 'cpus' supports a list of ranges (0-3), seperated by -- # commas, and negation, (^1). -- # Precedence is settled by order of the string: -- # "0-3,^1" -> [0,2,3] -- # "0-3,^1,1" -> [0,1,2,3] -- try: -- if 'cpus' in cfg and type(cfg['cpus']) != list: -- cpus = [] -- for c in cfg['cpus'].split(','): -- if c.find('-') != -1: -- (x, y) = c.split('-') -- for i in range(int(x), int(y)+1): -- cpus.append(int(i)) -- else: -- # remove this element from the list -- if c[0] == '^': -- cpus = [x for x in cpus if x != int(c[1:])] -+ # Convert 'cpus' to list of ints -+ if 'cpus' in cfg: -+ cpus = [] -+ if type(cfg['cpus']) == list: -+ # If sxp_cfg was created from config.sxp, -+ # the form of 'cpus' is list of string. -+ # Convert 'cpus' to list of ints. -+ # ['1'] -> [1] -+ # ['0','2','3'] -> [0,2,3] -+ try: -+ for c in cfg['cpus']: -+ cpus.append(int(c)) -+ -+ cfg['cpus'] = cpus -+ except ValueError, e: -+ raise XendConfigError('cpus = %s: %s' % (cfg['cpus'], e)) -+ else: -+ # Convert 'cpus' string to list of ints -+ # 'cpus' supports a list of ranges (0-3), -+ # seperated by commas, and negation, (^1). -+ # Precedence is settled by order of the -+ # string: -+ # "0-3,^1" -> [0,2,3] -+ # "0-3,^1,1" -> [0,1,2,3] -+ try: -+ for c in cfg['cpus'].split(','): -+ if c.find('-') != -1: -+ (x, y) = c.split('-') -+ for i in range(int(x), int(y)+1): -+ cpus.append(int(i)) - else: -- cpus.append(int(c)) -- -- cfg['cpus'] = cpus -- except ValueError, e: -- raise XendConfigError('cpus = %s: %s' % (cfg['cpus'], e)) -+ # remove this element from the list -+ if c[0] == '^': -+ cpus = [x for x in cpus if x != int(c[1:])] -+ else: -+ cpus.append(int(c)) -+ -+ cfg['cpus'] = cpus -+ except ValueError, e: -+ raise XendConfigError('cpus = %s: %s' % (cfg['cpus'], e)) - - if 'security' in cfg and isinstance(cfg['security'], str): - cfg['security'] = sxp.from_string(cfg['security']) -@@ -842,6 +858,8 @@ class XendConfig(dict): - if name in self and self[name] not in (None, []): - if typ == dict: - s = self[name].items() -+ elif typ == list: -+ s = self[name] - else: - s = str(self[name]) - sxpr.append([name, s]) diff --git a/15153_xend_dom_teardown.patch b/15153_xend_dom_teardown.patch deleted file mode 100644 index f39e009..0000000 --- a/15153_xend_dom_teardown.patch +++ /dev/null @@ -1,44 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1180011958 -3600 -# Node ID f07c1bb86d6c54458ff944e71453173cbf567ed2 -# Parent 853853686147c4e863551b5742ca424e2929599a -xend: Tear down domain if device hotplug fails during startup - -If creating an unmanaged guest (eg xm create), if device hotplug fails -during the startup of the guest, then the guest will be torn down -again. If creating and starting a managed guest (eg xm new && xm -start), then if device hotplug fails, the still born guest gets left -in 'paused' state. This confuses users no end, who go an unpause and -then get all upset when it shortly crashes (due to lack of disk or -network devices). - -The attached patch fixes XenDomain.py's domain_start() method so that -if waitForDevices() fails, then the entire domain is torn down. This -is the same approach used in xm create. - -Signed-off-by: Daniel P. Berrange - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomain.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomain.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomain.py -@@ -985,10 +985,16 @@ class XendDomain: - dominfo.start(is_managed = True) - finally: - self.domains_lock.release() -- dominfo.waitForDevices() -+ -+ try: -+ dominfo.waitForDevices() -+ except Exception, ex: -+ log.warn("Failed to setup devices for " + str(dominfo) + ": " + str(ex)) -+ dominfo.destroy() -+ raise -+ - if not start_paused: - dominfo.unpause() -- - - def domain_delete(self, domid): - """Remove a managed domain from database diff --git a/15157_xend_device_destroy.patch b/15157_xend_device_destroy.patch deleted file mode 100644 index 81fd0fe..0000000 --- a/15157_xend_device_destroy.patch +++ /dev/null @@ -1,104 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1180016489 -3600 -# Node ID 3ef4a4d8213061fe14d905e89594c99d0b9cb605 -# Parent 6a4af9502b4da269388a60416a7cca0ecadb3bb3 -xend: Fix for removing devices at save/destroy domain. - -The function XendDomainInfo:_releaseDevices() is called during the -save/destroy phase of a domain. It made some attempt to clean up the -devices, but wasn't complete, leaving dangling devices in the -xenstore. Not a big problem with normal use of Xen, but a buildup over -a large number of save/destroy instances, it would make the xenstore -database grow quite large, which in turn meant swap-thrashing in Dom0. - -This patch makes use of the destroyDevices() function in -XendDomainInfo. This function needed some re-writing to make it work -correctly - I think it had some old code (not sure how old, as xm -annotate says that it's changeset 12071, but that, I think, is when it -was split out from XendDomain.py, rather than when it was created). - -I have tested this over a few hundred save/restore cycles [two domains -constantly saved/restored with a short sleep to let them process some -work] combined with a loop of "xenstore-ls|wc". The output of the -latter is pretty much constant (it obviously varies a bit depending on -when in the save/restore cycle it hits). Previously, it would increase -by some 10 lines or so per save/restore cycle. - -Signed-off-by: Mats Petersson - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -544,20 +544,30 @@ class XendDomainInfo: - self.getDeviceController(devclass).waitForDevices() - - def destroyDevice(self, deviceClass, devid, force = False): -+ found = True # Assume devid is an integer. - try: - devid = int(devid) - except ValueError: - # devid is not a number, let's search for it in xenstore. - devicePath = '%s/device/%s' % (self.dompath, deviceClass) -+ found = False - for entry in xstransact.List(devicePath): -+ log.debug("Attempting to find devid at %s/%s", devicePath, entry) - backend = xstransact.Read('%s/%s' % (devicePath, entry), - "backend") -- devName = xstransact.Read(backend, "dev") -- if devName == devid: -- # We found the integer matching our devid, use it instead -- devid = entry -- break -- -+ if backend != None: -+ devName = '%s/%s' % (deviceClass, entry) -+ log.debug("devName=%s", devName) -+ if devName == devid: -+ # We found the integer matching our devid, use it instead -+ devid = int(entry) -+ found = True -+ break -+ -+ if not found: -+ log.debug("Could not find the device %s", devid) -+ return None -+ log.debug("devid = %s", devid) - return self.getDeviceController(deviceClass).destroyDevice(devid, force) - - def getDeviceSxprs(self, deviceClass): -@@ -1330,20 +1340,19 @@ class XendDomainInfo: - self.image.destroy(suspend) - return - -- while True: -- t = xstransact("%s/device" % self.dompath) -- for devclass in XendDevices.valid_devices(): -- for dev in t.list(devclass): -- try: -- t.remove(dev) -- except: -- # Log and swallow any exceptions in removal -- -- # there's nothing more we can do. -- log.exception( -- "Device release failed: %s; %s; %s", -- self.info['name_label'], devclass, dev) -- if t.commit(): -- break -+ t = xstransact("%s/device" % self.dompath) -+ for devclass in XendDevices.valid_devices(): -+ for dev in t.list(devclass): -+ try: -+ log.debug("Removing %s", dev); -+ self.destroyDevice(devclass, dev, False); -+ except: -+ # Log and swallow any exceptions in removal -- -+ # there's nothing more we can do. -+ log.exception("Device release failed: %s; %s; %s", -+ self.info['name_label'], devclass, dev) -+ -+ - - def getDeviceController(self, name): - """Get the device controller for this domain, and if it diff --git a/15168-check-dup-domians.patch b/15168-check-dup-domians.patch deleted file mode 100644 index 606b883..0000000 --- a/15168-check-dup-domians.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1180086787 -3600 -# Node ID a717cb2fac908ba82619ba52e34a2cc77942df4f -# Parent 9073caff4b63490bc63bbe2b0b48fd06cc47d6c6 -xend: Fix checkname so that it detects duplicate domains. -Signed-off-by: Mats Petersson - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2069,7 +2069,7 @@ class XendDomainInfo: - raise VmError('Invalid VM Name') - - dom = XendDomain.instance().domain_lookup_nr(name) -- if dom and dom.info['uuid'] != self.info['uuid']: -+ if dom and dom.domid != self.domid: - raise VmError("VM name '%s' already exists%s" % - (name, - dom.domid is not None and diff --git a/15173-32on64-runstate.patch b/15173-32on64-runstate.patch deleted file mode 100644 index 869061f..0000000 --- a/15173-32on64-runstate.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset 15173 patch -# User Ian Campbell -# Node ID 88e41a91301c109b99443db3a4bf3c8e6bbad042 -# Parent f2d2d5f18543de04191c1f5e22471e74d8767147 -Correct 32on64 handling of VCPUOP_register_runstate_memory_area. We -were copying too many bytes from the guest so the test for -area.addr.h.c != area.addr.p was failing. - -Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON -but this would break the new kernel on older hypervisors and the only -real problem is that stolen time is not updated, which we can live -with. - -Signed-off-by: Ian Campbell - -Index: 2007-05-14/xen/arch/x86/x86_64/domain.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/domain.c 2007-04-23 10:01:42.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/domain.c 2007-07-02 10:47:40.000000000 +0200 -@@ -22,8 +22,10 @@ arch_compat_vcpu_op( - struct compat_vcpu_register_runstate_memory_area area; - struct compat_vcpu_runstate_info info; - -+ area.addr.p = 0; -+ - rc = -EFAULT; -- if ( copy_from_guest(&area, arg, 1) ) -+ if ( copy_from_guest(&area.addr.h, arg, 1) ) - break; - - if ( area.addr.h.c != area.addr.p || diff --git a/15183-32on64-multicall.patch b/15183-32on64-multicall.patch deleted file mode 100644 index 59f9b2d..0000000 --- a/15183-32on64-multicall.patch +++ /dev/null @@ -1,82 +0,0 @@ -# HG changeset 15183 patch -# User Ian Campbell -# Node ID 63211a8027fa994290e23be17f4de9ba3b3e953e -# Parent c4f62fe631e4a5f7ff20ec7bab0a81cd97a14974 -Fix preemption of multicalls in compat mode. - -mcs->call (struct multicall_entry) always needs to be translated into -mcs->compat_call (struct compat_multicall_entry) when a multicall is -preempted in compat mode. Previously this translation only occured for -those hypercalls which explicitly called hypercall_xlat_continuation() -which doesn't cover all hypercalls which could potentially be -preempted. - -Change hypercall_xlat_continuation() to only translate only the -hypercall arguments themselves and not the multicall_entry -layout. Translate the layout for all hypercalls in in -compat_multicall() instead. - -Signed-off-by: Ian Campbell - -Index: 2007-05-14/xen/arch/x86/domain.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:38:54.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:47:47.000000000 +0200 -@@ -1341,13 +1341,12 @@ int hypercall_xlat_continuation(unsigned - id = NULL; - } - if ( (mask & 1) && mcs->call.args[i] == nval ) -- ++rc; -- else - { -- cval = mcs->call.args[i]; -- BUG_ON(mcs->call.args[i] != cval); -+ mcs->call.args[i] = cval; -+ ++rc; - } -- mcs->compat_call.args[i] = cval; -+ else -+ BUG_ON(mcs->call.args[i] != (unsigned int)mcs->call.args[i]); - } - } - else -Index: 2007-05-14/xen/common/compat/multicall.c -=================================================================== ---- 2007-05-14.orig/xen/common/compat/multicall.c 2007-04-23 10:01:43.000000000 +0200 -+++ 2007-05-14/xen/common/compat/multicall.c 2007-07-02 10:47:47.000000000 +0200 -@@ -10,6 +10,13 @@ - typedef int ret_t; - #undef do_multicall_call - -+static inline void xlat_multicall_entry(struct mc_state *mcs) -+{ -+ int i; -+ for (i=0; i<6; i++) -+ mcs->compat_call.args[i] = mcs->call.args[i]; -+} -+ - DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_t); - #define multicall_entry compat_multicall_entry - #define multicall_entry_t multicall_entry_compat_t -Index: 2007-05-14/xen/common/multicall.c -=================================================================== ---- 2007-05-14.orig/xen/common/multicall.c 2007-04-23 10:01:43.000000000 +0200 -+++ 2007-05-14/xen/common/multicall.c 2007-07-02 10:47:47.000000000 +0200 -@@ -17,6 +17,7 @@ - #ifndef COMPAT - DEFINE_PER_CPU(struct mc_state, mc_state); - typedef long ret_t; -+#define xlat_multicall_entry(mcs) - #endif - - ret_t -@@ -62,6 +63,9 @@ do_multicall( - - if ( test_bit(_MCSF_call_preempted, &mcs->flags) ) - { -+ /* Translate sub-call continuation to guest layout */ -+ xlat_multicall_entry(mcs); -+ - /* Copy the sub-call continuation. */ - (void)__copy_to_guest(call_list, &mcs->call, 1); - goto preempted; diff --git a/15185-vtpr.patch b/15185-vtpr.patch deleted file mode 100644 index 7a934d6..0000000 --- a/15185-vtpr.patch +++ /dev/null @@ -1,468 +0,0 @@ - -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1180540108 -3600 -# Node ID 1f8fb764f843552eb4d20e9cb7b67fd8738006d7 -# Parent 1f1d1b43951eb14eff8c71884b7421da2484af3c -Add VMX memory-mapped Local APIC access optimization. - -Some operating systems access the local APIC TPR very frequently, and -we handle that using software-based local APIC virtualization in Xen -today. Such virtualization incurs a number of VM exits from the -memory-access instructions against the APIC page in the guest. - -The attached patch enables the TPR shadow feature that provides APIC -TPR virtualization in hardware. Our tests indicate it can -significantly boost the performance of such guests including 32-bit -Windows XP/2003. - -Moreover, with the patch, local APIC accesses other than TPR in guests -are intercepted directly as APIC_ACCESS VM exits rather than -PAGE_FAULT VM exits; this can lower the emulation cost of such -accesses. - -Signed-off-by: Dexuan Cui - -Index: xen-3.1-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-3.1-testing/xen/arch/x86/hvm/hvm.c -@@ -226,6 +226,7 @@ int hvm_domain_initialise(struct domain - - spin_lock_init(&d->arch.hvm_domain.pbuf_lock); - spin_lock_init(&d->arch.hvm_domain.irq_lock); -+ spin_lock_init(&d->arch.hvm_domain.vapic_access_lock); - - rc = paging_enable(d, PG_refcounts|PG_translate|PG_external); - if ( rc != 0 ) -Index: xen-3.1-testing/xen/arch/x86/hvm/vlapic.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/vlapic.c -+++ xen-3.1-testing/xen/arch/x86/hvm/vlapic.c -@@ -79,8 +79,6 @@ static unsigned int vlapic_lvt_mask[VLAP - #define vlapic_lvtt_period(vlapic) \ - (vlapic_get_reg(vlapic, APIC_LVTT) & APIC_LVT_TIMER_PERIODIC) - --#define vlapic_base_address(vlapic) \ -- (vlapic->hw.apic_base_msr & MSR_IA32_APICBASE_BASE) - - /* - * Generic APIC bitmap vector update & search routines. -Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/intr.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/intr.c -+++ xen-3.1-testing/xen/arch/x86/hvm/vmx/intr.c -@@ -67,7 +67,6 @@ static inline int is_interruptibility_st - return __vmread(GUEST_INTERRUPTIBILITY_INFO); - } - --#ifdef __x86_64__ - static void update_tpr_threshold(struct vlapic *vlapic) - { - int max_irr, tpr; -@@ -75,6 +74,11 @@ static void update_tpr_threshold(struct - if ( !cpu_has_vmx_tpr_shadow ) - return; - -+#ifdef __i386__ -+ if ( !vlapic->mmap_vtpr_enabled ) -+ return; -+#endif -+ - if ( !vlapic_enabled(vlapic) || - ((max_irr = vlapic_find_highest_irr(vlapic)) == -1) ) - { -@@ -85,9 +89,6 @@ static void update_tpr_threshold(struct - tpr = vlapic_get_reg(vlapic, APIC_TASKPRI) & 0xF0; - __vmwrite(TPR_THRESHOLD, (max_irr > tpr) ? (tpr >> 4) : (max_irr >> 4)); - } --#else --#define update_tpr_threshold(v) ((void)0) --#endif - - asmlinkage void vmx_intr_assist(void) - { -Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/vmcs.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c -+++ xen-3.1-testing/xen/arch/x86/hvm/vmx/vmcs.c -@@ -40,6 +40,7 @@ - /* Dynamic (run-time adjusted) execution control flags. */ - u32 vmx_pin_based_exec_control __read_mostly; - u32 vmx_cpu_based_exec_control __read_mostly; -+u32 vmx_secondary_exec_control __read_mostly; - u32 vmx_vmexit_control __read_mostly; - u32 vmx_vmentry_control __read_mostly; - -@@ -60,11 +61,15 @@ static u32 adjust_vmx_controls(u32 ctl_m - return ctl; - } - -+#define vmx_has_secondary_exec_ctls \ -+ (_vmx_cpu_based_exec_control & ACTIVATE_SECONDARY_CONTROLS) -+ - void vmx_init_vmcs_config(void) - { - u32 vmx_msr_low, vmx_msr_high, min, opt; - u32 _vmx_pin_based_exec_control; - u32 _vmx_cpu_based_exec_control; -+ u32 _vmx_secondary_exec_control = 0; - u32 _vmx_vmexit_control; - u32 _vmx_vmentry_control; - -@@ -80,9 +85,8 @@ void vmx_init_vmcs_config(void) - CPU_BASED_ACTIVATE_IO_BITMAP | - CPU_BASED_USE_TSC_OFFSETING); - opt = CPU_BASED_ACTIVATE_MSR_BITMAP; --#ifdef __x86_64__ - opt |= CPU_BASED_TPR_SHADOW; --#endif -+ opt |= ACTIVATE_SECONDARY_CONTROLS; - _vmx_cpu_based_exec_control = adjust_vmx_controls( - min, opt, MSR_IA32_VMX_PROCBASED_CTLS_MSR); - #ifdef __x86_64__ -@@ -92,8 +96,19 @@ void vmx_init_vmcs_config(void) - _vmx_cpu_based_exec_control = adjust_vmx_controls( - min, opt, MSR_IA32_VMX_PROCBASED_CTLS_MSR); - } -+#elif defined(__i386__) -+ if ( !vmx_has_secondary_exec_ctls ) -+ _vmx_cpu_based_exec_control &= ~CPU_BASED_TPR_SHADOW; - #endif - -+ if ( vmx_has_secondary_exec_ctls ) -+ { -+ min = 0; -+ opt = SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES; -+ _vmx_secondary_exec_control = adjust_vmx_controls( -+ min, opt, MSR_IA32_VMX_PROCBASED_CTLS2); -+ } -+ - min = VM_EXIT_ACK_INTR_ON_EXIT; - opt = 0; - #ifdef __x86_64__ -@@ -113,6 +128,8 @@ void vmx_init_vmcs_config(void) - vmcs_revision_id = vmx_msr_low; - vmx_pin_based_exec_control = _vmx_pin_based_exec_control; - vmx_cpu_based_exec_control = _vmx_cpu_based_exec_control; -+ if ( vmx_has_secondary_exec_ctls ) -+ vmx_secondary_exec_control = _vmx_secondary_exec_control; - vmx_vmexit_control = _vmx_vmexit_control; - vmx_vmentry_control = _vmx_vmentry_control; - } -@@ -121,6 +138,8 @@ void vmx_init_vmcs_config(void) - BUG_ON(vmcs_revision_id != vmx_msr_low); - BUG_ON(vmx_pin_based_exec_control != _vmx_pin_based_exec_control); - BUG_ON(vmx_cpu_based_exec_control != _vmx_cpu_based_exec_control); -+ if ( vmx_has_secondary_exec_ctls ) -+ BUG_ON(vmx_secondary_exec_control != _vmx_secondary_exec_control); - BUG_ON(vmx_vmexit_control != _vmx_vmexit_control); - BUG_ON(vmx_vmentry_control != _vmx_vmentry_control); - } -@@ -296,6 +315,8 @@ static void construct_vmcs(struct vcpu * - __vmwrite(VM_ENTRY_CONTROLS, vmx_vmentry_control); - __vmwrite(CPU_BASED_VM_EXEC_CONTROL, vmx_cpu_based_exec_control); - v->arch.hvm_vcpu.u.vmx.exec_control = vmx_cpu_based_exec_control; -+ if ( vmx_cpu_based_exec_control & ACTIVATE_SECONDARY_CONTROLS ) -+ __vmwrite(SECONDARY_VM_EXEC_CONTROL, vmx_secondary_exec_control); - - if ( cpu_has_vmx_msr_bitmap ) - __vmwrite(MSR_BITMAP, virt_to_maddr(vmx_msr_bitmap)); -@@ -422,7 +443,7 @@ static void construct_vmcs(struct vcpu * - __vmwrite(CR4_READ_SHADOW, v->arch.hvm_vmx.cpu_shadow_cr4); - - #ifdef __x86_64__ -- /* VLAPIC TPR optimisation. */ -+ /* CR8 based VLAPIC TPR optimization. */ - if ( cpu_has_vmx_tpr_shadow ) - { - __vmwrite(VIRTUAL_APIC_PAGE_ADDR, -@@ -431,6 +452,16 @@ static void construct_vmcs(struct vcpu * - } - #endif - -+ /* Memory-mapped based VLAPIC TPR optimization. */ -+ if ( cpu_has_vmx_mmap_vtpr_optimization ) -+ { -+ __vmwrite(VIRTUAL_APIC_PAGE_ADDR, -+ page_to_maddr(vcpu_vlapic(v)->regs_page)); -+ __vmwrite(TPR_THRESHOLD, 0); -+ -+ vcpu_vlapic(v)->mmap_vtpr_enabled = 1; -+ } -+ - __vmwrite(GUEST_LDTR_SELECTOR, 0); - __vmwrite(GUEST_LDTR_BASE, 0); - __vmwrite(GUEST_LDTR_LIMIT, 0); -@@ -501,6 +532,18 @@ void vmx_do_resume(struct vcpu *v) - vmx_set_host_env(v); - } - -+ if ( !v->arch.hvm_vmx.launched && vcpu_vlapic(v)->mmap_vtpr_enabled ) -+ { -+ struct page_info *pg = change_guest_physmap_for_vtpr(v->domain, 1); -+ -+ if ( pg == NULL ) -+ { -+ gdprintk(XENLOG_ERR, "change_guest_physmap_for_vtpr failed!\n"); -+ domain_crash_synchronous(); -+ } -+ __vmwrite(APIC_ACCESS_ADDR, page_to_maddr(pg)); -+ } -+ - debug_state = v->domain->debugger_attached; - if ( unlikely(v->arch.hvm_vcpu.debug_state_latch != debug_state) ) - { -Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c -+++ xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c -@@ -2416,6 +2416,114 @@ done: - return 1; - } - -+struct page_info * change_guest_physmap_for_vtpr(struct domain *d, -+ int enable_vtpr) -+{ -+ struct page_info *pg; -+ unsigned long pfn, mfn; -+ -+ spin_lock(&d->arch.hvm_domain.vapic_access_lock); -+ -+ pg = d->arch.hvm_domain.apic_access_page; -+ pfn = paddr_to_pfn(APIC_DEFAULT_PHYS_BASE); -+ -+ if ( enable_vtpr ) -+ { -+ if ( d->arch.hvm_domain.physmap_changed_for_vlapic_access ) -+ goto out; -+ -+ if ( pg == NULL ) -+ pg = alloc_domheap_page(d); -+ if ( pg == NULL ) -+ { -+ gdprintk(XENLOG_ERR, "alloc_domheap_pages() failed!\n"); -+ goto out; -+ } -+ -+ mfn = page_to_mfn(pg); -+ d->arch.hvm_domain.apic_access_page = pg; -+ -+ guest_physmap_add_page(d, pfn, mfn); -+ -+ d->arch.hvm_domain.physmap_changed_for_vlapic_access = 1; -+ -+ goto out; -+ } -+ else -+ { -+ if ( d->arch.hvm_domain.physmap_changed_for_vlapic_access ) -+ { -+ mfn = page_to_mfn(pg); -+ guest_physmap_remove_page(d, pfn, mfn); -+ flush_tlb_mask(d->domain_dirty_cpumask); -+ -+ d->arch.hvm_domain.physmap_changed_for_vlapic_access = 0; -+ } -+ pg = NULL; -+ goto out; -+ } -+ -+out: -+ spin_unlock(&d->arch.hvm_domain.vapic_access_lock); -+ return pg; -+} -+ -+static void check_vlapic_msr_for_vtpr(struct vcpu *v) -+{ -+ struct vlapic *vlapic = vcpu_vlapic(v); -+ int mmap_vtpr_enabled = vcpu_vlapic(v)->mmap_vtpr_enabled; -+ uint32_t tmp; -+ -+ -+ if ( vlapic_hw_disabled(vlapic) && mmap_vtpr_enabled ) -+ { -+ vcpu_vlapic(v)->mmap_vtpr_enabled = 0; -+ -+#ifdef __i386__ -+ v->arch.hvm_vcpu.u.vmx.exec_control &= ~CPU_BASED_TPR_SHADOW; -+ __vmwrite(CPU_BASED_VM_EXEC_CONTROL, -+ v->arch.hvm_vcpu.u.vmx.exec_control); -+#elif defined(__x86_64__) -+ if ( !cpu_has_vmx_tpr_shadow ) -+ { -+ v->arch.hvm_vcpu.u.vmx.exec_control &= ~CPU_BASED_TPR_SHADOW; -+ __vmwrite(CPU_BASED_VM_EXEC_CONTROL, -+ v->arch.hvm_vcpu.u.vmx.exec_control); -+ } -+#endif -+ tmp = __vmread(SECONDARY_VM_EXEC_CONTROL); -+ tmp &= ~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES; -+ __vmwrite(SECONDARY_VM_EXEC_CONTROL, tmp); -+ -+ change_guest_physmap_for_vtpr(v->domain, 0); -+ } -+ else if ( !vlapic_hw_disabled(vlapic) && !mmap_vtpr_enabled && -+ cpu_has_vmx_mmap_vtpr_optimization ) -+ { -+ vcpu_vlapic(v)->mmap_vtpr_enabled = 1; -+ -+ v->arch.hvm_vcpu.u.vmx.exec_control |= -+ ( ACTIVATE_SECONDARY_CONTROLS | CPU_BASED_TPR_SHADOW ); -+ __vmwrite(CPU_BASED_VM_EXEC_CONTROL, -+ v->arch.hvm_vcpu.u.vmx.exec_control); -+ tmp = __vmread(SECONDARY_VM_EXEC_CONTROL); -+ tmp |= SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES; -+ __vmwrite(SECONDARY_VM_EXEC_CONTROL, tmp); -+ -+ change_guest_physmap_for_vtpr(v->domain, 1); -+ } -+ -+ if ( vcpu_vlapic(v)->mmap_vtpr_enabled && -+ !vlapic_hw_disabled(vlapic) && -+ (vlapic_base_address(vlapic) != APIC_DEFAULT_PHYS_BASE) ) -+ { -+ gdprintk(XENLOG_ERR, -+ "Local APIC base address is set to 0x%016"PRIx64"!\n", -+ vlapic_base_address(vlapic)); -+ domain_crash_synchronous(); -+ } -+} -+ - static inline int vmx_do_msr_write(struct cpu_user_regs *regs) - { - u32 ecx = regs->ecx; -@@ -2444,6 +2552,7 @@ static inline int vmx_do_msr_write(struc - break; - case MSR_IA32_APICBASE: - vlapic_msr_set(vcpu_vlapic(v), msr_content); -+ check_vlapic_msr_for_vtpr(v); - break; - default: - if ( !long_mode_do_msr_write(regs) ) -@@ -2756,6 +2865,15 @@ asmlinkage void vmx_vmexit_handler(struc - - case EXIT_REASON_TPR_BELOW_THRESHOLD: - break; -+ case EXIT_REASON_APIC_ACCESS: -+ { -+ unsigned long offset; -+ -+ exit_qualification = __vmread(EXIT_QUALIFICATION); -+ offset = exit_qualification & 0x0fffUL; -+ handle_mmio(APIC_DEFAULT_PHYS_BASE | offset); -+ break; -+ } - - default: - exit_and_crash: -Index: xen-3.1-testing/xen/include/asm-x86/hvm/domain.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/hvm/domain.h -+++ xen-3.1-testing/xen/include/asm-x86/hvm/domain.h -@@ -41,6 +41,11 @@ struct hvm_domain { - s64 tsc_frequency; - struct pl_time pl_time; - -+ /* For memory-mapped vLAPIC/vTPR access optimization */ -+ spinlock_t vapic_access_lock; -+ int physmap_changed_for_vlapic_access : 1; -+ struct page_info *apic_access_page; -+ - struct hvm_io_handler io_handler; - - /* Lock protects access to irq, vpic and vioapic. */ -Index: xen-3.1-testing/xen/include/asm-x86/hvm/vlapic.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/hvm/vlapic.h -+++ xen-3.1-testing/xen/include/asm-x86/hvm/vlapic.h -@@ -49,12 +49,17 @@ - #define vlapic_disabled(vlapic) ((vlapic)->hw.disabled) - #define vlapic_enabled(vlapic) (!vlapic_disabled(vlapic)) - -+#define vlapic_base_address(vlapic) \ -+ (vlapic->hw.apic_base_msr & MSR_IA32_APICBASE_BASE) -+ - struct vlapic { - struct hvm_hw_lapic hw; - struct hvm_hw_lapic_regs *regs; - struct periodic_time pt; - s_time_t timer_last_update; - struct page_info *regs_page; -+ -+ int mmap_vtpr_enabled : 1; - }; - - static inline uint32_t vlapic_get_reg(struct vlapic *vlapic, uint32_t reg) -Index: xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmcs.h -+++ xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h -@@ -104,6 +104,7 @@ void vmx_vmcs_exit(struct vcpu *v); - #define CPU_BASED_ACTIVATE_MSR_BITMAP 0x10000000 - #define CPU_BASED_MONITOR_EXITING 0x20000000 - #define CPU_BASED_PAUSE_EXITING 0x40000000 -+#define ACTIVATE_SECONDARY_CONTROLS 0x80000000 - extern u32 vmx_cpu_based_exec_control; - - #define PIN_BASED_EXT_INTR_MASK 0x00000001 -@@ -119,8 +120,16 @@ extern u32 vmx_vmexit_control; - #define VM_ENTRY_DEACT_DUAL_MONITOR 0x00000800 - extern u32 vmx_vmentry_control; - -+#define SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES 0x00000001 -+extern u32 vmx_secondary_exec_control; -+ -+#define cpu_has_vmx_virtualize_apic_accesses \ -+ (vmx_secondary_exec_control & SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES) - #define cpu_has_vmx_tpr_shadow \ - (vmx_cpu_based_exec_control & CPU_BASED_TPR_SHADOW) -+#define cpu_has_vmx_mmap_vtpr_optimization \ -+ (cpu_has_vmx_virtualize_apic_accesses && cpu_has_vmx_tpr_shadow) -+ - #define cpu_has_vmx_msr_bitmap \ - (vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_MSR_BITMAP) - extern char *vmx_msr_bitmap; -@@ -158,6 +167,8 @@ enum vmcs_field { - TSC_OFFSET_HIGH = 0x00002011, - VIRTUAL_APIC_PAGE_ADDR = 0x00002012, - VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x00002013, -+ APIC_ACCESS_ADDR = 0x00002014, -+ APIC_ACCESS_ADDR_HIGH = 0x00002015, - VMCS_LINK_POINTER = 0x00002800, - VMCS_LINK_POINTER_HIGH = 0x00002801, - GUEST_IA32_DEBUGCTL = 0x00002802, -Index: xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h -+++ xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h -@@ -33,6 +33,9 @@ void vmx_intr_assist(void); - void vmx_do_resume(struct vcpu *); - void set_guest_time(struct vcpu *v, u64 gtime); - -+extern struct page_info *change_guest_physmap_for_vtpr(struct domain *d, -+ int enable_vtpr); -+ - /* - * Exit Reasons - */ -@@ -81,6 +84,7 @@ void set_guest_time(struct vcpu *v, u64 - #define EXIT_REASON_MACHINE_CHECK 41 - - #define EXIT_REASON_TPR_BELOW_THRESHOLD 43 -+#define EXIT_REASON_APIC_ACCESS 44 - - /* - * Interruption-information format -Index: xen-3.1-testing/xen/include/asm-x86/msr.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/msr.h -+++ xen-3.1-testing/xen/include/asm-x86/msr.h -@@ -116,6 +116,7 @@ static inline void wrmsrl(unsigned int m - #define MSR_IA32_VMX_CR0_FIXED1 0x487 - #define MSR_IA32_VMX_CR4_FIXED0 0x488 - #define MSR_IA32_VMX_CR4_FIXED1 0x489 -+#define MSR_IA32_VMX_PROCBASED_CTLS2 0x48b - #define IA32_FEATURE_CONTROL_MSR 0x3a - #define IA32_FEATURE_CONTROL_MSR_LOCK 0x1 - #define IA32_FEATURE_CONTROL_MSR_ENABLE_VMXON 0x4 diff --git a/15189-pmtimer.patch b/15189-pmtimer.patch deleted file mode 100644 index 9f3c486..0000000 --- a/15189-pmtimer.patch +++ /dev/null @@ -1,93 +0,0 @@ -# HG changeset 15189 patch -# User kfraser@localhost.localdomain -# Node ID 2d7d33ac982a0720408d841b13c3b97a2190eae4 -# Parent ae073ca6eb76f75a73063ba6e0f944b47b8f8954 -Add support for ACPI PM Timer as platform clock source. -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/arch/x86/time.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/time.c 2007-04-23 10:01:42.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/time.c 2007-07-02 10:47:59.000000000 +0200 -@@ -511,6 +511,60 @@ static int init_cyclone(void) - } - - /************************************************************ -+ * PLATFORM TIMER 4: ACPI PM TIMER -+ */ -+ -+u32 pmtmr_ioport; -+ -+/* Protected by platform_timer_lock. */ -+static u64 pmtimer_counter64; -+static u32 pmtimer_stamp; -+static struct timer pmtimer_overflow_timer; -+ -+/* ACPI PM timer ticks at 3.579545 MHz. */ -+#define ACPI_PM_FREQUENCY 3579545 -+ -+/* Deltas are 24-bit unsigned values, as counter may be only 24 bits wide. */ -+#define pmtimer_delta(c) ((u32)(((c) - pmtimer_stamp) & ((1U<<24)-1))) -+ -+static void pmtimer_overflow(void *unused) -+{ -+ u32 counter; -+ -+ spin_lock_irq(&platform_timer_lock); -+ counter = inl(pmtmr_ioport); -+ pmtimer_counter64 += pmtimer_delta(counter); -+ pmtimer_stamp = counter; -+ spin_unlock_irq(&platform_timer_lock); -+ -+ /* Trigger overflow avoidance roughly when counter increments 2^23. */ -+ set_timer(&pmtimer_overflow_timer, NOW() + MILLISECS(2000)); -+} -+ -+static u64 read_pmtimer_count(void) -+{ -+ return pmtimer_counter64 + pmtimer_delta(inl(pmtmr_ioport)); -+} -+ -+static int init_pmtimer(void) -+{ -+ if ( pmtmr_ioport == 0 ) -+ return 0; -+ -+ read_platform_count = read_pmtimer_count; -+ -+ init_timer(&pmtimer_overflow_timer, pmtimer_overflow, NULL, 0); -+ pmtimer_overflow(NULL); -+ platform_timer_stamp = pmtimer_counter64; -+ set_time_scale(&platform_timer_scale, ACPI_PM_FREQUENCY); -+ -+ printk("Platform timer is %s ACPI PM Timer\n", -+ freq_string(ACPI_PM_FREQUENCY)); -+ -+ return 1; -+} -+ -+/************************************************************ - * GENERIC PLATFORM TIMER INFRASTRUCTURE - */ - -@@ -549,7 +603,7 @@ static void platform_time_calibration(vo - - static void init_platform_timer(void) - { -- if ( !init_cyclone() && !init_hpet() ) -+ if ( !init_cyclone() && !init_hpet() && !init_pmtimer() ) - init_pit(); - } - -Index: 2007-05-14/xen/include/asm-x86/config.h -=================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/config.h 2007-04-23 10:01:46.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/config.h 2007-07-02 10:47:59.000000000 +0200 -@@ -22,6 +22,7 @@ - #define CONFIG_X86_LOCAL_APIC 1 - #define CONFIG_X86_GOOD_APIC 1 - #define CONFIG_X86_IO_APIC 1 -+#define CONFIG_X86_PM_TIMER 1 - #define CONFIG_HPET_TIMER 1 - #define CONFIG_X86_MCE_P4THERMAL 1 - #define CONFIG_ACPI_NUMA 1 diff --git a/15190-clocksource-opt.patch b/15190-clocksource-opt.patch deleted file mode 100644 index 35a1625..0000000 --- a/15190-clocksource-opt.patch +++ /dev/null @@ -1,74 +0,0 @@ -# HG changeset 15190 patch -# User kfraser@localhost.localdomain -# Node ID c9d66baad22b6f4cfd644b1272a8506372bb2947 -# Parent 2d7d33ac982a0720408d841b13c3b97a2190eae4 -Remove 'hpet_force' option. Replace with 'clocksource' option to allow -forced selection of platform clocksource, overriding the default -priority ordering. - -Usage: clocksource={pit,hpet,cyclone,acpi} - -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/arch/x86/time.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/time.c 2007-07-02 10:47:59.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/time.c 2007-07-02 10:48:03.000000000 +0200 -@@ -31,10 +31,9 @@ - #include - #include - --/* opt_hpet_force: If true, force HPET configuration via PCI space. */ --/* NB. This is a gross hack. Mainly useful for HPET testing. */ --static int opt_hpet_force = 0; --boolean_param("hpet_force", opt_hpet_force); -+/* opt_clocksource: Force clocksource to one of: pit, hpet, cyclone, acpi. */ -+static char opt_clocksource[10]; -+string_param("clocksource", opt_clocksource); - - #define EPOCH MILLISECS(1000) - -@@ -357,15 +356,6 @@ static int init_hpet(void) - u32 hpet_id, hpet_period, cfg; - int i; - -- if ( (hpet_address == 0) && opt_hpet_force ) -- { -- outl(0x800038a0, 0xcf8); -- outl(0xff000001, 0xcfc); -- outl(0x800038a0, 0xcf8); -- hpet_address = inl(0xcfc) & 0xfffffffe; -- printk("WARNING: Forcibly enabled HPET at %#lx.\n", hpet_address); -- } -- - if ( hpet_address == 0 ) - return 0; - -@@ -603,6 +593,27 @@ static void platform_time_calibration(vo - - static void init_platform_timer(void) - { -+ if ( opt_clocksource[0] != '\0' ) -+ { -+ int rc = -1; -+ -+ if ( !strcmp(opt_clocksource, "pit") ) -+ rc = (init_pit(), 1); -+ else if ( !strcmp(opt_clocksource, "hpet") ) -+ rc = init_hpet(); -+ else if ( !strcmp(opt_clocksource, "cyclone") ) -+ rc = init_cyclone(); -+ else if ( !strcmp(opt_clocksource, "acpi") ) -+ rc = init_pmtimer(); -+ -+ if ( rc == 1 ) -+ return; -+ -+ printk("WARNING: %s clocksource '%s'.\n", -+ (rc == 0) ? "Could not initialise" : "Unrecognised", -+ opt_clocksource); -+ } -+ - if ( !init_cyclone() && !init_hpet() && !init_pmtimer() ) - init_pit(); - } diff --git a/15211-partial-changeset.patch b/15211-partial-changeset.patch deleted file mode 100644 index b1ff5ce..0000000 --- a/15211-partial-changeset.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: xen-3.1-testing/tools/console/daemon/utils.c -=================================================================== ---- xen-3.1-testing.orig/tools/console/daemon/utils.c -+++ xen-3.1-testing/tools/console/daemon/utils.c -@@ -86,7 +86,7 @@ void daemonize(const char *pidfile) - if (chdir("/") < 0) - exit (1); - -- fd = open(pidfile, O_RDWR | O_CREAT); -+ fd = open(pidfile, O_RDWR | O_CREAT, S_IRUSR|S_IWUSR); - if (fd == -1) { - exit(1); - } diff --git a/15217-hvm-save-restore.patch b/15217-hvm-save-restore.patch deleted file mode 100644 index 4d2a1a8..0000000 --- a/15217-hvm-save-restore.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User Tim Deegan -# Date 1180973352 -3600 -# Node ID 7a16a499152ce67fb36b4e101b7d2d953d1f6362 -# Parent 6f13c3be08fa4c044868144672783f7b1341999a -[HVM] Save/restore: trigger FPU state save based on v->fpu_initialised -and not on the i387_valid flag, which has no meaning in this context. -Signed-off-by: Tim Deegan - -Index: xen-3.1-testing/xen/arch/x86/hvm/hvm.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/hvm.c -+++ xen-3.1-testing/xen/arch/x86/hvm/hvm.c -@@ -272,7 +272,7 @@ static int hvm_save_cpu_ctxt(struct doma - - /* Other vcpu register state */ - vc = &v->arch.guest_context; -- if ( vc->flags & VGCF_i387_valid ) -+ if ( v->fpu_initialised ) - memcpy(ctxt.fpu_regs, &vc->fpu_ctxt, sizeof(ctxt.fpu_regs)); - else - memset(ctxt.fpu_regs, 0, sizeof(ctxt.fpu_regs)); -@@ -364,7 +364,7 @@ static int hvm_load_cpu_ctxt(struct doma - vc->debugreg[6] = ctxt.dr6; - vc->debugreg[7] = ctxt.dr7; - -- vc->flags = VGCF_i387_valid | VGCF_online; -+ vc->flags = VGCF_online; - v->fpu_initialised = 1; - - /* Auxiliary processors should be woken immediately. */ diff --git a/15228-hvm-usb-windows-crash.patch b/15228-hvm-usb-windows-crash.patch deleted file mode 100644 index c64cbff..0000000 --- a/15228-hvm-usb-windows-crash.patch +++ /dev/null @@ -1,74 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181157846 -3600 -# Node ID 677731eb734d8d7afa37a2e31ca2ed85fbebc2a5 -# Parent f5a71c9771a81f220926ac11e4c9a2a27530c20a -[HVM] Prevent usb driver crashes in Windows - -Use atomic updates to read/write usb controller data. -This can be done because: - a) word copies on x86 are atomic - b) The USB spec requires word alignment - -This will need to be enhanced once USB 1.2 is supported. - -Signed-off-by: Steve Ofsthun - -Update to copy 'longword'-sized atoms. - -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/exec-dm.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -@@ -434,6 +434,31 @@ int iomem_index(target_phys_addr_t addr) - extern unsigned long *logdirty_bitmap; - extern unsigned long logdirty_bitmap_size; - -+/* -+ * Replace the standard byte memcpy with a word memcpy for appropriately sized -+ * memory copy operations. Some users (USB-UHCI) can not tolerate the possible -+ * word tearing that can result from a guest concurrently writing a memory -+ * structure while the qemu device model is modifying the same location. -+ * Forcing a word-sized read/write prevents the guest from seeing a partially -+ * written word-sized atom. -+ */ -+void memcpy_words(void *dst, void *src, size_t n) -+{ -+ while (n >= sizeof(long)) { -+ *((long *)dst)++ = *((long *)src)++; -+ n -= sizeof(long); -+ } -+ -+ if (n & 4) -+ *((uint32_t *)dst)++ = *((uint32_t *)src)++; -+ -+ if (n & 2) -+ *((uint16_t *)dst)++ = *((uint16_t *)src)++; -+ -+ if (n & 1) -+ *((uint8_t *)dst)++ = *((uint8_t *)src)++; -+} -+ - void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, - int len, int is_write) - { -@@ -470,7 +495,7 @@ void cpu_physical_memory_rw(target_phys_ - } - } else if ((ptr = phys_ram_addr(addr)) != NULL) { - /* Writing to RAM */ -- memcpy(ptr, buf, l); -+ memcpy_words(ptr, buf, l); - if (logdirty_bitmap != NULL) { - /* Record that we have dirtied this frame */ - unsigned long pfn = addr >> TARGET_PAGE_BITS; -@@ -506,7 +531,7 @@ void cpu_physical_memory_rw(target_phys_ - } - } else if ((ptr = phys_ram_addr(addr)) != NULL) { - /* Reading from RAM */ -- memcpy(buf, ptr, l); -+ memcpy_words(buf, ptr, l); - } else { - /* Neither RAM nor known MMIO space */ - memset(buf, 0xff, len); diff --git a/15230-hvm-usb-windows-crash.patch b/15230-hvm-usb-windows-crash.patch deleted file mode 100644 index 04ee232..0000000 --- a/15230-hvm-usb-windows-crash.patch +++ /dev/null @@ -1,55 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181210543 -3600 -# Node ID b090c290d9f8fc579be32ddd68f2bcd96e05aa03 -# Parent 6d45351273da0b49ed328ef8077446c4ceedf3ff -tools: Fix some type issues GCC 4.1.0 warnings. - -FC5's gcc 4.1.0 can't make some files in tools/ due to its stronger -type checking. - -From: Dexuan Cui -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/exec-dm.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -@@ -445,18 +445,29 @@ extern unsigned long logdirty_bitmap_siz - void memcpy_words(void *dst, void *src, size_t n) - { - while (n >= sizeof(long)) { -- *((long *)dst)++ = *((long *)src)++; -+ *((long *)dst) = *((long *)src); -+ dst = ((long *)dst) + 1; -+ src = ((long *)src) + 1; - n -= sizeof(long); - } - -- if (n & 4) -- *((uint32_t *)dst)++ = *((uint32_t *)src)++; -- -- if (n & 2) -- *((uint16_t *)dst)++ = *((uint16_t *)src)++; -+ if (n & 4) { -+ *((uint32_t *)dst) = *((uint32_t *)src); -+ dst = ((uint32_t *)dst) + 1; -+ src = ((uint32_t *)src) + 1; -+ } -+ -+ if (n & 2) { -+ *((uint16_t *)dst) = *((uint16_t *)src); -+ dst = ((uint16_t *)dst) + 1; -+ src = ((uint16_t *)src) + 1; -+ } - -- if (n & 1) -- *((uint8_t *)dst)++ = *((uint8_t *)src)++; -+ if (n & 1) { -+ *((uint8_t *)dst) = *((uint8_t *)src); -+ dst = ((uint8_t *)dst) + 1; -+ src = ((uint8_t *)src) + 1; -+ } - } - - void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, diff --git a/15234-hvm-usb-windows-crash.patch b/15234-hvm-usb-windows-crash.patch deleted file mode 100644 index fcaca2a..0000000 --- a/15234-hvm-usb-windows-crash.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181211324 -3600 -# Node ID 1cae82505e9e11bcf47f0857917cd20b2d0bad26 -# Parent 3a413f011b8f5dc53825d6882cdf95d47a4212b1 -ioemu: Tiny indentation fix. -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/exec-dm.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -@@ -455,7 +455,7 @@ void memcpy_words(void *dst, void *src, - *((uint32_t *)dst) = *((uint32_t *)src); - dst = ((uint32_t *)dst) + 1; - src = ((uint32_t *)src) + 1; -- } -+ } - - if (n & 2) { - *((uint16_t *)dst) = *((uint16_t *)src); diff --git a/15250_xend_device_destroy.patch b/15250_xend_device_destroy.patch deleted file mode 100644 index 1b0cfaf..0000000 --- a/15250_xend_device_destroy.patch +++ /dev/null @@ -1,69 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181553294 -3600 -# Node ID a43a03d53781e159da41f79d8cc615905b95ab80 -# Parent 93f77a5a8437df0b34919a6987f48e84342b4a43 -xend: Fix xm block-detach regression introduced by c/s 15157. - -Prior to this c/s, user was able to specify device name or id, e.g. - xm block-detach dom xvdb - xm block-detach dom 15728 - -Now, 'xm block-detach dom xvdb' silently fails. xend.log does contain -the following - -[2007-06-07 11:39:18 xend.XendDomainInfo 3775] DEBUG -(XendDomainInfo:519) devName=vbd/51712 -[2007-06-07 11:39:18 xend.XendDomainInfo 3775] DEBUG -(XendDomainInfo:527) Could not find the device xvdb - -This patch restores the previous behavior but retains the bugfix -introduced by c/s 15571. - -Signed-off-by: Jim Fehlig - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -544,31 +544,18 @@ class XendDomainInfo: - self.getDeviceController(devclass).waitForDevices() - - def destroyDevice(self, deviceClass, devid, force = False): -- found = True # Assume devid is an integer. - try: -- devid = int(devid) -+ dev = int(devid) - except ValueError: -- # devid is not a number, let's search for it in xenstore. -- devicePath = '%s/device/%s' % (self.dompath, deviceClass) -- found = False -- for entry in xstransact.List(devicePath): -- log.debug("Attempting to find devid at %s/%s", devicePath, entry) -- backend = xstransact.Read('%s/%s' % (devicePath, entry), -- "backend") -- if backend != None: -- devName = '%s/%s' % (deviceClass, entry) -- log.debug("devName=%s", devName) -- if devName == devid: -- # We found the integer matching our devid, use it instead -- devid = int(entry) -- found = True -- break -+ # devid is not a number but a string containing either device -+ # name (e.g. xvda) or device_type/device_id (e.g. vbd/51728) -+ dev = type(devid) is str and devid.split('/')[-1] or None -+ if dev == None: -+ log.debug("Could not find the device %s", devid) -+ return None - -- if not found: -- log.debug("Could not find the device %s", devid) -- return None -- log.debug("devid = %s", devid) -- return self.getDeviceController(deviceClass).destroyDevice(devid, force) -+ log.debug("dev = %s", dev) -+ return self.getDeviceController(deviceClass).destroyDevice(dev, force) - - def getDeviceSxprs(self, deviceClass): - if self._stateGet() in (DOM_STATE_RUNNING, DOM_STATE_PAUSED): diff --git a/15257-hvm-save-restore.patch b/15257-hvm-save-restore.patch deleted file mode 100644 index 513d00b..0000000 --- a/15257-hvm-save-restore.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User Tim Deegan -# Date 1181570210 -3600 -# Node ID ed254cf78f7ca758539ba3314932fbbd808807d2 -# Parent 2c8c6ca1296b82e31bb0a50fcf9f63d0bfa11176 -[QEMU] Fix up ioemu timer save/restore after version changes. -Signed-off-by: Tim Deegan - -Index: xen-3.1-testing/tools/ioemu/vl.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/vl.c -+++ xen-3.1-testing/tools/ioemu/vl.c -@@ -872,7 +872,7 @@ static void timer_save(QEMUFile *f, void - - static int timer_load(QEMUFile *f, void *opaque, int version_id) - { -- if (version_id != 1) -+ if (version_id != 1 && version_id != 2) - return -EINVAL; - if (cpu_ticks_enabled) { - return -EINVAL; diff --git a/15273_libxenapi.patch b/15273_libxenapi.patch deleted file mode 100644 index 12bd7be..0000000 --- a/15273_libxenapi.patch +++ /dev/null @@ -1,66 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181730428 -3600 -# Node ID 7f9362a8ae3daeb5dc7bc62069eae872c42a5a14 -# Parent 30449e0e0a64618c29e47ed7774cd2b689711319 -xenapi: Fix segfault in libxenapi. - -When calling xen_vbd_set_mode(), libxenapi attempted to convert enum -mode parameter to a string twice - resulting in segfault. Removed -first conversion since conversion is taking place in -marshalling/demarshalling layer. Fixed similar double enum conversion -in other places as well. - -Signed-off-by: Jim Fehlig - -diff -r 30449e0e0a64 -r 7f9362a8ae3d tools/libxen/src/xen_vbd.c ---- a/tools/libxen/src/xen_vbd.c Wed Jun 13 11:13:11 2007 +0100 -+++ b/tools/libxen/src/xen_vbd.c Wed Jun 13 11:27:08 2007 +0100 -@@ -463,7 +463,7 @@ xen_vbd_set_mode(xen_session *session, x - { .type = &abstract_type_string, - .u.string_val = vbd }, - { .type = &xen_vbd_mode_abstract_type_, -- .u.string_val = xen_vbd_mode_to_string(mode) } -+ .u.enum_val = mode } - }; - - xen_call_(session, "VBD.set_mode", param_values, 2, NULL, NULL); -@@ -479,7 +479,7 @@ xen_vbd_set_type(xen_session *session, x - { .type = &abstract_type_string, - .u.string_val = vbd }, - { .type = &xen_vbd_type_abstract_type_, -- .u.string_val = xen_vbd_type_to_string(type) } -+ .u.enum_val = type } - }; - - xen_call_(session, "VBD.set_type", param_values, 2, NULL, NULL); -diff -r 30449e0e0a64 -r 7f9362a8ae3d tools/libxen/src/xen_vm.c ---- a/tools/libxen/src/xen_vm.c Wed Jun 13 11:13:11 2007 +0100 -+++ b/tools/libxen/src/xen_vm.c Wed Jun 13 11:27:08 2007 +0100 -@@ -1142,7 +1142,7 @@ xen_vm_set_actions_after_shutdown(xen_se - { .type = &abstract_type_string, - .u.string_val = vm }, - { .type = &xen_on_normal_exit_abstract_type_, -- .u.string_val = xen_on_normal_exit_to_string(after_shutdown) } -+ .u.enum_val = after_shutdown } - }; - - xen_call_(session, "VM.set_actions_after_shutdown", param_values, 2, NULL, NULL); -@@ -1158,7 +1158,7 @@ xen_vm_set_actions_after_reboot(xen_sess - { .type = &abstract_type_string, - .u.string_val = vm }, - { .type = &xen_on_normal_exit_abstract_type_, -- .u.string_val = xen_on_normal_exit_to_string(after_reboot) } -+ .u.enum_val = after_reboot } - }; - - xen_call_(session, "VM.set_actions_after_reboot", param_values, 2, NULL, NULL); -@@ -1174,7 +1174,7 @@ xen_vm_set_actions_after_crash(xen_sessi - { .type = &abstract_type_string, - .u.string_val = vm }, - { .type = &xen_on_crash_behaviour_abstract_type_, -- .u.string_val = xen_on_crash_behaviour_to_string(after_crash) } -+ .u.enum_val = after_crash } - }; - - xen_call_(session, "VM.set_actions_after_crash", param_values, 2, NULL, NULL); diff --git a/15274_xenapi.patch b/15274_xenapi.patch deleted file mode 100644 index 8c49a5e..0000000 --- a/15274_xenapi.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181730467 -3600 -# Node ID ffdbe8aebde21710deca4ae84bba95e38f4b089b -# Parent 7f9362a8ae3daeb5dc7bc62069eae872c42a5a14 -xenapi: Implement XenAPI method VBD.set_mode in python. -Signed-off-by: Jim Fehlig - -Index: xen-3.1-testing/tools/python/xen/xend/XendAPI.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-3.1-testing/tools/python/xen/xend/XendAPI.py -@@ -1873,6 +1873,17 @@ class XendAPI(object): - xd.managed_config_save(vm) - return xen_api_success_void() - -+ def VBD_set_mode(self, session, vbd_ref, mode): -+ if mode == 'RW': -+ mode = 'w' -+ else: -+ mode = 'r' -+ xd = XendDomain.instance() -+ vm = xd.get_vm_with_dev_uuid('vbd', vbd_ref) -+ vm.set_dev_property('vbd', vbd_ref, 'mode', mode) -+ xd.managed_config_save(vm) -+ return xen_api_success_void() -+ - def VBD_get_all(self, session): - xendom = XendDomain.instance() - vbds = [d.get_vbds() for d in XendDomain.instance().list('all')] diff --git a/15275_xenapi.patch b/15275_xenapi.patch deleted file mode 100644 index 97c6f50..0000000 --- a/15275_xenapi.patch +++ /dev/null @@ -1,27 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181730493 -3600 -# Node ID b643179d7452a91cd874ee713c78bf30f8df3d2d -# Parent ffdbe8aebde21710deca4ae84bba95e38f4b089b -xenapi: Implement VM.set_VCPUs_at_startup and VM.set_VCPUs_max XenAPI -methods in xend. - -Signed-off-by: Jim Fehlig - -Index: xen-3.1-testing/tools/python/xen/xend/XendAPI.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendAPI.py -+++ xen-3.1-testing/tools/python/xen/xend/XendAPI.py -@@ -1474,6 +1474,12 @@ class XendAPI(object): - else: - return xen_api_success_void() - -+ def VM_set_VCPUs_at_startup(self, session, vm_ref, num): -+ return self.VM_set('VCPUs_at_startup', session, vm_ref, num) -+ -+ def VM_set_VCPUs_max(self, session, vm_ref, num): -+ return self.VM_set('VCPUs_max', session, vm_ref, num) -+ - def VM_set_actions_after_shutdown(self, session, vm_ref, action): - if action not in XEN_API_ON_NORMAL_EXIT: - return xen_api_error(['VM_ON_NORMAL_EXIT_INVALID', vm_ref]) diff --git a/15277-hvm-intel2amd-windows-migrate.patch b/15277-hvm-intel2amd-windows-migrate.patch deleted file mode 100644 index c51f663..0000000 --- a/15277-hvm-intel2amd-windows-migrate.patch +++ /dev/null @@ -1,51 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1181832897 -3600 -# Node ID 912f7e312ec2a56c89ef5a949b6ecc72f5df74a6 -# Parent 4d838167960694f1b9fcaec54590aef0e1f0a7ee -hvm svm: Fix for BSOD when "migrating" from Intel to AMD. - -The Intel processor driver for Windows (XP and later at least) reads -an MSR that AMD doesn't have. This causes GP-fault in kernel mode, -which causes blue-screen-of-death on Windows. This prevents a -disk-image that was installed on Intel from starting on an AMD -processor. - -This patch "fixes" the problem by allowing reads from the msr, -returning all zero's (which is a valid, if not particulary -meaningful, value for this register). - -Signed-off-by: Mats Petersson - -Index: xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c -@@ -2000,6 +2000,15 @@ static inline void svm_do_msr_access( - msr_content = v->arch.hvm_svm.cpu_shadow_efer; - break; - -+ case MSR_IA32_EBC_FREQUENCY_ID: -+ /* -+ * This Intel-only register may be accessed if this HVM guest -+ * has been migrated from an Intel host. The value zero is not -+ * particularly meaningful, but at least avoids the guest crashing! -+ */ -+ msr_content = 0; -+ break; -+ - default: - if ( rdmsr_hypervisor_regs(ecx, &eax, &edx) || - rdmsr_safe(ecx, eax, edx) == 0 ) -Index: xen-3.1-testing/xen/include/asm-x86/msr.h -=================================================================== ---- xen-3.1-testing.orig/xen/include/asm-x86/msr.h -+++ xen-3.1-testing/xen/include/asm-x86/msr.h -@@ -93,6 +93,7 @@ static inline void wrmsrl(unsigned int m - #define MSR_IA32_TIME_STAMP_COUNTER 0x10 - #define MSR_IA32_PLATFORM_ID 0x17 - #define MSR_IA32_EBL_CR_POWERON 0x2a -+#define MSR_IA32_EBC_FREQUENCY_ID 0x2c - - #define MSR_IA32_APICBASE 0x1b - #define MSR_IA32_APICBASE_BSP (1<<8) diff --git a/15381-log-svm-npt.patch b/15381-log-svm-npt.patch deleted file mode 100644 index 9dc54fd..0000000 --- a/15381-log-svm-npt.patch +++ /dev/null @@ -1,31 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1182263948 -3600 -# Node ID f1ca92bf7e0f0fc8441f9681395a09afe4617af9 -# Parent 07688f8f53943cb51c965fa91923b1c4a3e87d0f -hvm svm: Log into 'xm dmesg' that SVM NPT is enabled. -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/hvm/svm/svm.c -+++ xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c -@@ -895,7 +895,7 @@ static struct hvm_function_table svm_fun - .event_injection_faulted = svm_event_injection_faulted - }; - --void svm_npt_detect(void) -+static void svm_npt_detect(void) - { - u32 eax, ebx, ecx, edx; - -@@ -956,6 +956,9 @@ int start_svm(void) - - hvm_enable(&svm_function_table); - -+ if ( opt_hap_enabled ) -+ printk("SVM: Nested paging enabled.\n"); -+ - return 1; - } - diff --git a/15383-hvm-usb-windows-crash.patch b/15383-hvm-usb-windows-crash.patch deleted file mode 100644 index 107b644..0000000 --- a/15383-hvm-usb-windows-crash.patch +++ /dev/null @@ -1,72 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1182265695 -3600 -# Node ID 896b536d66c9952fac4bd1c9a6e3f562debec19d -# Parent cb747a35e057ad2536fc560d21d43a1ade1faae5 -ioemu: Assembler memcpy() for x86, and lowest-common-denominator -memcpy() function for all others, avoiding noisy longword copies on -ia64. -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/exec-dm.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -@@ -442,19 +442,40 @@ extern unsigned long logdirty_bitmap_siz - * Forcing a word-sized read/write prevents the guest from seeing a partially - * written word-sized atom. - */ --void memcpy_words(void *dst, void *src, size_t n) -+#if defined(__x86_64__) || defined(__i386__) -+static void memcpy_words(void *dst, void *src, size_t n) - { -- while (n >= sizeof(long)) { -- *((long *)dst) = *((long *)src); -- dst = ((long *)dst) + 1; -- src = ((long *)src) + 1; -- n -= sizeof(long); -- } -- -- if (n & 4) { -+ asm ( -+ " movl %%edx,%%ecx \n" -+#ifdef __x86_64 -+ " shrl $3,%%ecx \n" -+ " andl $7,%%edx \n" -+ " rep movsq \n" -+ " test $4,%%edx \n" -+ " jz 1f \n" -+ " movsl \n" -+#else /* __i386__ */ -+ " shrl $2,%%ecx \n" -+ " andl $3,%%edx \n" -+ " rep movsl \n" -+#endif -+ "1: test $2,%%edx \n" -+ " jz 1f \n" -+ " movsw \n" -+ "1: test $1,%%edx \n" -+ " jz 1f \n" -+ " movsb \n" -+ "1: \n" -+ : : "S" (src), "D" (dst), "d" (n) : "ecx" ); -+} -+#else -+static void memcpy_words(void *dst, void *src, size_t n) -+{ -+ while (n >= sizeof(uint32_t)) { - *((uint32_t *)dst) = *((uint32_t *)src); - dst = ((uint32_t *)dst) + 1; - src = ((uint32_t *)src) + 1; -+ n -= sizeof(uint32_t); - } - - if (n & 2) { -@@ -469,6 +490,7 @@ void memcpy_words(void *dst, void *src, - src = ((uint8_t *)src) + 1; - } - } -+#endif - - void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, - int len, int is_write) diff --git a/15389-32on64-memop-error-path.patch b/15389-32on64-memop-error-path.patch deleted file mode 100644 index 93af06d..0000000 --- a/15389-32on64-memop-error-path.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset 15389 patch -# User kfraser@localhost.localdomain -# Date 1182343102 -3600 -# Node ID 07be0266f6d88f2a8343b54f36301f3adac88d18 -# Parent 50358c4b37f4fcaac1061f1c84a865932401c1be -32-on-64: Fix error path from memory_op() hypercall. -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/common/compat/memory.c -=================================================================== ---- 2007-05-14.orig/xen/common/compat/memory.c 2007-04-23 10:01:43.000000000 +0200 -+++ 2007-05-14/xen/common/compat/memory.c 2007-07-02 10:48:06.000000000 +0200 -@@ -258,7 +258,8 @@ int compat_memory_op(unsigned int cmd, X - compat_pfn_t pfn = nat.rsrv->extent_start.p[start_extent]; - - BUG_ON(pfn != nat.rsrv->extent_start.p[start_extent]); -- if ( __copy_to_compat_offset(cmp.rsrv.extent_start, start_extent, &pfn, 1) ) -+ if ( __copy_to_compat_offset(cmp.rsrv.extent_start, -+ start_extent, &pfn, 1) ) - { - if ( split >= 0 ) - { -@@ -275,6 +276,10 @@ int compat_memory_op(unsigned int cmd, X - break; - } - } -+ -+ /* Bail if there was an error. */ -+ if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) ) -+ split = 0; - } - else - start_extent = end_extent; diff --git a/15390-32on64-setup-error-path.patch b/15390-32on64-setup-error-path.patch deleted file mode 100644 index 513710a..0000000 --- a/15390-32on64-setup-error-path.patch +++ /dev/null @@ -1,76 +0,0 @@ -# HG changeset 15390 patch -# User kfraser@localhost.localdomain -# Date 1182343128 -3600 -# Node ID 69658f935cc737c46d33404ccb5e9aff9842e5cb -# Parent 07be0266f6d88f2a8343b54f36301f3adac88d18 -32-on-64: Fix error path where we fail to successfully switch a guest -into compat mode. -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/arch/x86/domain.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:47:47.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:48:10.000000000 +0200 -@@ -227,7 +227,7 @@ static int setup_compat_l4(struct vcpu * - l4_pgentry_t *l4tab; - int rc; - -- if ( !pg ) -+ if ( pg == NULL ) - return -ENOMEM; - - /* This page needs to look like a pagetable so that it can be shadowed */ -@@ -239,8 +239,6 @@ static int setup_compat_l4(struct vcpu * - l4tab[l4_table_offset(PERDOMAIN_VIRT_START)] = - l4e_from_paddr(__pa(v->domain->arch.mm_perdomain_l3), - __PAGE_HYPERVISOR); -- v->arch.guest_table = pagetable_from_page(pg); -- v->arch.guest_table_user = v->arch.guest_table; - - if ( (rc = setup_arg_xlat_area(v, l4tab)) < 0 ) - { -@@ -248,6 +246,9 @@ static int setup_compat_l4(struct vcpu * - return rc; - } - -+ v->arch.guest_table = pagetable_from_page(pg); -+ v->arch.guest_table_user = v->arch.guest_table; -+ - return 0; - } - -@@ -313,11 +314,11 @@ int switch_compat(struct domain *d) - gdt_l1e = l1e_from_page(virt_to_page(compat_gdt_table), PAGE_HYPERVISOR); - for ( vcpuid = 0; vcpuid < MAX_VIRT_CPUS; vcpuid++ ) - { -+ if ( (d->vcpu[vcpuid] != NULL) && -+ (setup_compat_l4(d->vcpu[vcpuid]) != 0) ) -+ goto undo_and_fail; - d->arch.mm_perdomain_pt[((vcpuid << GDT_LDT_VCPU_SHIFT) + - FIRST_RESERVED_GDT_PAGE)] = gdt_l1e; -- if (d->vcpu[vcpuid] -- && setup_compat_l4(d->vcpu[vcpuid]) != 0) -- return -ENOMEM; - } - - d->arch.physaddr_bitsize = -@@ -325,6 +326,19 @@ int switch_compat(struct domain *d) - + (PAGE_SIZE - 2); - - return 0; -+ -+ undo_and_fail: -+ d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0; -+ release_arg_xlat_area(d); -+ gdt_l1e = l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR); -+ while ( vcpuid-- != 0 ) -+ { -+ if ( d->vcpu[vcpuid] != NULL ) -+ release_compat_l4(d->vcpu[vcpuid]); -+ d->arch.mm_perdomain_pt[((vcpuid << GDT_LDT_VCPU_SHIFT) + -+ FIRST_RESERVED_GDT_PAGE)] = gdt_l1e; -+ } -+ return -ENOMEM; - } - - #else diff --git a/15391-32on64-setup-pgtable.patch b/15391-32on64-setup-pgtable.patch deleted file mode 100644 index b16adea..0000000 --- a/15391-32on64-setup-pgtable.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset 15391 patch -# User kfraser@localhost.localdomain -# Date 1182343194 -3600 -# Node ID fe3df33e27615a9732f0ae73d65dae0f23afbb4d -# Parent 69658f935cc737c46d33404ccb5e9aff9842e5cb -32-on-64: First slot of hidden L4 page directory must start life as zero. -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/arch/x86/domain.c -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:48:10.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:48:13.000000000 +0200 -@@ -234,6 +234,7 @@ static int setup_compat_l4(struct vcpu * - pg->u.inuse.type_info = PGT_l4_page_table|PGT_validated; - - l4tab = copy_page(page_to_virt(pg), idle_pg_table); -+ l4tab[0] = l4e_empty(); - l4tab[l4_table_offset(LINEAR_PT_VIRT_START)] = - l4e_from_page(pg, __PAGE_HYPERVISOR); - l4tab[l4_table_offset(PERDOMAIN_VIRT_START)] = diff --git a/15410-domain-restore.patch b/15410-domain-restore.patch deleted file mode 100644 index 54d7c4d..0000000 --- a/15410-domain-restore.patch +++ /dev/null @@ -1,32 +0,0 @@ - -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1182415659 -3600 -# Node ID a83632dfbb28038ec4218e00f92ea220a85b6887 -# Parent 11bf94b2d51a10980a88aa3ee0b3b8c6e14cbfe0 -libxenguest: Add missing range-check on count field read from a domain -save/restore file. -Signed-off-by: Keir Fraser - ---- a/tools/libxc/xc_domain_restore.c Wed Jun 20 19:31:37 2007 +0100 -+++ b/tools/libxc/xc_domain_restore.c Thu Jun 21 09:47:39 2007 +0100 -@@ -903,13 +903,14 @@ int xc_domain_restore(int xc_handle, int - - /* Get the list of PFNs that are not in the psuedo-phys map */ - { -- unsigned int count; -+ unsigned int count = 0; - unsigned long *pfntab; - int nr_frees, rc; - -- if ( !read_exact(io_fd, &count, sizeof(count)) ) -- { -- ERROR("Error when reading pfn count"); -+ if ( !read_exact(io_fd, &count, sizeof(count)) || -+ (count > (1U << 28)) ) /* up to 1TB of address space */ -+ { -+ ERROR("Error when reading pfn count (= %u)", count); - goto out; - } - - diff --git a/15416-x86_64-failsafe.patch b/15416-x86_64-failsafe.patch deleted file mode 100644 index 9c4e601..0000000 --- a/15416-x86_64-failsafe.patch +++ /dev/null @@ -1,80 +0,0 @@ -# HG changeset 15416 patch -# User kfraser@localhost.localdomain -# Date 1182445370 -3600 -# Node ID b35b8053012e6b1720a392964bc7114ba30de420 -# Parent 04d4b7b6f5b752a4375cbb58f6ce3efc207f708a -Fix x86/64 failsafe callback handling. -Signed-off-by: Keir Fraser - -Index: 2007-05-14/xen/arch/x86/x86_64/compat/entry.S -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 10:37:50.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 10:48:18.000000000 +0200 -@@ -143,12 +143,12 @@ compat_restore_all_guest: - .Lft0: iretq - - .section .fixup,"ax" --.Lfx0: popq -15*8-8(%rsp) # error_code/entry_vector -- SAVE_ALL # 15*8 bytes pushed -- movq -8(%rsp),%rsi # error_code/entry_vector -- sti # after stack abuse (-1024(%rsp)) -+.Lfx0: sti -+ SAVE_ALL -+ movq UREGS_error_code(%rsp),%rsi -+ movq %rsp,%rax -+ andq $~0xf,%rsp - pushq $__HYPERVISOR_DS # SS -- leaq 8(%rsp),%rax - pushq %rax # RSP - pushfq # RFLAGS - pushq $__HYPERVISOR_CS # CS -Index: 2007-05-14/xen/arch/x86/x86_64/entry.S -=================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/entry.S 2007-07-02 10:37:49.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/entry.S 2007-07-02 10:48:18.000000000 +0200 -@@ -57,23 +57,23 @@ restore_all_guest: - /* No special register assumptions. */ - iret_exit_to_guest: - addq $8,%rsp --.Lft1: iretq -+.Lft0: iretq - - .section .fixup,"ax" --.Lfx1: popq -15*8-8(%rsp) # error_code/entry_vector -- SAVE_ALL # 15*8 bytes pushed -- movq -8(%rsp),%rsi # error_code/entry_vector -- sti # after stack abuse (-1024(%rsp)) -+.Lfx0: sti -+ SAVE_ALL -+ movq UREGS_error_code(%rsp),%rsi -+ movq %rsp,%rax -+ andq $~0xf,%rsp - pushq $__HYPERVISOR_DS # SS -- leaq 8(%rsp),%rax - pushq %rax # RSP -- pushf # RFLAGS -+ pushfq # RFLAGS - pushq $__HYPERVISOR_CS # CS -- leaq .Ldf1(%rip),%rax -+ leaq .Ldf0(%rip),%rax - pushq %rax # RIP - pushq %rsi # error_code/entry_vector - jmp handle_exception --.Ldf1: GET_CURRENT(%rbx) -+.Ldf0: GET_CURRENT(%rbx) - jmp test_all_events - failsafe_callback: - GET_CURRENT(%rbx) -@@ -88,10 +88,10 @@ failsafe_callback: - jmp test_all_events - .previous - .section __pre_ex_table,"a" -- .quad .Lft1,.Lfx1 -+ .quad .Lft0,.Lfx0 - .previous - .section __ex_table,"a" -- .quad .Ldf1,failsafe_callback -+ .quad .Ldf0,failsafe_callback - .previous - - ALIGN diff --git a/15418-hvm-usb-windows-crash.patch b/15418-hvm-usb-windows-crash.patch deleted file mode 100644 index ccd0cd9..0000000 --- a/15418-hvm-usb-windows-crash.patch +++ /dev/null @@ -1,21 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1182786759 -3600 -# Node ID 3f76b2f76c2ad605c448a5535780a17cbefd0b05 -# Parent 015d9abeacfb39c73c9aa488c2def2f66ab06e2b -ioemu: Fix ifdef __x86_64__ -Signed-off-by: Keir Fraser - -Index: xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -=================================================================== ---- xen-3.1-testing.orig/tools/ioemu/target-i386-dm/exec-dm.c -+++ xen-3.1-testing/tools/ioemu/target-i386-dm/exec-dm.c -@@ -447,7 +447,7 @@ static void memcpy_words(void *dst, void - { - asm ( - " movl %%edx,%%ecx \n" --#ifdef __x86_64 -+#ifdef __x86_64__ - " shrl $3,%%ecx \n" - " andl $7,%%edx \n" - " rep movsq \n" diff --git a/15433-pae-ptwr-check.patch b/15433-pae-ptwr-check.patch deleted file mode 100644 index 08ea639..0000000 --- a/15433-pae-ptwr-check.patch +++ /dev/null @@ -1,33 +0,0 @@ -# HG changeset 15433 patch -# User Ian Campbell -# Date 1183052420 -3600 -# Node ID a5360bf1866892498f4fda9fb86f96035143221d -# Parent d0608ecb56bc9dd77740096fd734332c46c737bd -Fix fixup of invalid PTE writes, broken by 13392:0fd65225e4c6. - -By the time we test if addr is the upper word it has already been -aligned to the 8 byte pte size. - -Signed-off-by: Ian Campbell - -Index: xen-3.1-testing/xen/arch/x86/mm.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/mm.c -+++ xen-3.1-testing/xen/arch/x86/mm.c -@@ -3194,6 +3194,7 @@ static int ptwr_emulated_update( - struct ptwr_emulate_ctxt *ptwr_ctxt) - { - unsigned long mfn; -+ unsigned long unaligned_addr = addr; - struct page_info *page; - l1_pgentry_t pte, ol1e, nl1e, *pl1e; - struct vcpu *v = current; -@@ -3247,7 +3248,7 @@ static int ptwr_emulated_update( - if ( unlikely(!get_page_from_l1e(gl1e_to_ml1e(d, nl1e), d)) ) - { - if ( (CONFIG_PAGING_LEVELS >= 3) && is_pv_32bit_domain(d) && -- (bytes == 4) && (addr & 4) && !do_cmpxchg && -+ (bytes == 4) && (unaligned_addr & 4) && !do_cmpxchg && - (l1e_get_flags(nl1e) & _PAGE_PRESENT) ) - { - /* diff --git a/15434-irq-permissions.patch b/15434-irq-permissions.patch deleted file mode 100644 index dc9b338..0000000 --- a/15434-irq-permissions.patch +++ /dev/null @@ -1,20 +0,0 @@ -# HG changeset patch -# User Keir Fraser -# Date 1183059350 -3600 -# Node ID b377a102f0eb1b75ec76cf230ee8f259ed01c528 -# Parent a5360bf1866892498f4fda9fb86f96035143221d -xend: Fix irq-permissions setting during domain creation. -Signed-off-by: Keir Fraser - -diff -r a5360bf18668 -r b377a102f0eb tools/python/xen/xend/server/irqif.py ---- a/tools/python/xen/xend/server/irqif.py Thu Jun 28 18:40:20 2007 +0100 -+++ b/tools/python/xen/xend/server/irqif.py Thu Jun 28 20:35:50 2007 +0100 -@@ -61,7 +61,7 @@ class IRQController(DevController): - - pirq = get_param('irq') - -- rc = xc.domain_irq_permission(dom = self.getDomid(), -+ rc = xc.domain_irq_permission(domid = self.getDomid(), - pirq = pirq, - allow_access = True) - diff --git a/15444-vmxassist-p2r.patch b/15444-vmxassist-p2r.patch deleted file mode 100644 index 7bc4849..0000000 --- a/15444-vmxassist-p2r.patch +++ /dev/null @@ -1,158 +0,0 @@ -# HG changeset 15444 patch -# User Keir Fraser -# Date 1183332299 -3600 -# Node ID 93b9161fc92095241b4566f510aeb34ffff27f55 -# Parent 5d7160564381eedda0853cf003b3097da0173893 -Use 32bit operand and address during VMXAssist protected to real. -Signed-off-by: Xin Li - -Index: 2007-05-14/tools/firmware/vmxassist/setup.c -=================================================================== ---- 2007-05-14.orig/tools/firmware/vmxassist/setup.c 2007-04-23 10:01:14.000000000 +0200 -+++ 2007-05-14/tools/firmware/vmxassist/setup.c 2007-07-02 10:51:33.000000000 +0200 -@@ -241,9 +241,10 @@ enter_real_mode(struct regs *regs) - } - - /* go from protected to real mode */ -- regs->eflags |= EFLAGS_VM; - set_mode(regs, VM86_PROTECTED_TO_REAL); - emulate(regs); -+ if (mode != VM86_REAL) -+ panic("failed to emulate between clear PE and long jump.\n"); - } - - /* -Index: 2007-05-14/tools/firmware/vmxassist/vm86.c -=================================================================== ---- 2007-05-14.orig/tools/firmware/vmxassist/vm86.c 2007-04-23 10:01:14.000000000 +0200 -+++ 2007-05-14/tools/firmware/vmxassist/vm86.c 2007-07-02 10:51:33.000000000 +0200 -@@ -584,8 +584,13 @@ movr(struct regs *regs, unsigned prefix, - unsigned addr = operand(prefix, regs, modrm); - unsigned val, r = (modrm >> 3) & 7; - -- if ((modrm & 0xC0) == 0xC0) /* no registers */ -- return 0; -+ if ((modrm & 0xC0) == 0xC0) { -+ /* -+ * Emulate all guest instructions in protected to real mode. -+ */ -+ if (mode != VM86_PROTECTED_TO_REAL) -+ return 0; -+ } - - switch (opc) { - case 0x88: /* addr32 mov r8, r/m8 */ -@@ -818,8 +823,13 @@ mov_to_seg(struct regs *regs, unsigned p - { - unsigned modrm = fetch8(regs); - -- /* Only need to emulate segment loads in real->protected mode. */ -- if (mode != VM86_REAL_TO_PROTECTED) -+ /* -+ * Emulate segment loads in: -+ * 1) real->protected mode. -+ * 2) protected->real mode. -+ */ -+ if ((mode != VM86_REAL_TO_PROTECTED) && -+ (mode != VM86_PROTECTED_TO_REAL)) - return 0; - - /* Register source only. */ -@@ -829,6 +839,8 @@ mov_to_seg(struct regs *regs, unsigned p - switch ((modrm & 0x38) >> 3) { - case 0: /* es */ - regs->ves = getreg16(regs, modrm); -+ if (mode == VM86_PROTECTED_TO_REAL) -+ return 1; - saved_rm_regs.ves = 0; - oldctx.es_sel = regs->ves; - return 1; -@@ -837,21 +849,29 @@ mov_to_seg(struct regs *regs, unsigned p - - case 2: /* ss */ - regs->uss = getreg16(regs, modrm); -+ if (mode == VM86_PROTECTED_TO_REAL) -+ return 1; - saved_rm_regs.uss = 0; - oldctx.ss_sel = regs->uss; - return 1; - case 3: /* ds */ - regs->vds = getreg16(regs, modrm); -+ if (mode == VM86_PROTECTED_TO_REAL) -+ return 1; - saved_rm_regs.vds = 0; - oldctx.ds_sel = regs->vds; - return 1; - case 4: /* fs */ - regs->vfs = getreg16(regs, modrm); -+ if (mode == VM86_PROTECTED_TO_REAL) -+ return 1; - saved_rm_regs.vfs = 0; - oldctx.fs_sel = regs->vfs; - return 1; - case 5: /* gs */ - regs->vgs = getreg16(regs, modrm); -+ if (mode == VM86_PROTECTED_TO_REAL) -+ return 1; - saved_rm_regs.vgs = 0; - oldctx.gs_sel = regs->vgs; - return 1; -@@ -1063,7 +1083,8 @@ set_mode(struct regs *regs, enum vm86_mo - } - - mode = newmode; -- TRACE((regs, 0, states[mode])); -+ if (mode != VM86_PROTECTED) -+ TRACE((regs, 0, states[mode])); - } - - static void -@@ -1275,6 +1296,12 @@ opcode(struct regs *regs) - unsigned opc, modrm, disp; - unsigned prefix = 0; - -+ if (mode == VM86_PROTECTED_TO_REAL && -+ oldctx.cs_arbytes.fields.default_ops_size) { -+ prefix |= DATA32; -+ prefix |= ADDR32; -+ } -+ - for (;;) { - switch ((opc = fetch8(regs))) { - case 0x07: /* pop %es */ -@@ -1385,17 +1412,29 @@ opcode(struct regs *regs) - continue; - - case 0x66: -- TRACE((regs, regs->eip - eip, "data32")); -- prefix |= DATA32; -+ if (mode == VM86_PROTECTED_TO_REAL && -+ oldctx.cs_arbytes.fields.default_ops_size) { -+ TRACE((regs, regs->eip - eip, "data16")); -+ prefix &= ~DATA32; -+ } else { -+ TRACE((regs, regs->eip - eip, "data32")); -+ prefix |= DATA32; -+ } - continue; - - case 0x67: -- TRACE((regs, regs->eip - eip, "addr32")); -- prefix |= ADDR32; -+ if (mode == VM86_PROTECTED_TO_REAL && -+ oldctx.cs_arbytes.fields.default_ops_size) { -+ TRACE((regs, regs->eip - eip, "addr16")); -+ prefix &= ~ADDR32; -+ } else { -+ TRACE((regs, regs->eip - eip, "addr32")); -+ prefix |= ADDR32; -+ } - continue; - -- case 0x88: /* addr32 mov r8, r/m8 */ -- case 0x8A: /* addr32 mov r/m8, r8 */ -+ case 0x88: /* mov r8, r/m8 */ -+ case 0x8A: /* mov r/m8, r8 */ - if (mode != VM86_REAL && mode != VM86_REAL_TO_PROTECTED) - goto invalid; - if ((prefix & ADDR32) == 0) diff --git a/15469-hvm-save-restore.patch b/15469-hvm-save-restore.patch deleted file mode 100644 index 4669358..0000000 --- a/15469-hvm-save-restore.patch +++ /dev/null @@ -1,67 +0,0 @@ -# HG changeset patch -# User Tim Deegan -# Date 1183643173 -3600 -# Node ID 936aa542053d050c246825993b1213243ea2fb00 -# Parent d54d47fc8c6cdea23437476407bec05d85742760 -[HVM] Shadow: avoid xen crash if guest uses special memory for pagetables -(just crash the guest and don't do any more PTE propagations). -Signed-off-by: Tim Deegan - -Index: xen-3.1-testing/xen/arch/x86/mm/shadow/common.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/common.c -+++ xen-3.1-testing/xen/arch/x86/mm/shadow/common.c -@@ -474,7 +474,9 @@ void shadow_promote(struct vcpu *v, mfn_ - ASSERT(mfn_valid(gmfn)); - - /* We should never try to promote a gmfn that has writeable mappings */ -- ASSERT(sh_remove_write_access(v, gmfn, 0, 0) == 0); -+ ASSERT((page->u.inuse.type_info & PGT_type_mask) != PGT_writable_page -+ || (page->u.inuse.type_info & PGT_count_mask) == 0 -+ || v->domain->is_shutting_down); - - /* Is the page already shadowed? */ - if ( !test_and_set_bit(_PGC_page_table, &page->count_info) ) -@@ -1818,11 +1820,12 @@ int sh_remove_write_access(struct vcpu * - perfc_incr(shadow_writeable_bf); - hash_foreach(v, callback_mask, callbacks, gmfn); - -- /* If that didn't catch the mapping, something is very wrong */ -+ /* If that didn't catch the mapping, then there's some non-pagetable -+ * mapping -- ioreq page, grant mapping, &c. */ - if ( (mfn_to_page(gmfn)->u.inuse.type_info & PGT_count_mask) != 0 ) - { -- SHADOW_ERROR("can't find all writeable mappings of mfn %lx: " -- "%lu left\n", mfn_x(gmfn), -+ SHADOW_ERROR("can't remove write access to mfn %lx: guest has " -+ "%lu special-use mappings of it\n", mfn_x(gmfn), - (mfn_to_page(gmfn)->u.inuse.type_info&PGT_count_mask)); - domain_crash(v->domain); - } -Index: xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c -=================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/multi.c -+++ xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c -@@ -2719,10 +2719,21 @@ static int sh_page_fault(struct vcpu *v, - - if ( guest_walk_tables(v, va, &gw, 1) != 0 ) - { -- SHADOW_PRINTK("malformed guest pagetable!"); -+ SHADOW_PRINTK("malformed guest pagetable\n"); - print_gw(&gw); - } - -+ /* It's possible that the guest has put pagetables in memory that it has -+ * already used for some special purpose (ioreq pages, or granted pages). -+ * If that happens we'll have killed the guest already but it's still not -+ * safe to propagate entries out of the guest PT so get out now. */ -+ if ( unlikely(d->is_shutting_down) ) -+ { -+ SHADOW_PRINTK("guest is shutting down\n"); -+ shadow_unlock(d); -+ return 0; -+ } -+ - sh_audit_gw(v, &gw); - - // We do not look at the gw->l1e, as that will not exist for superpages. diff --git a/15477_dev_attach.patch b/15477_dev_attach.patch deleted file mode 100644 index dc76672..0000000 --- a/15477_dev_attach.patch +++ /dev/null @@ -1,34 +0,0 @@ -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1183729265 -3600 -# Node ID 3196b63a7301b264d45b82ac347b1bef854680b3 -# Parent f20ee5bc9d28cab8a27e2bd073b72033adb7f9a7 -xend: Fix xm block/network-attach command for inactive managed domain -Signed-off-by: Masaki Kanno - -Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -=================================================================== ---- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py -+++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -500,9 +500,18 @@ class XendDomainInfo: - dev_uuid = self.info.device_add(dev_type, cfg_sxp = dev_config) - dev_config_dict = self.info['devices'][dev_uuid][1] - log.debug("XendDomainInfo.device_create: %s" % scrub_password(dev_config_dict)) -- dev_config_dict['devid'] = devid = \ -- self._createDevice(dev_type, dev_config_dict) -- self._waitForDevice(dev_type, devid) -+ -+ if self.domid is not None: -+ try: -+ dev_config_dict['devid'] = devid = \ -+ self._createDevice(dev_type, dev_config_dict) -+ self._waitForDevice(dev_type, devid) -+ except VmError, ex: -+ raise ex -+ else: -+ devid = None -+ -+ xen.xend.XendDomain.instance().managed_config_save(self) - return self.getDeviceController(dev_type).sxpr(devid) - - def device_configure(self, dev_sxp, devid = None): diff --git a/15480-man-xm.patch b/15480-man-xm.patch deleted file mode 100644 index 53fc1fa..0000000 --- a/15480-man-xm.patch +++ /dev/null @@ -1,776 +0,0 @@ - -# HG changeset patch -# User kfraser@localhost.localdomain -# Date 1183729502 -3600 -# Node ID daa07db3ca845c9b08415d19a4d888902abf8321 -# Parent d49e6a814d9a4cc8b136b599b77557920abd7921 -docs: update xm man page - -- Fixed description of "Mem" column in "xm list" output. -- Added a bit of text for the credit scheduler. -- Described the --force option to block-detach. -- Made formatting and spelling more consistent. -- etc... - -Signed-off-by: Charles Coffing - ---- a/docs/man/xm.pod.1 Fri Jul 06 14:43:51 2007 +0100 -+++ b/docs/man/xm.pod.1 Fri Jul 06 14:45:02 2007 +0100 -@@ -4,7 +4,7 @@ xm - Xen management user interface - - =head1 SYNOPSIS - --xm [args] -+B I [I] - - =head1 DESCRIPTION - -@@ -13,46 +13,50 @@ domains. It can also be used to list cur - domains. It can also be used to list current domains, enable or pin - VCPUs, and attach or detach virtual block devices. - --The basic structure of every xm command is almost always: -- -- xm [OPTIONS] -- --Where I is one of the sub commands listed below, I -+The basic structure of every B command is almost always: -+ -+=over 2 -+ -+B I I [I] -+ -+=back -+ -+Where I is one of the subcommands listed below, I - is the numeric domain id, or the domain name (which will be internally --translated to domain id), and I are sub command specific -+translated to domain id), and I are subcommand specific - options. There are a few exceptions to this rule in the cases where --the sub command in question acts on all domains, the entire machine, --or directly on the xen hypervisor. Those exceptions will be clear for --each of those sub commands. -+the subcommand in question acts on all domains, the entire machine, -+or directly on the Xen hypervisor. Those exceptions will be clear for -+each of those subcommands. - - =head1 NOTES - - All B operations rely upon the Xen control daemon, aka B. --For any xm commands to run xend must also be running. For this reason --you should start xend as a service when your system first boots using --xen. -+For any B commands to run, xend must also be running. For this -+reason you should start xend as a service when your system first boots -+using Xen. - - Most B commands require root privileges to run due to the - communications channels used to talk to the hypervisor. Running as - non root will return an error. - - Most B commands act asynchronously, so just because the B --command returned, doesn't mean the action is complete. This is -+command returned doesn't mean the action is complete. This is - important, as many operations on domains, like create and shutdown, - can take considerable time (30 seconds or more) to bring the machine - into a fully compliant state. If you want to know when one of these --actions has finished you must poll through xm list periodically. -+actions has finished you must poll through B periodically. - - =head1 DOMAIN SUBCOMMANDS - --The following sub commands manipulate domains directly, as stated --previously most commands take domain-id as the first parameter. -+The following subcommands manipulate domains directly. As stated -+previously, most commands take I as the first parameter. - - =over 4 - - =item B I - --Attach to domain domain-id's console. If you've set up your Domains to -+Attach to domain I's console. If you've set up your domains to - have a traditional log in console this will look much like a normal - text log in screen. - -@@ -63,15 +67,15 @@ so running curses based interfaces over - so running curses based interfaces over the console B. Vi tends to get very odd when using it over this interface. - --=item B I<[-c]> I I<[name=value]>.. -- --The create sub command requires a configfile and can optional take a -+=item B [B<-c>] I [I=I].. -+ -+The create sub command requires a config file and can optionally take a - series of name value pairs that add to or override variables defined - in the config file. See L for full details of that file - format, and possible options used in either the configfile or --Name=Value combinations. -- --Configfile can either be an absolute path to a file, or a relative -+I=I combinations. -+ -+I can either be an absolute path to a file, or a relative - path to a file located in /etc/xen. - - Create will return B as the domain is started. This B I - --Immediately terminate the domain domain-id. This doesn't give the domain --OS any chance to react, and it the equivalent of ripping the power --cord out on a physical machine. In most cases you will want to use --the B command instead. -+Immediately terminate the domain I. This doesn't give the -+domain OS any chance to react, and is the equivalent of ripping the -+power cord out on a physical machine. In most cases you will want to -+use the B command instead. - - =item B I - -@@ -129,14 +133,14 @@ Converts a domain name to a domain id us - - Converts a domain id to a domain name using xend's internal mapping. - --=item B I<[--long]> -+=item B [B<--long>] - - Displays the short help message (i.e. common commands). - --The I<--long> option prints out the complete set of B subcommands, -+The B<--long> option prints out the complete set of B subcommands, - grouped by function. - --=item B I<[--long | --label]> I<[domain-id, ...]> -+=item B [B<--long> | B<--label>] [I ...] - - Prints information about one or more domains. If no domains are - specified it prints out information about all domains. -@@ -151,21 +155,23 @@ An example format for the list is as fol - Mandrake10.2 167 128 1 ------ 2.5 - Suse9.2 168 100 1 ------ 1.8 - --Name is the name of the domain. ID the domain numeric id. Mem is the --size of the memory allocated to the domain. VCPUS is the number of --VCPUS allocated to domain. State is the run state (see below). Time --is the total run time of the domain as accounted for by Xen. -+Name is the name of the domain. ID the numeric domain id. Mem is the -+desired amount of memory to allocate to the domain (although it may -+not be the currently allocated amount). VCPUs is the number of -+virtual CPUs allocated to the domain. State is the run state (see -+below). Time is the total run time of the domain as accounted for by -+Xen. - - B - - =over 4 - --The State field lists 6 states for a Xen Domain, and which ones the --current Domain is in. -+The State field lists 6 states for a Xen domain, and which ones the -+current domain is in. - - =item B - --The domain is currently running on a CPU -+The domain is currently running on a CPU. - - =item B - -@@ -203,12 +209,12 @@ B - - =over 4 - --If I<--long> is specified, the output for xm list is not the table -+If B<--long> is specified, the output for B is not the table - view shown above, but instead is an S-Expression representing all - information known about all domains asked for. This is mostly only - useful for external programs to parse the data. - --B there is no stable guarantees on the format of this data. -+B There is no stable guarantees on the format of this data. - Use at your own risk. - - =back -@@ -217,10 +223,10 @@ B