Hello community,
here is the log from the commit of package xen for openSUSE:Factory
checked in at Mon May 4 18:37:56 CEST 2009.
--------
--- xen/xen.changes 2009-03-02 18:22:00.000000000 +0100
+++ /mounts/work_src_done/STABLE/xen/xen.changes 2009-04-29 22:09:21.000000000 +0200
@@ -1,0 +2,48 @@
+Fri Apr 22 17:30:02 CST 2009 - wkong@novell.com
+
+- Backport two qcow2 patches from qemu org
+ ioemu-6816-qcow2-revert-6404-6405-6407.patch
+ ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
+
+-------------------------------------------------------------------
+Fri Apr 17 16:21:36 CST 2009 - wkong@novell.com
+- bnc#477890 - Patch: ioemu-qcow2-enhance-snapshot-create.patch
+
+-------------------------------------------------------------------
+Thu Apr 16 12:13:10 MDT 2009 - jfehlig@novell.com
+
+- Updated xend-domain-lock.patch
+ fate#303525, bnc#494892
+
+-------------------------------------------------------------------
+Thu Apr 9 18:36:23 CST 2009 - wkong@novell.com
+
+- Remove Patch155: xend-core-dump-loc.diff
+- Modify Patch110: xen-domUloader.diff,
+ remove symbol "bootfilter"
+
+-------------------------------------------------------------------
+Wed Apr 8 17:38:12 CST 2009 - wkong@novell.com
+
+- PATCH: network-nat-open-SuSEfirewall2-FORWARD.patch
+ fate#305354, bnc#472107
+ Open SuSEfirewall2 FORWARD rule when use xen nat
+- PATCH: network-nat-dhcpd-domain-info.patch
+ Add domain info for nat-dhcpd
+
+-------------------------------------------------------------------
+Thu Apr 2 16:52:04 MDT 2009 - jfehlig@novell.com
+
+- Fix domUloader to handle block device names with ':'
+
+-------------------------------------------------------------------
+Wed Mar 11 16:28:59 MDT 2009 - jfehlig@novell.com
+
+- Use pidofproc/checkproc in xend init script
+
+-------------------------------------------------------------------
+Tue Mar 3 16:11:39 CET 2009 - kukuk@suse.de
+
+- Don't load 8139* driver if xen-vnif works [bnc#480164]
+
+-------------------------------------------------------------------
@@ -8,0 +57,13 @@
+Thu Feb 26 15:05:38 MST 2009 - carnold@novell.com
+
+- bnc#474822 - L3: Win2003 i386 XEN VM can see only 2 TB with a
+ 4TB LUN.
+ int13_hardisk-64bit-lba.patch
+
+-------------------------------------------------------------------
+Wed Feb 25 11:52:16 MST 2009 - jfehlig@novell.com
+
+- bnc#477890 - Destroy domain if snapshot restore fails.
+ Updated snapshot-xend.patch
+
+-------------------------------------------------------------------
@@ -18,0 +80,13 @@
+Tue Feb 24 16:03:35 CET 2009 - kwolf@suse.de
+
+- bnc#477892 - Disable xend timeout for snapshots
+ Updated snapshot-xend.patch
+
+-------------------------------------------------------------------
+Tue Feb 24 14:28:52 CET 2009 - kwolf@suse.de
+
+- bnc#477895 - Fix detaching blktap disks from domains without
+ device model
+ Updated blktap-ioemu-close-fix.patch
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
18406-constify-microcode.patch
18412-x86-page-type-preemptible.patch
18420-x86-page-type-preemptible-fix.patch
18428-poll-single-port.patch
18446-vtd-dom0-passthrough.patch
18456-vtd-dom0-passthrough-cmdline.patch
18464-cpu-hotplug.patch
18468-therm-control-msr.patch
18471-cpu-hotplug.patch
18475-amd-microcode-update.patch
18481-amd-microcode-update-fix.patch
18483-intel-microcode-update.patch
18484-stubdom-ioemu-makefile.patch
18487-microcode-update-irq-context.patch
18488-microcode-free-fix.patch
18509-continue-hypercall-on-cpu.patch
18519-microcode-retval.patch
18520-per-CPU-GDT.patch
18521-per-CPU-TSS.patch
18523-per-CPU-misc.patch
18528-dump-evtchn.patch
18539-pirq-vector-mapping.patch
18547-pirq-vector-mapping-fix.patch
18573-move-pirq-logic.patch
18574-msi-free-vector.patch
18577-bad-assertion.patch
18583-passthrough-locking.patch
18584-evtchn-lock-rename.patch
18620-x86-page-type-preemptible-fix.patch
18637-vmx-set-dr7.patch
18654-xend-vcpus.patch
18656-vtd-alloc-checks.patch
18661-recursive-spinlocks.patch
18720-x86-dom-cleanup.patch
18722-x86-fixmap-reserved.patch
18723-unmap-dom-page-const.patch
18724-i386-highmem-assist.patch
18731-x86-dom-cleanup.patch
18735-x86-dom-cleanup.patch
18741-x86-dom-cleanup-no-hack.patch
18742-x86-partial-page-ref.patch
18745-xend-ioport-irq.patch
18747-x86-partial-page-ref.patch
18762-vtd-intremap-SMI-RTEs.patch
18764-cpu-affinity.patch
18771-reduce-GDT-switching.patch
18778-msi-irq-fix.patch
18780-cpu-affinity.patch
18785-vlapic-lowest-prio.patch
18788-vlapic-accel-dom-restore.patch
18795-x86-ioapic-guest-write.patch
18799-cpu-affinity.patch
18805-pv-driver-build.patch
18810-shadow-PAT.patch
18844-shared-page-EOI.patch
18852-shared-page-EOI-gmfn.patch
18870-vtd-flush-per-device.patch
18878-x86-cpufreq-less-verbose.patch
18879-cpufreq-params.patch
18880-x86-pirq-guest-bind-msg.patch
18887-vtd-error-handling.patch
18904-x86-local-irq.patch
18905-x86-ioapic-boot-panic.patch
18929-shadow-no-duplicates.patch
18930-xenoprof-dunnington.patch
18934-vtd-PCI-X-dev-assign.patch
18937-S3-MSI.patch
18943-amd-32bit-paging-limit.patch
18970-vmx-print-features.patch
19009-x86_64-note-init-p2m.patch
19027-hvmloader-SMBIOS-dev-mem-boundary.patch
19032-amd-iommu-pointer-reset.patch
19035-MSI-X-proper-enable.patch
19038-x86-no-apic.patch
19039-x86-propagate-nolapic.patch
19046-cross-bit-coredumping.patch
19048-cross-bit-coredumping.patch
19051-cross-bit-coredumping.patch
19072-vmx-pat.patch
19079-snp_ctl-1.patch
19088-x86-page-non-atomic-owner.patch
19089-x86_64-widen-page-refcounts.patch
19103-x86_64-fold-page-lock.patch
19151-xend-class-dereg.patch
19152-xm-man-page.patch
19153-xm-noxen-error.patch
19154-snoop-control.patch
19198-fix-snoop.patch
blktap-error-handling.patch
blktap-ioemu-close-fix.patch
ioemu-blktap-fix-open.patch
ioemu-qcow2-multiblock-aio.patch
ioemu-vpc-4gb-fix.patch
old-arbytes.patch
qemu-img-snapshot.patch
reenable-block-protocols.patch
rpmlint.diff
x86_64-page-info-pack.patch
x86_64-sh-next-shadow.patch
xen-3.3.1-testing-src.tar.bz2
New:
----
ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
network-nat-open-SuSEfirewall2-FORWARD.patch
svm-lmsl.patch
tapdisk-ioemu-shutdown-fix.patch
x86_64-5Tb.patch
x86_64-note-init-p2m.patch
xen-3.4.0-testing-src.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package xen (Version 3.3.1_18546_12)
+# spec file for package xen (Version 3.4.0_19590_01)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Name: xen
ExclusiveArch: %ix86 x86_64
-%define xvers 3.3
+%define xvers 3.4
%define xvermaj 3
-%define changeset 18546
-%define xen_build_dir xen-3.3.1-testing
-%define with_kmp 1
-BuildRequires: LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel transfig
+%define changeset 19590
+%define xen_build_dir xen-3.4.0-testing
+%define with_kmp 0
+BuildRequires: LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel texinfo transfig
%if %suse_version >= 1030
BuildRequires: texlive texlive-latex
%else
@@ -37,14 +37,14 @@
%if %{?with_kmp}0
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
%endif
-Version: 3.3.1_18546_12
-Release: 2
+Version: 3.4.0_19590_01
+Release: 1
License: GPL v2 only
Group: System/Kernel
AutoReqProv: on
PreReq: %insserv_prereq %fillup_prereq
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
-Source0: xen-3.3.1-testing-src.tar.bz2
+Source0: xen-3.4.0-testing-src.tar.bz2
Source2: README.SuSE
Source3: boot.xen
Source4: boot.local.xenU
@@ -70,113 +70,24 @@
# sysconfig hook script for Xen
Source25: xen-updown.sh
# Upstream patches
-Patch0: 18406-constify-microcode.patch
-Patch1: 18412-x86-page-type-preemptible.patch
-Patch2: 18420-x86-page-type-preemptible-fix.patch
-Patch3: 18428-poll-single-port.patch
-Patch4: 18446-vtd-dom0-passthrough.patch
-Patch5: 18456-vtd-dom0-passthrough-cmdline.patch
-Patch6: 18464-cpu-hotplug.patch
-Patch7: 18468-therm-control-msr.patch
-Patch8: 18471-cpu-hotplug.patch
-Patch9: 18475-amd-microcode-update.patch
-Patch10: 18481-amd-microcode-update-fix.patch
-Patch11: 18483-intel-microcode-update.patch
-Patch12: 18484-stubdom-ioemu-makefile.patch
-Patch13: 18487-microcode-update-irq-context.patch
-Patch14: 18488-microcode-free-fix.patch
-Patch15: 18509-continue-hypercall-on-cpu.patch
-Patch16: 18519-microcode-retval.patch
-Patch17: 18520-per-CPU-GDT.patch
-Patch18: 18521-per-CPU-TSS.patch
-Patch19: 18523-per-CPU-misc.patch
-Patch20: 18528-dump-evtchn.patch
-Patch21: 18539-pirq-vector-mapping.patch
-Patch22: 18547-pirq-vector-mapping-fix.patch
-Patch23: 18573-move-pirq-logic.patch
-Patch24: 18574-msi-free-vector.patch
-Patch25: 18577-bad-assertion.patch
-Patch26: 18583-passthrough-locking.patch
-Patch27: 18584-evtchn-lock-rename.patch
-Patch28: 18620-x86-page-type-preemptible-fix.patch
-Patch29: 18637-vmx-set-dr7.patch
-Patch30: 18654-xend-vcpus.patch
-Patch31: 18656-vtd-alloc-checks.patch
-Patch32: 18661-recursive-spinlocks.patch
-Patch33: 18720-x86-dom-cleanup.patch
-Patch34: 18722-x86-fixmap-reserved.patch
-Patch35: 18723-unmap-dom-page-const.patch
-Patch36: 18724-i386-highmem-assist.patch
-Patch37: 18731-x86-dom-cleanup.patch
-Patch38: 18735-x86-dom-cleanup.patch
-Patch39: 18741-x86-dom-cleanup-no-hack.patch
-Patch40: 18742-x86-partial-page-ref.patch
-Patch41: 18745-xend-ioport-irq.patch
-Patch42: 18747-x86-partial-page-ref.patch
-Patch43: 18762-vtd-intremap-SMI-RTEs.patch
-Patch44: 18771-reduce-GDT-switching.patch
-Patch45: 18778-msi-irq-fix.patch
-Patch46: 18764-cpu-affinity.patch
-Patch47: 18780-cpu-affinity.patch
-Patch48: 18785-vlapic-lowest-prio.patch
-Patch49: 18788-vlapic-accel-dom-restore.patch
-Patch50: 18795-x86-ioapic-guest-write.patch
-Patch51: 18799-cpu-affinity.patch
-Patch52: 18805-pv-driver-build.patch
-Patch53: 18810-shadow-PAT.patch
-Patch54: 18844-shared-page-EOI.patch
-Patch55: 18852-shared-page-EOI-gmfn.patch
-Patch56: 18870-vtd-flush-per-device.patch
-Patch57: 18878-x86-cpufreq-less-verbose.patch
-Patch58: 18879-cpufreq-params.patch
-Patch59: 18880-x86-pirq-guest-bind-msg.patch
-Patch60: 18887-vtd-error-handling.patch
-Patch61: 18904-x86-local-irq.patch
-Patch62: 18905-x86-ioapic-boot-panic.patch
-Patch63: 18929-shadow-no-duplicates.patch
-Patch64: 18930-xenoprof-dunnington.patch
-Patch65: 18934-vtd-PCI-X-dev-assign.patch
-Patch66: 18937-S3-MSI.patch
-Patch67: 18943-amd-32bit-paging-limit.patch
-Patch68: 18970-vmx-print-features.patch
-Patch69: 19009-x86_64-note-init-p2m.patch
-Patch70: 19027-hvmloader-SMBIOS-dev-mem-boundary.patch
-Patch71: 19032-amd-iommu-pointer-reset.patch
-Patch72: 19035-MSI-X-proper-enable.patch
-Patch73: 19038-x86-no-apic.patch
-Patch74: 19039-x86-propagate-nolapic.patch
-Patch75: 19046-cross-bit-coredumping.patch
-Patch76: 19048-cross-bit-coredumping.patch
-Patch77: 19051-cross-bit-coredumping.patch
-Patch78: 19072-vmx-pat.patch
-Patch79: 19079-snp_ctl-1.patch
-Patch80: 19088-x86-page-non-atomic-owner.patch
-Patch81: 19089-x86_64-widen-page-refcounts.patch
-Patch82: 19103-x86_64-fold-page-lock.patch
-Patch83: 19151-xend-class-dereg.patch
-Patch84: 19152-xm-man-page.patch
-Patch85: 19153-xm-noxen-error.patch
-Patch86: 19154-snoop-control.patch
-Patch87: 19198-fix-snoop.patch
-Patch88: old-arbytes.patch
# Our patches
Patch100: xen-config.diff
Patch101: xend-config.diff
Patch102: xen-destdir.diff
Patch103: xen-rpmoptflags.diff
Patch104: xen-warnings.diff
-Patch106: xen-changeset.diff
-Patch107: xen-paths.diff
-Patch108: xen-xmexample.diff
-Patch109: xen-xmexample-vti.diff
-Patch110: xen-fixme-doc.diff
-Patch111: xen-domUloader.diff
-Patch112: xen-no-dummy-nfs-ip.diff
-Patch113: serial-split.patch
-Patch114: xen-xm-top-needs-root.diff
-Patch115: xen-tightvnc-args.diff
-Patch116: xen-max-free-mem.diff
-Patch119: xen-ioapic-ack-default.diff
+Patch105: xen-changeset.diff
+Patch106: xen-paths.diff
+Patch107: xen-xmexample.diff
+Patch108: xen-xmexample-vti.diff
+Patch109: xen-fixme-doc.diff
+Patch110: xen-domUloader.diff
+Patch111: xen-no-dummy-nfs-ip.diff
+Patch112: serial-split.patch
+Patch113: xen-xm-top-needs-root.diff
+Patch114: xen-tightvnc-args.diff
+Patch115: xen-max-free-mem.diff
+Patch116: xen-ioapic-ack-default.diff
Patch120: block-losetup-retry.diff
Patch121: block-flags.diff
Patch122: xen-hvm-default-bridge.diff
@@ -189,7 +100,6 @@
Patch134: xen-disable-qemu-monitor.diff
Patch135: supported_module.diff
Patch136: qemu-security-etch1.diff
-Patch137: rpmlint.diff
Patch140: cdrom-removable.patch
Patch150: bridge-opensuse.patch
Patch151: bridge-vlan.diff
@@ -198,8 +108,8 @@
Patch154: bridge-record-creation.patch
Patch155: xend-core-dump-loc.diff
Patch156: blktap.patch
-Patch157: xen-api-auth.patch
-Patch158: xen-qemu-iscsi-fix.patch
+Patch157: xen-qemu-iscsi-fix.patch
+Patch158: xen-api-auth.patch
Patch159: tools-gdbserver-build.diff
Patch160: network-route.patch
# Needs to go upstream sometime, when python 2.6 is widespread
@@ -208,51 +118,52 @@
Patch163: ioemu-vnc-resize.patch
# Needs to go upstream
Patch164: checkpoint-rename.patch
-Patch165: reenable-block-protocols.patch
-Patch166: network-nat.patch
-Patch167: ioemu-debuginfo.patch
+Patch165: network-nat.patch
+Patch166: ioemu-debuginfo.patch
# Patches for snapshot support
-Patch170: qemu-img-snapshot.patch
-Patch171: ioemu-blktap-fix-open.patch
-Patch172: snapshot-ioemu-save.patch
-Patch173: snapshot-ioemu-restore.patch
-Patch174: snapshot-ioemu-delete.patch
-Patch175: snapshot-xend.patch
-Patch180: ioemu-qcow2-multiblock-aio.patch
-Patch181: ioemu-blktap-image-format.patch
-Patch182: build-tapdisk-ioemu.patch
-Patch183: blktapctrl-default-to-ioemu.patch
-Patch184: ioemu-blktap-barriers.patch
-Patch185: tapdisk-ioemu-logfile.patch
-Patch186: blktap-ioemu-close-fix.patch
-Patch187: ioemu-blktap-zero-size.patch
-Patch188: blktap-error-handling.patch
-Patch189: ioemu-blktap-fv-init.patch
-Patch190: ioemu-vpc-4gb-fix.patch
-Patch191: qemu-dm-segfault.patch
+Patch200: snapshot-ioemu-save.patch
+Patch201: snapshot-ioemu-restore.patch
+Patch202: snapshot-ioemu-delete.patch
+Patch203: snapshot-xend.patch
+# ioemu part of blktap patch series
+Patch210: ioemu-blktap-fv-init.patch
+Patch211: ioemu-blktap-image-format.patch
+Patch212: build-tapdisk-ioemu.patch
+Patch213: tapdisk-ioemu-logfile.patch
+Patch214: ioemu-blktap-zero-size.patch
+Patch215: tapdisk-ioemu-shutdown-fix.patch
+# More random patches
+Patch220: qemu-dm-segfault.patch
+Patch221: blktapctrl-default-to-ioemu.patch
+Patch222: ioemu-blktap-barriers.patch
# Jim's domain lock patch
-Patch200: xend-domain-lock.patch
+Patch300: xend-domain-lock.patch
# Patches from Jan
-Patch240: dump-exec-state.patch
-Patch241: x86-show-page-walk-early.patch
-Patch242: x86-extra-trap-info.patch
-Patch243: x86-alloc-cpu-structs.patch
-Patch244: 32on64-extra-mem.patch
-Patch245: msi-enable.patch
-# PV Driver Patches
-Patch350: pv-driver-build.patch
-Patch351: xen-ioemu-hvm-pv-support.diff
-Patch352: pvdrv_emulation_control.patch
-Patch353: blktap-pv-cdrom.patch
-Patch354: x86-cpufreq-report.patch
-Patch355: dom-print.patch
-Patch356: x86_64-sh-next-shadow.patch
-Patch357: x86_64-page-info-pack.patch
-Patch358: disable_emulated_device.diff
+Patch340: x86_64-note-init-p2m.patch
+Patch341: x86-cpufreq-report.patch
+Patch342: dump-exec-state.patch
+Patch343: dom-print.patch
+Patch344: pv-driver-build.patch
+Patch345: x86-show-page-walk-early.patch
+Patch346: x86-extra-trap-info.patch
+Patch347: svm-lmsl.patch
+Patch348: x86_64-5Tb.patch
+# Other patches
+Patch400: x86-alloc-cpu-structs.patch
+Patch401: 32on64-extra-mem.patch
+Patch402: msi-enable.patch
+Patch403: xen-ioemu-hvm-pv-support.diff
+Patch404: pvdrv_emulation_control.patch
+Patch405: blktap-pv-cdrom.patch
+Patch406: network-nat-open-SuSEfirewall2-FORWARD.patch
+Patch407: ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch
+%if %{?with_kmp}0
+Patch450: disable_emulated_device.diff
+%endif
# novell_shim patches
-Patch400: hv_tools.patch
-Patch401: hv_xen_base.patch
-Patch402: hv_xen_extension.patch
+Patch500: hv_tools.patch
+Patch501: hv_xen_base.patch
+Patch502: hv_xen_extension.patch
Patch999: tmp_build.patch
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -585,100 +496,12 @@
%prep
%setup -q -n %xen_build_dir
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-%patch25 -p1
-%patch26 -p1
-%patch27 -p1
-%patch28 -p1
-%patch29 -p1
-%patch30 -p1
-%patch31 -p1
-%patch32 -p1
-%patch33 -p1
-%patch34 -p1
-%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
-%patch43 -p1
-%patch44 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
-%patch50 -p1
-%patch51 -p1
-%patch52 -p1
-%patch53 -p1
-%patch54 -p1
-%patch55 -p1
-%patch56 -p1
-%patch57 -p1
-%patch58 -p1
-%patch59 -p1
-%patch60 -p1
-%patch61 -p1
-%patch62 -p1
-%patch63 -p1
-%patch64 -p1
-%patch65 -p1
-%patch66 -p1
-%patch67 -p1
-%patch68 -p1
-%patch69 -p1
-%patch70 -p1
-%patch71 -p1
-%patch72 -p1
-%patch73 -p1
-%patch74 -p1
-%patch75 -p1
-%patch76 -p1
-%patch77 -p1
-%patch78 -p1
-%patch79 -p1
-%patch80 -p1
-%patch81 -p1
-%patch82 -p1
-%patch83 -p1
-%patch84 -p1
-%patch85 -p1
-%patch86 -p1
-%patch87 -p1
-%patch88 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
+%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
@@ -687,10 +510,9 @@
%patch111 -p1
%patch112 -p1
%patch113 -p1
-%patch114 -p1
+#%patch114 -p1 - vnc patch, may no longer be applicable.
%patch115 -p1
%patch116 -p1
-%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
@@ -703,12 +525,11 @@
%patch134 -p1
%patch135 -p1
%patch136 -p1
-%patch137 -p1
%patch140 -p1
%patch150 -p1
%patch151 -p1
%patch152 -p1
-#%patch153 -p1 hostonly
+#%patch153 -p1 - hostonly
%patch154 -p1
%patch155 -p1
%patch156 -p1
@@ -722,45 +543,44 @@
%patch164 -p1
%patch165 -p1
%patch166 -p1
-%patch167 -p1
-%patch170 -p1
-%patch171 -p1
-%patch172 -p1
-%patch173 -p1
-%patch174 -p1
-%patch175 -p1
-%patch180 -p1
-%patch181 -p1
-%patch182 -p1
-%patch183 -p1
-%patch184 -p1
-%patch185 -p1
-%patch186 -p1
-%patch187 -p1
-%patch188 -p1
-%patch189 -p1
-%patch190 -p1
-%patch191 -p1
%patch200 -p1
-%patch240 -p1
-%patch241 -p1
-%patch242 -p1
-%patch243 -p1
-%patch244 -p1
-%patch245 -p1
-%patch350 -p1
-%patch351 -p1
-%patch352 -p1
-%patch353 -p1
-%patch354 -p1
-%patch355 -p1
-%patch356 -p1
-%patch357 -p1
-%patch358 -p1
-%ifarch x86_64
-%patch400 -p1
+%patch201 -p1
+%patch202 -p1
+%patch203 -p1
+%patch210 -p1
+%patch211 -p1
+%patch212 -p1
+%patch213 -p1
+%patch214 -p1
+%patch215 -p1
+%patch220 -p1
+%patch221 -p1
+%patch222 -p1
+%patch300 -p1
+#%patch340 -p1 - Port Later if needed
+%patch341 -p1
+%patch342 -p1
+%patch343 -p1
+%patch344 -p1
+%patch345 -p1
+%patch346 -p1
+%patch347 -p1
+%patch348 -p1
+#%patch400 -p1 - Major Port or not needed
%patch401 -p1
-%patch402 -p1
+#%patch402 -p1 - Needed?
+%patch403 -p1
+%patch404 -p1
+%patch405 -p1
+%patch406 -p1
+%patch407 -p1
+%if %{?with_kmp}0
+%patch450 -p1
+%endif
+%ifarch x86_64
+%patch500 -p1
+%patch501 -p1
+%patch502 -p1
%endif
%patch999 -p1
@@ -884,6 +704,7 @@
# scripts
rm -f $RPM_BUILD_ROOT/etc/xen/scripts/block-*nbd
install -m755 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE16 %SOURCE17 $RPM_BUILD_ROOT/etc/xen/scripts/
+ln -s /etc/xen/scripts/xen-monitor $RPM_BUILD_ROOT/etc/xen/scripts/set-lock
# Xen API remote authentication files
install -d $RPM_BUILD_ROOT/etc/pam.d
install -m644 %SOURCE23 $RPM_BUILD_ROOT/etc/pam.d/xen-api
@@ -914,6 +735,7 @@
# udev support
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
mv $RPM_BUILD_ROOT/etc/udev/rules.d/xen-backend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xen.rules
+mv $RPM_BUILD_ROOT/etc/udev/rules.d/xend.rules $RPM_BUILD_ROOT/etc/udev/rules.d/40-xend.rules
#%find_lang xen-vm # po files are misnamed upstream
# Clean up unpackaged files
rm -rf $RPM_BUILD_ROOT/%{_datadir}/doc/xen/qemu/
@@ -922,10 +744,12 @@
rm -rf $RPM_BUILD_ROOT/usr/share/xen/man/man1/qemu/qemu*
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc32
rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-sparc64
+rm -f $RPM_BUILD_ROOT/usr/share/xen/qemu/openbios-ppc
rm -f $RPM_BUILD_ROOT/usr/sbin/netfix
rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
rm -rf $RPM_BUILD_ROOT/html
rm -rf $RPM_BUILD_ROOT/usr/share/doc/xen/README.*
+rm -f $RPM_BUILD_ROOT/usr/share/doc/xen/create.dtd
rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
%files
@@ -959,6 +783,7 @@
/usr/bin/xentrace*
/usr/bin/pygrub
/usr/bin/qemu-img-xen
+/usr/bin/qemu-nbd-xen
/usr/bin/tapdisk-ioemu
/usr/bin/gdbserver-xen
/usr/sbin/blktapctrl
@@ -980,7 +805,7 @@
%dir /usr/lib/xen/bin
%endif
%dir /usr/lib/xen/boot
-%{_datadir}/xen/*.dtd
+#%{_datadir}/xen/*.dtd
%{_libdir}/xen/bin/readnotes
%{_libdir}/xen/bin/xc_restore
%{_libdir}/xen/bin/xc_save
@@ -1022,6 +847,7 @@
%dir /etc/udev
%dir /etc/udev/rules.d
/etc/udev/rules.d/40-xen.rules
+/etc/udev/rules.d/40-xend.rules
/etc/sysconfig/network/scripts/xen-updown.sh
/etc/sysconfig/network/if-up.d/xen
/etc/sysconfig/network/if-down.d/xen
@@ -1037,10 +863,12 @@
%dir %{_datadir}/xen
%dir %{_datadir}/xen/man
%dir %{_datadir}/xen/man/man1
+%dir %{_datadir}/xen/man/man8
%dir %{_datadir}/xen/qemu
%dir %{_datadir}/xen/qemu/keymaps
%{_datadir}/xen/qemu/*
%{_datadir}/xen/man/man1/*
+%{_datadir}/xen/man/man8/*
%{_libdir}/xen/bin/qemu-dm
%ifarch x86_64
/usr/lib/xen/bin/qemu-dm
++++++ 32on64-extra-mem.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2273,7 +2273,7 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2559,7 +2559,7 @@ class XendDomainInfo:
vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
# Make sure there's enough RAM available for the domain
-- balloon.free(memory + shadow + vtd_mem)
-+ balloon.free(memory + shadow + vtd_mem + 512)
+- balloon.free(memory + shadow + vtd_mem, self)
++ balloon.free(memory + shadow + vtd_mem + 512, self)
# Set up the shadow memory
shadow_cur = xc.shadow_mem_control(self.domid, shadow / 1024)
++++++ blktapctrl-default-to-ioemu.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,211 +1,49 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/blktapctrl.c
-+++ xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
-@@ -65,6 +65,8 @@
- #define MAX_RAND_VAL 0xFFFF
- #define MAX_ATTEMPTS 10
-
-+#undef ALWAYS_USE_IOEMU
-+
- int run = 1;
- int max_timeout = MAX_TIMEOUT;
- int ctlfd = 0;
-@@ -148,7 +150,8 @@ static int get_tapdisk_pid(blkif_t *blki
- * return 0 on success, -1 on error.
- */
-
--static int test_path(char *path, char **dev, int *type, blkif_t **blkif)
-+static int test_path(char *path, char **dev, int *type, blkif_t **blkif,
-+ int* use_ioemu)
- {
- char *ptr, handle[10];
- int i, size, found = 0;
-@@ -174,6 +177,7 @@ static int test_path(char *path, char **
- }
-
- if (found) {
-+ *use_ioemu = dtypes[i]->use_ioemu;
- *type = dtypes[i]->idnum;
-
- if (dtypes[i]->single_handler == 1) {
-@@ -185,6 +189,7 @@ static int test_path(char *path, char **
- *blkif = active_disks[dtypes[i]
- ->idnum]->blkif;
- }
-+
- return 0;
- }
- }
-@@ -474,6 +479,7 @@ static int launch_tapdisk_provider(char
- return child;
- }
-
-+#ifndef ALWAYS_USE_IOEMU
- static int launch_tapdisk(char *wrctldev, char *rdctldev)
- {
- char *argv[] = { "tapdisk", wrctldev, rdctldev, NULL };
-@@ -483,6 +489,7 @@ static int launch_tapdisk(char *wrctldev
-
- return 0;
- }
-+#endif
-
- static int launch_tapdisk_ioemu(void)
- {
-@@ -505,7 +512,8 @@ static int connect_qemu(blkif_t *blkif,
- static int tapdisk_ioemu_pid = 0;
- static int dom0_readfd = 0;
- static int dom0_writefd = 0;
--
-+ int refresh_pid = 0;
-+
- if (asprintf(&rdctldev, BLKTAP_CTRL_DIR "/qemu-read-%d", domid) < 0)
- return -1;
-
-@@ -524,15 +532,23 @@ static int connect_qemu(blkif_t *blkif,
- if (tapdisk_ioemu_pid == 0 || kill(tapdisk_ioemu_pid, 0)) {
- /* No device model and tapdisk-ioemu doesn't run yet */
- DPRINTF("Launching tapdisk-ioemu\n");
-- tapdisk_ioemu_pid = launch_tapdisk_ioemu();
-+ launch_tapdisk_ioemu();
-
- dom0_readfd = open_ctrl_socket(wrctldev);
- dom0_writefd = open_ctrl_socket(rdctldev);
-+
-+ refresh_pid = 1;
- }
-
- DPRINTF("Using tapdisk-ioemu connection\n");
- blkif->fds[READ] = dom0_readfd;
- blkif->fds[WRITE] = dom0_writefd;
-+
-+ if (refresh_pid) {
-+ get_tapdisk_pid(blkif);
-+ tapdisk_ioemu_pid = blkif->tappid;
-+ }
-+
- } else if (access(rdctldev, R_OK | W_OK) == 0) {
- /* Use existing pipe to the device model */
- DPRINTF("Using qemu-dm connection\n");
-@@ -554,6 +570,7 @@ static int connect_qemu(blkif_t *blkif,
- return 0;
- }
-
-+#ifndef ALWAYS_USE_IOEMU
- /* Launch tapdisk instance */
- static int connect_tapdisk(blkif_t *blkif, int minor)
- {
-@@ -597,6 +614,7 @@ fail:
-
- return ret;
- }
-+#endif
-
- static int blktapctrl_new_blkif(blkif_t *blkif)
- {
-@@ -606,13 +624,14 @@ static int blktapctrl_new_blkif(blkif_t
- image_t *image;
- blkif_t *exist = NULL;
- static uint16_t next_cookie = 0;
-+ int use_ioemu;
-
- DPRINTF("Received a poll for a new vbd\n");
- if ( ((blk=blkif->info) != NULL) && (blk->params != NULL) ) {
- if (blktap_interface_create(ctlfd, &major, &minor, blkif) < 0)
- return -1;
-
-- if (test_path(blk->params, &ptr, &type, &exist) != 0) {
-+ if (test_path(blk->params, &ptr, &type, &exist, &use_ioemu) != 0) {
- DPRINTF("Error in blktap device string(%s).\n",
- blk->params);
- goto fail;
-@@ -621,13 +640,18 @@ static int blktapctrl_new_blkif(blkif_t
- blkif->cookie = next_cookie++;
-
- if (!exist) {
-- if (type == DISK_TYPE_IOEMU) {
-+#ifdef ALWAYS_USE_IOEMU
-+ if (connect_qemu(blkif, blkif->domid))
-+ goto fail;
-+#else
-+ if (use_ioemu) {
- if (connect_qemu(blkif, blkif->domid))
- goto fail;
- } else {
- if (connect_tapdisk(blkif, minor))
- goto fail;
- }
-+#endif
-
- } else {
- DPRINTF("Process exists!\n");
-Index: xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/tapdisk.h
-+++ xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-@@ -145,6 +145,8 @@ typedef struct disk_info {
- char handle[10]; /* xend handle, e.g. 'ram' */
- int single_handler; /* is there a single controller for all */
- /* instances of disk type? */
-+ int use_ioemu; /* backend provider: 0 = tapdisk; 1 = ioemu */
-+
- #ifdef TAPDISK
- struct tap_disk *drv;
- #endif
-@@ -166,6 +168,7 @@ static disk_info_t aio_disk = {
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.h
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
+@@ -168,7 +168,7 @@ static disk_info_t aio_disk = {
"raw image (aio)",
"aio",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_aio,
#endif
-@@ -176,6 +179,7 @@ static disk_info_t sync_disk = {
+@@ -179,7 +179,7 @@ static disk_info_t sync_disk = {
"raw image (sync)",
"sync",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_sync,
#endif
-@@ -186,6 +190,7 @@ static disk_info_t vmdk_disk = {
+@@ -190,7 +190,7 @@ static disk_info_t vmdk_disk = {
"vmware image (vmdk)",
"vmdk",
1,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_vmdk,
#endif
-@@ -196,6 +201,7 @@ static disk_info_t ram_disk = {
- "ramdisk image (ram)",
- "ram",
- 1,
-+ 0,
- #ifdef TAPDISK
- &tapdisk_ram,
- #endif
-@@ -206,6 +212,7 @@ static disk_info_t qcow_disk = {
+@@ -212,7 +212,7 @@ static disk_info_t qcow_disk = {
"qcow disk (qcow)",
"qcow",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_qcow,
#endif
-@@ -216,6 +223,7 @@ static disk_info_t qcow2_disk = {
+@@ -223,7 +223,7 @@ static disk_info_t qcow2_disk = {
"qcow2 disk (qcow2)",
"qcow2",
0,
+- 0,
+ 1,
#ifdef TAPDISK
&tapdisk_qcow2,
#endif
-@@ -226,6 +234,7 @@ static disk_info_t ioemu_disk = {
- "ioemu disk",
- "ioemu",
- 1,
-+ 1,
- #ifdef TAPDISK
- NULL
- #endif
++++++ blktap.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,11 +1,11 @@
bug #239173
bug #242953
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2618,7 +2618,7 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2939,7 +2939,7 @@ class XendDomainInfo:
(fn, BOOTLOADER_LOOPBACK_DEVICE))
vbd = {
@@ -14,26 +14,26 @@
'device': BOOTLOADER_LOOPBACK_DEVICE,
}
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -151,9 +151,9 @@ void xenstore_parse_domain_config(int hv
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -311,9 +311,9 @@ void xenstore_parse_domain_config(int hv
{
- char **e = NULL;
- char *buf = NULL, *path;
+ char **e_danger = NULL;
+ char *buf = NULL;
- char *fpath = NULL, *bpath = NULL,
+ char *fpath = NULL, *bpath = NULL, *btype = NULL,
- *dev = NULL, *params = NULL, *type = NULL, *drv = NULL;
+ *dev = NULL, *params = NULL, *drv = NULL;
- int i, any_hdN = 0, ret;
+ int i, any_hdN = 0, ret, is_tap;
unsigned int len, num, hd_index, pci_devid = 0;
BlockDriverState *bs;
BlockDriver *format;
-@@ -188,6 +188,14 @@ void xenstore_parse_domain_config(int hv
- bpath = xs_read(xsh, XBT_NULL, buf, &len);
+@@ -353,6 +353,14 @@ void xenstore_parse_domain_config(int hv
+ e_danger[i]);
if (bpath == NULL)
- continue;
+ continue;
+ /* check to see if type is tap or not */
+ if (pasprintf(&buf, "%s/type", bpath) == -1)
+ continue;
@@ -45,11 +45,11 @@
/* read the name of the device */
if (pasprintf(&buf, "%s/dev", bpath) == -1)
continue;
-@@ -432,6 +440,7 @@ void xenstore_parse_domain_config(int hv
- free(type);
+@@ -662,6 +670,7 @@ void xenstore_parse_domain_config(int hv
+ free(danger_type);
free(params);
free(dev);
+ free(btype);
free(bpath);
free(buf);
- free(path);
+ free(danger_buf);
++++++ blktap-pv-cdrom.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,5 +1,7 @@
+Index: xen-3.4.0-testing/tools/blktap/drivers/block-cdrom.c
+===================================================================
--- /dev/null
-+++ b/tools/blktap/drivers/block-cdrom.c
++++ xen-3.4.0-testing/tools/blktap/drivers/block-cdrom.c
@@ -0,0 +1,536 @@
+/* block-cdrom.c
+ *
@@ -537,8 +539,10 @@
+ .td_get_parent_id = tdcdrom_get_parent_id,
+ .td_validate_parent = tdcdrom_validate_parent
+};
+Index: xen-3.4.0-testing/xen/include/public/io/cdromif.h
+===================================================================
--- /dev/null
-+++ b/xen/include/public/io/cdromif.h
++++ xen-3.4.0-testing/xen/include/public/io/cdromif.h
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * cdromif.h
@@ -660,10 +664,12 @@
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
+
+#endif
---- a/tools/blktap/drivers/Makefile
-+++ b/tools/blktap/drivers/Makefile
-@@ -24,8 +24,9 @@ CRYPT_LIB := -lcrypto
- $(warning *** libgcrypt not installed: falling back to libcrypto ***)
+Index: xen-3.4.0-testing/tools/blktap/drivers/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/Makefile
++++ xen-3.4.0-testing/tools/blktap/drivers/Makefile
+@@ -20,8 +20,9 @@ CRYPT_LIB := -lcrypto
+ $(warning === libgcrypt not installed: falling back to libcrypto ===)
endif
-LDFLAGS_blktapctrl := $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenstore) -L../lib -lblktap
@@ -674,7 +680,7 @@
BLK-OBJS-y := block-aio.o
BLK-OBJS-y += block-sync.o
-@@ -33,6 +34,7 @@ BLK-OBJS-y += block-vmdk.o
+@@ -29,6 +30,7 @@ BLK-OBJS-y += block-vmdk.o
BLK-OBJS-y += block-ram.o
BLK-OBJS-y += block-qcow.o
BLK-OBJS-y += block-qcow2.o
@@ -682,8 +688,10 @@
BLK-OBJS-y += aes.o
BLK-OBJS-y += tapaio.o
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
---- a/tools/blktap/drivers/tapdisk.h
-+++ b/tools/blktap/drivers/tapdisk.h
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.h
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.h
@@ -137,6 +137,9 @@ struct tap_disk {
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
int (*td_validate_parent)(struct disk_driver *dd,
@@ -702,7 +710,7 @@
/*Define Individual Disk Parameters here */
-@@ -240,6 +244,17 @@ static disk_info_t ioemu_disk = {
+@@ -229,6 +233,17 @@ static disk_info_t qcow2_disk = {
#endif
};
@@ -720,26 +728,30 @@
/*Main disk info array */
static disk_info_t *dtypes[] = {
&aio_disk,
-@@ -249,6 +264,7 @@ static disk_info_t *dtypes[] = {
+@@ -237,6 +252,7 @@ static disk_info_t *dtypes[] = {
+ &ram_disk,
&qcow_disk,
&qcow2_disk,
- &ioemu_disk,
+ &cdrom_disk,
};
typedef struct driver_list_entry {
---- a/tools/blktap/lib/blktaplib.h
-+++ b/tools/blktap/lib/blktaplib.h
-@@ -221,6 +221,7 @@ typedef struct msg_pid {
+Index: xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/lib/blktaplib.h
++++ xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
+@@ -220,6 +220,7 @@ typedef struct msg_pid {
+ #define DISK_TYPE_RAM 3
#define DISK_TYPE_QCOW 4
#define DISK_TYPE_QCOW2 5
- #define DISK_TYPE_IOEMU 6
-+#define DISK_TYPE_CDROM 7
++#define DISK_TYPE_CDROM 6
/* xenstore/xenbus: */
#define DOMNAME "Domain-0"
---- a/xen/include/public/io/blkif.h
-+++ b/xen/include/public/io/blkif.h
+Index: xen-3.4.0-testing/xen/include/public/io/blkif.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/public/io/blkif.h
++++ xen-3.4.0-testing/xen/include/public/io/blkif.h
@@ -76,6 +76,10 @@
* "feature-flush-cache" node!
*/
@@ -751,8 +763,10 @@
/*
* Maximum scatter/gather segments per request.
---- a/tools/blktap/drivers/tapdisk.c
-+++ b/tools/blktap/drivers/tapdisk.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/tapdisk.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/tapdisk.c
++++ xen-3.4.0-testing/tools/blktap/drivers/tapdisk.c
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
goto out;
}
@@ -776,16 +790,15 @@
default:
DPRINTF("Unknown block operation\n");
break;
---- a/tools/python/xen/xend/server/BlktapController.py
-+++ b/tools/python/xen/xend/server/BlktapController.py
-@@ -14,8 +14,8 @@ blktap_disk_types = [
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/BlktapController.py
+===================================================================
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/BlktapController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/BlktapController.py
+@@ -14,6 +14,7 @@ blktap_disk_types = [
'ram',
'qcow',
'qcow2',
--
-- 'ioemu'
-+ 'ioemu',
+ 'cdrom',
- ]
- class BlktapController(BlkifController):
+ 'ioemu',
+ 'tapdisk',
++++++ block-flags.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/block
+Index: xen-3.4.0-testing/tools/hotplug/Linux/block
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/block
-+++ xen-3.3.1-testing/tools/examples/block
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/block
++++ xen-3.4.0-testing/tools/hotplug/Linux/block
@@ -225,11 +225,14 @@ case "$command" in
;;
++++++ block-iscsi ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -23,8 +23,7 @@
unset dev
for session in /sys/class/iscsi_session/session*; do
if [ "$1" = "`cat $session/targetname`" ]; then
- dev=`readlink $session/device/target*/*:0:*/block*`
- dev=${dev##*/}
+ dev=`basename $session/device/target*/*:0:*/block*/*`
return
fi
done
@@ -34,8 +33,7 @@
{
unset tgt
for session in /sys/class/iscsi_session/session*; do
- dev=`readlink $session/device/target*/*:0:*/block*`
- dev=${dev##*/}
+ dev=`basename $session/device/target*/*:0:*/block*/*`
if [ "$dev" = "$1" ]; then
tgt=`cat $session/targetname`
return
++++++ block-losetup-retry.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:22.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:22.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/block
+Index: xen-3.4.0-testing/tools/hotplug/Linux/block
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/block
-+++ xen-3.3.1-testing/tools/examples/block
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/block
++++ xen-3.4.0-testing/tools/hotplug/Linux/block
@@ -241,107 +241,111 @@ case "$command" in
mount it read-write in a guest domain."
fi
++++++ bridge-bonding.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -241,6 +241,9 @@ op_start () {
return
fi
@@ -12,14 +12,19 @@
vlans=$(find_active_vlans "${netdev}")
for vlan in $vlans ; do ifdown $vlan ; done
-@@ -254,13 +257,27 @@ op_start () {
+@@ -258,18 +261,32 @@ op_start () {
ip link set ${netdev} down
ip addr flush ${netdev}
fi
- ip link set ${netdev} name ${pdev}
- ip link set ${tdev} name ${bridge}
-
+-
- setup_bridge_port ${pdev}
+
+- # Restore slaves
+- if [ -n "${slaves}" ]; then
+- ip link set ${pdev} up
+- ifenslave ${pdev} ${slaves}
+ if [ "x${bonded}" = "xyes" ]
+ then
+ ip link set ${tdev} name ${bridge}
@@ -36,12 +41,17 @@
+ ip link set ${tdev} name ${bridge}
+
+ setup_bridge_port ${pdev}
-
-- add_to_bridge2 ${bridge} ${pdev}
-- do_ifup ${bridge}
++
++ # Restore slaves
++ if [ -n "${slaves}" ]; then
++ ip link set ${pdev} up
++ ifenslave ${pdev} ${slaves}
++ fi
+ add_to_bridge2 ${bridge} ${pdev}
+ do_ifup ${bridge}
-+ fi
+ fi
+- add_to_bridge2 ${bridge} ${pdev}
+- do_ifup ${bridge}
for vlan in $vlans ; do ifup $vlan ; done
++++++ bridge-hostonly.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -22,11 +22,11 @@
tools/examples/network-bridge | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
-Index: xen-3.2.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.2.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.2.1-testing/tools/examples/network-bridge
-@@ -305,6 +305,31 @@ op_stop () {
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
+@@ -316,6 +316,31 @@ op_stop () {
for vlan in $vlans ; do ifup $vlan ; done
}
@@ -58,7 +58,7 @@
# adds $dev to $bridge but waits for $dev to be in running state first
add_to_bridge2() {
local bridge=$1
-@@ -330,11 +355,19 @@ add_to_bridge2() {
+@@ -341,11 +366,19 @@ add_to_bridge2() {
case "$command" in
start)
++++++ bridge-opensuse.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
-@@ -253,18 +253,18 @@ op_stop () {
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
+@@ -262,18 +262,18 @@ op_stop () {
transfer_addrs ${bridge} ${pdev}
if ! ifdown ${bridge}; then
get_ip_info ${bridge}
++++++ bridge-record-creation.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -249,6 +249,11 @@ op_start () {
create_bridge ${tdev}
@@ -13,8 +13,8 @@
+
preiftransfer ${netdev}
transfer_addrs ${netdev} ${tdev}
- if ! ifdown ${netdev}; then
-@@ -313,6 +318,13 @@ op_stop () {
+ # Remember slaves for bonding interface.
+@@ -322,6 +327,13 @@ op_stop () {
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
++++++ bridge-vlan.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-bridge
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-bridge
-+++ xen-3.3.1-testing/tools/examples/network-bridge
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-bridge
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-bridge
@@ -191,6 +191,28 @@ antispoofing () {
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
}
@@ -41,7 +41,7 @@
create_bridge ${tdev}
preiftransfer ${netdev}
-@@ -237,6 +262,8 @@ op_start () {
+@@ -246,6 +271,8 @@ op_start () {
add_to_bridge2 ${bridge} ${pdev}
do_ifup ${bridge}
@@ -50,7 +50,7 @@
if [ ${antispoof} = 'yes' ] ; then
antispoofing
fi
-@@ -250,6 +277,9 @@ op_stop () {
+@@ -259,6 +286,9 @@ op_stop () {
return
fi
@@ -60,7 +60,7 @@
transfer_addrs ${bridge} ${pdev}
if ! ifdown ${bridge}; then
get_ip_info ${bridge}
-@@ -265,6 +295,8 @@ op_stop () {
+@@ -274,6 +304,8 @@ op_stop () {
ip link set ${pdev} down
ip link set ${pdev} name ${netdev}
do_ifup ${netdev}
++++++ build-tapdisk-ioemu.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,10 +1,27 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile
+From f1ebeae7802a5775422004f62630c42e46dcf664 Mon Sep 17 00:00:00 2001
+From: Kevin Wolf
+Date: Tue, 10 Mar 2009 16:32:40 +0100
+Subject: [PATCH 3/6] ioemu: Build tapdisk-ioemu binary
+
+When changing away from the old ioemu, changes in the Makefiles
+resulted in tapdisk-ioemu appearing there, but actually not
+being built. This patch re-enables the build of tapdisk-ioemu.
+
+Signed-off-by: Kevin Wolf
+---
+ Makefile | 22 +++++++++++++++-------
+ configure | 2 +-
+ qemu-tool.c | 2 +-
+ tapdisk-ioemu.c | 17 -----------------
+ 4 files changed, 17 insertions(+), 26 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile
-@@ -31,13 +31,6 @@ subdir-%: libqemu_common.a
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile
+@@ -46,13 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem
- recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
+ recurse-all: $(SUBDIR_RULES)
-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
-tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
@@ -16,9 +33,9 @@
#######################################################################
# BLOCK_OBJS is code used by both qemu system emulation and qemu-img
-@@ -46,6 +39,21 @@ BLOCK_OBJS+=block-cow.o block-qcow.o aes
- BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o
- BLOCK_OBJS+=block-qcow2.o block-parallels.o
+@@ -71,6 +64,21 @@ endif
+ BLOCK_OBJS += block-raw-posix.o
+ endif
+#######################################################################
+# tapdisk-ioemu
@@ -32,22 +49,91 @@
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
+tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
-+tapdisk-ioemu: tapdisk-ioemu.o $(BLOCK_OBJS) qemu-img-block.o qemu-img-block-raw-posix.o hw/tapdisk-xen_blktap.o
++tapdisk-ioemu: tapdisk-ioemu.o $(BLOCK_OBJS) qemu-tool.o hw/tapdisk-xen_blktap.o
+ $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
+
######################################################################
# libqemu_common.a: Target independent part of system emulation. The
# long term path is to suppress *all* target specific code in case of
-Index: xen-3.3.1-testing/tools/ioemu-remote/configure
+Index: xen-3.4.0-testing/tools/ioemu-remote/configure
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/configure
-+++ xen-3.3.1-testing/tools/ioemu-remote/configure
-@@ -1150,7 +1150,7 @@ fi
-
- echo "#define CONFIG_UNAME_RELEASE \"$uname_release\"" >> $config_h
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/configure
++++ xen-3.4.0-testing/tools/ioemu-remote/configure
+@@ -1508,7 +1508,7 @@ bsd)
+ ;;
+ esac
-tools=
+tools="tapdisk-ioemu"
if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
tools="qemu-img\$(EXESUF) $tools"
- fi
+ if [ "$linux" = "yes" ] ; then
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-tool.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-tool.c
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-tool.c
+@@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh)
+ qemu_free(bh);
+ }
+
+-int qemu_set_fd_handler2(int fd,
++int __attribute__((weak)) qemu_set_fd_handler2(int fd,
+ IOCanRWHandler *fd_read_poll,
+ IOHandler *fd_read,
+ IOHandler *fd_write,
+Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
++++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+@@ -12,34 +12,12 @@
+
+ extern void qemu_aio_init(void);
+ extern void qemu_aio_poll(void);
+-extern void bdrv_init(void);
+-
+-extern void *qemu_mallocz(size_t size);
+-extern void qemu_free(void *ptr);
+
+ extern void *fd_start;
+
+ int domid = 0;
+ FILE* logfile;
+
+-void term_printf(const char *fmt, ...)
+-{
+- va_list ap;
+- va_start(ap, fmt);
+- vprintf(fmt, ap);
+- va_end(ap);
+-}
+-
+-void term_print_filename(const char *filename)
+-{
+- term_printf(filename);
+-}
+-
+-
+-typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
+-typedef int IOCanRWHandler(void *opaque);
+-typedef void IOHandler(void *opaque);
+-
+ typedef struct IOHandlerRecord {
+ int fd;
+ IOCanRWHandler *fd_read_poll;
+@@ -103,7 +81,6 @@ int main(void)
+ logfile = stderr;
+
+ bdrv_init();
+- qemu_aio_init();
+ init_blktap();
+
+ /* Daemonize */
+@@ -115,8 +92,6 @@ int main(void)
+ * completed aio operations.
+ */
+ while (1) {
+- qemu_aio_poll();
+-
+ max_fd = -1;
+ FD_ZERO(&rfds);
+ for(ioh = first_io_handler; ioh != NULL; ioh = ioh->next)
++++++ cdrom-removable.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/HalDaemon.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/HalDaemon.py
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/HalDaemon.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/HalDaemon.py
@@ -0,0 +1,243 @@
+#!/usr/bin/env python
+# -*- mode: python; -*-
@@ -246,10 +246,10 @@
+ print 'Falling off end'
+
+
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/Hald.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/Hald.py
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/Hald.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/Hald.py
@@ -0,0 +1,125 @@
+#============================================================================
+# This library is free software; you can redistribute it and/or
@@ -376,10 +376,10 @@
+ watcher.run()
+ time.sleep(10)
+ watcher.shutdown()
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvServer.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvServer.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvServer.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvServer.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvServer.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvServer.py
@@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir
from SrvRoot import SrvRoot
@@ -397,12 +397,12 @@
def create():
root = SrvDir()
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -333,6 +333,19 @@ void xenstore_parse_domain_config(int hv
- if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -503,6 +503,19 @@ void xenstore_parse_domain_config(int hv
+ if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0)
fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0");
}
+ /* if cdrom pyhsical put a watch on media-present */
@@ -420,8 +420,8 @@
+ }
drives_table[nb_drives].bdrv = bs;
- nb_drives++;
-@@ -631,6 +644,50 @@ void xenstore_record_dm_state(char *stat
+ drives_table[nb_drives].used = 1;
+@@ -920,6 +933,50 @@ void xenstore_record_dm_state(const char
xenstore_record_dm("state", state);
}
@@ -472,7 +472,7 @@
void xenstore_process_event(void *opaque)
{
char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
-@@ -650,6 +707,11 @@ void xenstore_process_event(void *opaque
+@@ -939,6 +996,11 @@ void xenstore_process_event(void *opaque
goto out;
}
++++++ checkpoint-rename.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
-@@ -144,7 +144,7 @@ def save(fd, dominfo, network, live, dst
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -151,7 +151,7 @@ def save(fd, dominfo, network, live, dst
dominfo.destroy()
dominfo.testDeviceComplete()
try:
++++++ disable_emulated_device.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
===================================================================
---- xen-3.3.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c 2009-01-05 13:27:56.000000000 -0700
-+++ xen-3.3.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c 2009-02-24 12:09:53.000000000 -0700
-@@ -296,6 +296,11 @@
+--- xen-3.4.0-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
+@@ -301,6 +301,11 @@ static int __devinit platform_pci_init(s
platform_mmio = mmio_addr;
platform_mmiolen = mmio_len;
++++++ dom-print.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,6 +1,8 @@
---- a/xen/arch/x86/domain.c
-+++ b/xen/arch/x86/domain.c
-@@ -135,7 +135,7 @@ void dump_pageframe_info(struct domain *
+Index: xen-3.4.0-testing/xen/arch/x86/domain.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/domain.c
++++ xen-3.4.0-testing/xen/arch/x86/domain.c
+@@ -143,7 +143,7 @@ void dump_pageframe_info(struct domain *
printk("Memory pages belonging to domain %u:\n", d->domain_id);
@@ -9,9 +11,9 @@
{
printk(" DomPage list too long to display\n");
}
-@@ -143,6 +143,15 @@ void dump_pageframe_info(struct domain *
+@@ -151,6 +151,15 @@ void dump_pageframe_info(struct domain *
{
- list_for_each_entry ( page, &d->page_list, list )
+ page_list_for_each ( page, &d->page_list )
{
+ if ( d->tot_pages > 16 )
+ {
@@ -25,17 +27,3 @@
printk(" DomPage %p: caf=%08lx, taf=%" PRtype_info "\n",
_p(page_to_mfn(page)),
page->count_info, page->u.inuse.type_info);
---- a/xen/common/keyhandler.c
-+++ b/xen/common/keyhandler.c
-@@ -192,9 +192,9 @@ static void dump_domains(unsigned char k
- {
- printk("General information for domain %u:\n", d->domain_id);
- cpuset_print(tmpstr, sizeof(tmpstr), d->domain_dirty_cpumask);
-- printk(" refcnt=%d nr_pages=%d xenheap_pages=%d "
-+ printk(" refcnt=%d dying=%d nr_pages=%d xenheap_pages=%d "
- "dirty_cpus=%s\n",
-- atomic_read(&d->refcnt),
-+ atomic_read(&d->refcnt), d->is_dying,
- d->tot_pages, d->xenheap_pages, tmpstr);
- printk(" handle=%02x%02x%02x%02x-%02x%02x-%02x%02x-"
- "%02x%02x-%02x%02x%02x%02x%02x%02x vm_assist=%08lx\n",
++++++ domUloader.py ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -164,7 +164,7 @@
for line in fd.readlines():
line = line.strip()
verbose_print("kpartx -l: %s" % (line,))
- (pname, params) = line.split(':')
+ (pname, params) = line.split(' : ')
pname = pname.strip()
pno = int(traildigits(pname))
#if pname.rfind('/') != -1:
++++++ dump-exec-state.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/xen/arch/ia64/linux-xen/smp.c
+Index: xen-3.4.0-testing/xen/arch/ia64/linux-xen/smp.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/ia64/linux-xen/smp.c
-+++ xen-3.3.1-testing/xen/arch/ia64/linux-xen/smp.c
-@@ -175,7 +175,7 @@ handle_IPI (int irq, void *dev_id, struc
+--- xen-3.4.0-testing.orig/xen/arch/ia64/linux-xen/smp.c
++++ xen-3.4.0-testing/xen/arch/ia64/linux-xen/smp.c
+@@ -190,7 +190,7 @@ handle_IPI (int irq, void *dev_id, struc
* At this point the structure may be gone unless
* wait is true.
*/
@@ -11,10 +11,10 @@
/* Notify the sending CPU that the task is done. */
mb();
-Index: xen-3.3.1-testing/xen/arch/x86/smp.c
+Index: xen-3.4.0-testing/xen/arch/x86/smp.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/smp.c
-+++ xen-3.3.1-testing/xen/arch/x86/smp.c
+--- xen-3.4.0-testing.orig/xen/arch/x86/smp.c
++++ xen-3.4.0-testing/xen/arch/x86/smp.c
@@ -356,7 +356,7 @@ fastcall void smp_call_function_interrup
if ( call_data->wait )
@@ -33,10 +33,10 @@
}
irq_exit();
-Index: xen-3.3.1-testing/xen/common/keyhandler.c
+Index: xen-3.4.0-testing/xen/common/keyhandler.c
===================================================================
---- xen-3.3.1-testing.orig/xen/common/keyhandler.c
-+++ xen-3.3.1-testing/xen/common/keyhandler.c
+--- xen-3.4.0-testing.orig/xen/common/keyhandler.c
++++ xen-3.4.0-testing/xen/common/keyhandler.c
@@ -91,14 +91,25 @@ static void show_handlers(unsigned char
key_table[i].desc);
}
@@ -83,10 +83,10 @@
on_selected_cpus(cpumask_of_cpu(cpu), __dump_execstate, NULL, 1, 1);
}
-Index: xen-3.3.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
+Index: xen-3.4.0-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
-+++ xen-3.3.1-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
+--- xen-3.4.0-testing.orig/xen/include/asm-ia64/linux-xen/asm/ptrace.h
++++ xen-3.4.0-testing/xen/include/asm-ia64/linux-xen/asm/ptrace.h
@@ -278,7 +278,7 @@ struct switch_stack {
# define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
# define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr)
++++++ hv_tools.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,81 +1,83 @@
-Index: xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
+Index: xen-3.4.0-testing/tools/python/xen/lowlevel/xc/xc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
-+++ xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
+--- xen-3.4.0-testing.orig/tools/python/xen/lowlevel/xc/xc.c
++++ xen-3.4.0-testing/tools/python/xen/lowlevel/xc/xc.c
@@ -890,14 +890,14 @@ static PyObject *pyxc_hvm_build(XcObject
int i;
#endif
char *image;
-- int memsize, vcpus = 1, acpi = 0, apic = 1;
-+ int memsize, vcpus = 1, acpi = 0, apic = 1, extid = 0;
+- int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1;
++ int memsize, target=-1, vcpus = 1, acpi = 0, apic = 1, extid=0;
static char *kwd_list[] = { "domid",
-- "memsize", "image", "vcpus", "acpi",
-+ "memsize", "image", "vcpus", "extid", "acpi",
- "apic", NULL };
-- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iii", kwd_list,
-+ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiii", kwd_list,
- &dom, &memsize,
-- &image, &vcpus, &acpi, &apic) )
-+ &image, &vcpus, &extid, &acpi, &apic) )
+- "memsize", "image", "target", "vcpus", "acpi",
+- "apic", NULL };
+- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiii", kwd_list,
+- &dom, &memsize, &image, &target, &vcpus,
+- &acpi, &apic) )
++ "memsize", "image", "target", "vcpus", "extid",
++ "acpi", "apic", NULL };
++ if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iis|iiiii", kwd_list,
++ &dom, &memsize, &image, &target, &extid,
++ &vcpus, &acpi, &apic) )
return NULL;
- if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
-@@ -922,6 +922,7 @@ static PyObject *pyxc_hvm_build(XcObject
- va_hvm->checksum = -sum;
+ if ( target == -1 )
+@@ -923,6 +923,7 @@ static PyObject *pyxc_hvm_build(XcObject
+ va_hvm->checksum -= sum;
munmap(va_map, XC_PAGE_SIZE);
#endif
+ xc_set_hvm_param(self->xc_handle, dom, HVM_PARAM_EXTEND_HYPERVISOR, extid);
return Py_BuildValue("{}");
}
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendConfig.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
-@@ -141,6 +141,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendConfig.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
+@@ -143,6 +143,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
'monitor': int,
'nographic': int,
'pae' : int,
-+ 'extid': int,
++ 'extid': int,
'rtc_timeoffset': int,
'serial': str,
'sdl': int,
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -703,6 +703,7 @@ class HVMImageHandler(ImageHandler):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -764,6 +764,7 @@ class HVMImageHandler(ImageHandler):
self.apic = int(vmConfig['platform'].get('apic', 0))
self.acpi = int(vmConfig['platform'].get('acpi', 0))
+ self.extid = int(vmConfig['platform'].get('extid', 0))
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
-
-@@ -809,6 +810,7 @@ class HVMImageHandler(ImageHandler):
- log.debug("store_evtchn = %d", store_evtchn)
- log.debug("memsize = %d", mem_mb)
+
+@@ -880,6 +881,7 @@ class HVMImageHandler(ImageHandler):
+ log.debug("memsize = %d", memmax_mb)
+ log.debug("target = %d", mem_mb)
log.debug("vcpus = %d", self.vm.getVCpuCount())
+ log.debug("extid = %d", self.extid)
log.debug("acpi = %d", self.acpi)
log.debug("apic = %d", self.apic)
-@@ -816,6 +818,7 @@ class HVMImageHandler(ImageHandler):
- image = self.loader,
- memsize = mem_mb,
+@@ -888,6 +890,7 @@ class HVMImageHandler(ImageHandler):
+ memsize = memmax_mb,
+ target = mem_mb,
vcpus = self.vm.getVCpuCount(),
+ extid = self.extid,
acpi = self.acpi,
apic = self.apic)
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -218,6 +218,10 @@ gopts.var('timer_mode', val='TIMER_MODE'
- use="""Timer mode (0=delay virtual time when ticks are missed;
- 1=virtual time is always wallclock time.""")
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -229,6 +229,10 @@ gopts.var('viridian', val='VIRIDIAN',
+ use="""Expose Viridian interface to x86 HVM guest?
+ (Default is 0).""")
+gopts.var('extid', val='EXTID',
+ fn=set_int, default=0,
@@ -84,7 +86,7 @@
gopts.var('acpi', val='ACPI',
fn=set_int, default=1,
use="Disable or enable ACPI of HVM domain.")
-@@ -858,7 +862,7 @@ def configure_vifs(config_devs, vals):
+@@ -925,7 +929,7 @@ def configure_vifs(config_devs, vals):
def configure_hvm(config_image, vals):
"""Create the config for HVM devices.
"""
++++++ hv_xen_base.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,9 +1,9 @@
%patch
-Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h
+Index: xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/asm-x86/hvm/domain.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h 2009-02-12 10:18:31.000000000 -0700
-@@ -82,6 +82,7 @@
+--- xen-3.4.0-testing.orig/xen/include/asm-x86/hvm/domain.h
++++ xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
+@@ -89,6 +89,7 @@ struct hvm_domain {
struct vmx_domain vmx;
struct svm_domain svm;
};
@@ -11,22 +11,22 @@
};
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/Makefile
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/Makefile 2009-01-05 13:27:57.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/Makefile 2009-02-12 10:18:31.000000000 -0700
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/Makefile
++++ xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
@@ -1,5 +1,6 @@
subdir-y += svm
subdir-y += vmx
-+subdir-y += hyperv
++subdir-y += hyperv
obj-y += emulate.o
obj-y += hvm.o
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:30.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:31.000000000 -0700
-@@ -44,6 +44,7 @@
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/hvm.c
++++ xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
+@@ -45,6 +45,7 @@
#include
#include
#include
@@ -34,7 +34,7 @@
#include
#include
#include
-@@ -361,6 +362,7 @@
+@@ -373,6 +374,7 @@ void hvm_domain_relinquish_resources(str
void hvm_domain_destroy(struct domain *d)
{
@@ -42,7 +42,7 @@
hvm_funcs.domain_destroy(d);
rtc_deinit(d);
stdvga_deinit(d);
-@@ -662,8 +664,14 @@
+@@ -673,8 +675,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
{
int rc;
@@ -57,7 +57,7 @@
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
goto fail2;
-@@ -710,12 +718,14 @@
+@@ -721,12 +729,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
hvm_funcs.vcpu_destroy(v);
fail2:
vlapic_destroy(v);
@@ -72,8 +72,8 @@
hvm_vcpu_cacheattr_destroy(v);
vlapic_destroy(v);
hvm_funcs.vcpu_destroy(v);
-@@ -1663,7 +1673,7 @@
- struct vcpu *v = current;
+@@ -1678,7 +1688,7 @@ void hvm_cpuid(unsigned int input, unsig
+ return;
if ( cpuid_hypervisor_leaves(input, eax, ebx, ecx, edx) )
- return;
@@ -81,7 +81,7 @@
domain_cpuid(v->domain, input, *ecx, eax, ebx, ecx, edx);
-@@ -1675,6 +1685,8 @@
+@@ -1690,6 +1700,8 @@ void hvm_cpuid(unsigned int input, unsig
if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
__clear_bit(X86_FEATURE_APIC & 31, edx);
}
@@ -90,16 +90,16 @@
}
void hvm_rdtsc_intercept(struct cpu_user_regs *regs)
-@@ -1765,6 +1777,8 @@
- break;
+@@ -1789,6 +1801,8 @@ int hvm_msr_read_intercept(struct cpu_us
+ break;
default:
+ if (hyperx_intercept_do_msr_read(ecx, regs))
-+ return X86EMUL_OKAY;
++ return X86EMUL_OKAY;
return hvm_funcs.msr_read_intercept(regs);
}
-@@ -1853,6 +1867,8 @@
+@@ -1877,6 +1891,8 @@ int hvm_msr_write_intercept(struct cpu_u
break;
default:
@@ -108,23 +108,23 @@
return hvm_funcs.msr_write_intercept(regs);
}
-@@ -2020,6 +2036,10 @@
+@@ -2044,6 +2060,10 @@ int hvm_do_hypercall(struct cpu_user_reg
case 0:
break;
}
-+ if (hyperx_intercept_do_hypercall(regs))
++ if (hyperx_intercept_do_hypercall(regs))
+ {
+ return HVM_HCALL_completed;
+ }
- if ( (eax >= NR_hypercalls) || !hvm_hypercall32_table[eax] )
- {
-@@ -2521,6 +2541,15 @@
+ if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) )
+ return viridian_hypercall(regs);
+@@ -2560,6 +2580,15 @@ long do_hvm_op(unsigned long op, XEN_GUE
rc = -EINVAL;
break;
+ case HVM_PARAM_EXTEND_HYPERVISOR:
-+ if ((a.value == 1) && hyperv_initialize(d))
++ if ((a.value == 1) && hyperv_initialize(d))
+ {
+ if (a.value != 1)
+ rc = -EINVAL;
@@ -135,22 +135,13 @@
}
if ( rc == 0 )
-Index: xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h
+Index: xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/public/arch-x86/hvm/save.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h 2009-02-12 10:18:31.000000000 -0700
-@@ -38,7 +38,7 @@
- uint32_t version; /* File format version */
- uint64_t changeset; /* Version of Xen that saved this file */
- uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
-- uint32_t pad0;
-+ uint32_t pad0;
- };
-
- DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
-@@ -421,9 +421,23 @@
+--- xen-3.4.0-testing.orig/xen/include/public/arch-x86/hvm/save.h
++++ xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
+@@ -432,9 +432,26 @@ struct hvm_viridian_context {
- DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct hvm_hw_mtrr);
+ DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context);
+struct hvm_hyperv_dom {
+ uint64_t guestid_msr;
@@ -158,25 +149,28 @@
+ uint32_t long_mode;
+ uint32_t ext_id;
+};
-+DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 15, struct hvm_hyperv_dom);
++
++DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 16, struct hvm_hyperv_dom);
+
+struct hvm_hyperv_cpu {
+ uint64_t control_msr;
+ uint64_t version_msr;
+ uint64_t pad[27]; //KYS: sles10 sp2 compatibility
+};
-+DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 16, struct hvm_hyperv_cpu);
++
++DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 17, struct hvm_hyperv_cpu);
++
/*
* Largest type-code in use
*/
--#define HVM_SAVE_CODE_MAX 14
-+#define HVM_SAVE_CODE_MAX 16
+-#define HVM_SAVE_CODE_MAX 15
++#define HVM_SAVE_CODE_MAX 17
#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
-Index: xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c
+Index: xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:30.000000000 -0700
-+++ xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:31.000000000 -0700
+--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/vlapic.c
++++ xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
@@ -34,6 +34,7 @@
#include
#include
@@ -185,7 +179,7 @@
#include
#include
#include
-@@ -307,6 +308,7 @@
+@@ -307,6 +308,7 @@ static int vlapic_accept_sipi(struct vcp
hvm_vcpu_reset_state(v, trampoline_vector << 8, 0);
vcpu_unpause(v);
@@ -193,17 +187,17 @@
return X86EMUL_OKAY;
}
-Index: xen-3.3.1-testing/xen/include/public/hvm/params.h
+Index: xen-3.4.0-testing/xen/include/public/hvm/params.h
===================================================================
---- xen-3.3.1-testing.orig/xen/include/public/hvm/params.h 2009-01-05 13:27:58.000000000 -0700
-+++ xen-3.3.1-testing/xen/include/public/hvm/params.h 2009-02-12 10:18:31.000000000 -0700
-@@ -93,6 +93,8 @@
- /* ACPI S state: currently support S0 and S3 on x86. */
- #define HVM_PARAM_ACPI_S_STATE 14
+--- xen-3.4.0-testing.orig/xen/include/public/hvm/params.h
++++ xen-3.4.0-testing/xen/include/public/hvm/params.h
+@@ -106,6 +106,8 @@
+ /* Boolean: Enable aligning all periodic vpts to reduce interrupts */
+ #define HVM_PARAM_VPT_ALIGN 16
--#define HVM_NR_PARAMS 15
-+#define HVM_PARAM_EXTEND_HYPERVISOR 15
+-#define HVM_NR_PARAMS 17
++#define HVM_PARAM_EXTEND_HYPERVISOR 17
+
-+#define HVM_NR_PARAMS 16
++#define HVM_NR_PARAMS 18
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
++++++ hv_xen_extension.patch ++++++
++++ 1238 lines (skipped)
++++ between xen/hv_xen_extension.patch
++++ and /mounts/work_src_done/STABLE/xen/hv_xen_extension.patch
++++++ init.xend ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -21,8 +21,7 @@
. /etc/rc.status
rc_reset
-XEND=`ps ax | grep -w xend | grep -w python | awk '{ print $1 }'`
-XEND=`echo $XEND`
+XEND=`pidofproc /usr/sbin/xend`
await_daemons_up()
{
@@ -115,7 +114,7 @@
if [ ! -z "$XEND" ]; then
echo -n "(pid $XEND) "
fi
- xend status
+ checkproc /usr/sbin/xend
;;
restart|reload)
check $1
++++++ ioemu-7615-qcow2-fix-alloc_cluster_link_l2.patch ++++++
qcow2 corruption: Fix alloc_cluster_link_l2 (Kevin Wolf)
This patch fixes a qcow2 corruption bug introduced in SVN Rev 5861. L2 tables
are big endian, so entries must be converted before being passed to functions.
This bug is easy to trigger. The following script will create and destroy a
qcow2 image (the header is gone after three loop iterations):
#!/bin/bash
qemu-img create -f qcow2 test.qcow 1M
for i in $(seq 1 10); do
qemu-system-x86_64 -hda test.qcow -monitor stdio > /dev/null 2>&1 <
Index: xen-3.4.0-testing/tools/ioemu-remote/block-qcow2.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/block-qcow2.c
+++ xen-3.4.0-testing/tools/ioemu-remote/block-qcow2.c
@@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr
goto err;
for (i = 0; i < j; i++)
- free_any_clusters(bs, old_cluster[i], 1);
+ free_any_clusters(bs, be64_to_cpu(old_cluster[i]), 1);
ret = 0;
err:
++++++ ioemu-blktap-barriers.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -357,6 +357,15 @@ static void qemu_send_responses(void* op
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -362,6 +362,15 @@ static void qemu_send_responses(void* op
}
/**
@@ -18,7 +18,7 @@
* Callback function for the IO message pipe. Reads requests from the ring
* and processes them (call qemu read/write functions).
*
-@@ -375,6 +384,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -380,6 +389,7 @@ static void handle_blktap_iomsg(void* pr
blkif_t *blkif = s->blkif;
tapdev_info_t *info = s->ring_info;
int page_size = getpagesize();
@@ -26,7 +26,7 @@
struct aiocb_info *aiocb_info;
-@@ -407,7 +417,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -412,7 +422,7 @@ static void handle_blktap_iomsg(void* pr
/* Don't allow writes on readonly devices */
if ((s->flags & TD_RDONLY) &&
@@ -35,7 +35,7 @@
blkif->pending_list[idx].status = BLKIF_RSP_ERROR;
goto send_response;
}
-@@ -428,7 +438,7 @@ static void handle_blktap_iomsg(void* pr
+@@ -433,7 +443,7 @@ static void handle_blktap_iomsg(void* pr
DPRINTF("Sector request failed:\n");
DPRINTF("%s request, idx [%d,%d] size [%llu], "
"sector [%llu,%llu]\n",
@@ -44,7 +44,7 @@
"WRITE" : "READ"),
idx,i,
(long long unsigned)
-@@ -441,8 +451,14 @@ static void handle_blktap_iomsg(void* pr
+@@ -446,8 +456,14 @@ static void handle_blktap_iomsg(void* pr
blkif->pending_list[idx].secs_pending += nsects;
@@ -60,7 +60,7 @@
case BLKIF_OP_WRITE:
aiocb_info = malloc(sizeof(*aiocb_info));
-@@ -462,6 +478,10 @@ static void handle_blktap_iomsg(void* pr
+@@ -467,6 +483,10 @@ static void handle_blktap_iomsg(void* pr
DPRINTF("ERROR: bdrv_write() == NULL\n");
goto send_response;
}
++++++ ioemu-blktap-fv-init.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,16 +1,16 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_machine_fv.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_machine_fv.c
-@@ -185,6 +185,7 @@ void qemu_invalidate_map_cache(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_machine_fv.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_machine_fv.c
+@@ -266,6 +266,7 @@ void qemu_invalidate_entry(uint8_t *buff
#endif /* defined(MAPCACHE) */
+extern void init_blktap(void);
static void xen_init_fv(ram_addr_t ram_size, int vga_ram_size,
- const char *boot_device, DisplayState *ds,
-@@ -210,6 +211,11 @@ static void xen_init_fv(ram_addr_t ram_s
+ const char *boot_device,
+@@ -291,6 +292,11 @@ static void xen_init_fv(ram_addr_t ram_s
}
#endif
++++++ ioemu-blktap-image-format.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,51 +1,25 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
+From 5ac882a6d7499e4a36103db071203bf4d1ddfe1f Mon Sep 17 00:00:00 2001
+From: Kevin Wolf
+Date: Tue, 10 Mar 2009 16:26:45 +0100
+Subject: [PATCH 2/6] ioemu: Use the image format sent by blktapctrl
+
+Currently the blktap backend in ioemu lets qemu guess which format an
+image is in. This was a security problem and the blktap backend
+doesn't work any more since this was fixed in qemu.
+
+This patch changes ioemu to respect the format it gets from blktapctrl.
+
+Signed-off-by: Kevin Wolf
+---
+ hw/xen_blktap.c | 22 +++++++++++++++++++---
+ hw/xen_blktap.h | 14 ++++++++++++++
+ 2 files changed, 33 insertions(+), 3 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/tapdisk.h
-+++ xen-3.3.1-testing/tools/blktap/drivers/tapdisk.h
-@@ -159,16 +159,6 @@ extern struct tap_disk tapdisk_ram;
- extern struct tap_disk tapdisk_qcow;
- extern struct tap_disk tapdisk_qcow2;
-
--#define MAX_DISK_TYPES 20
--
--#define DISK_TYPE_AIO 0
--#define DISK_TYPE_SYNC 1
--#define DISK_TYPE_VMDK 2
--#define DISK_TYPE_RAM 3
--#define DISK_TYPE_QCOW 4
--#define DISK_TYPE_QCOW2 5
--#define DISK_TYPE_IOEMU 6
--
-
- /*Define Individual Disk Parameters here */
- static disk_info_t aio_disk = {
-Index: xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/lib/blktaplib.h
-+++ xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
-@@ -211,6 +211,17 @@ typedef struct msg_pid {
- #define CTLMSG_PID 9
- #define CTLMSG_PID_RSP 10
-
-+/* disk driver types */
-+#define MAX_DISK_TYPES 20
-+
-+#define DISK_TYPE_AIO 0
-+#define DISK_TYPE_SYNC 1
-+#define DISK_TYPE_VMDK 2
-+#define DISK_TYPE_RAM 3
-+#define DISK_TYPE_QCOW 4
-+#define DISK_TYPE_QCOW2 5
-+#define DISK_TYPE_IOEMU 6
-+
- /* xenstore/xenbus: */
- #define DOMNAME "Domain-0"
- int setup_probe_watch(struct xs_handle *h);
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -222,9 +222,10 @@ static int map_new_dev(struct td_state *
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -220,9 +220,10 @@ static int map_new_dev(struct td_state *
return -1;
}
@@ -57,7 +31,7 @@
char* devname;
static int devnumber = 0;
int i;
-@@ -234,7 +235,22 @@ static int open_disk(struct td_state *s,
+@@ -232,7 +233,22 @@ static int open_disk(struct td_state *s,
bs = bdrv_new(devname);
free(devname);
@@ -81,7 +55,7 @@
fprintf(stderr, "Could not open image file %s\n", path);
return -ENOMEM;
}
-@@ -529,7 +545,7 @@ static void handle_blktap_ctrlmsg(void*
+@@ -527,7 +543,7 @@ static void handle_blktap_ctrlmsg(void*
s = state_init();
/*Open file*/
@@ -90,13 +64,13 @@
msglen = sizeof(msg_hdr_t);
msg->type = CTLMSG_IMG_FAIL;
msg->len = msglen;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.h
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.h
-@@ -50,4 +50,19 @@ typedef struct fd_list_entry {
- struct fd_list_entry **pprev, *next;
- } fd_list_entry_t;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.h
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.h
+@@ -52,4 +52,18 @@ typedef struct fd_list_entry {
+
+ int init_blktap(void);
+typedef struct disk_info {
+ int idnum;
@@ -109,7 +83,6 @@
+ { DISK_TYPE_VMDK, &bdrv_vmdk },
+ { DISK_TYPE_QCOW, &bdrv_qcow },
+ { DISK_TYPE_QCOW2, &bdrv_qcow2 },
-+ { DISK_TYPE_IOEMU, NULL },
+ { -1, NULL }
+};
+
++++++ ioemu-blktap-zero-size.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:23.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:23.000000000 +0200
@@ -1,16 +1,22 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+From cb982fd919a52ff86f01025d0f92225bc7b2a956 Mon Sep 17 00:00:00 2001
+From: Kevin Wolf
+Date: Tue, 10 Mar 2009 16:44:31 +0100
+Subject: [PATCH 5/6] ioemu: Fail on too small blktap disks
+
+The blktap infrastructure doesn't seems to be able to cope with images
+that are smaller than a sector, it produced hangs for me. Such an
+image isn't really useful anyway, so just fail gracefully.
+
+Signed-off-by: Kevin Wolf
+---
+ hw/xen_blktap.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -67,6 +67,7 @@ int read_fd;
- int write_fd;
-
- static pid_t process;
-+int connected_disks = 0;
- fd_list_entry_t *fd_start = NULL;
-
- extern char* get_snapshot_name(int devid);
-@@ -260,6 +261,12 @@ static int open_disk(struct td_state *s,
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -258,6 +258,12 @@ static int open_disk(struct td_state *s,
s->size = bs->total_sectors;
s->sector_size = 512;
@@ -23,82 +29,11 @@
s->info = ((s->flags & TD_RDONLY) ? VDISK_READONLY : 0);
#ifndef QEMU_TOOL
-@@ -563,6 +570,7 @@ static void handle_blktap_ctrlmsg(void*
-
- /* Allocate the disk structs */
- s = state_init();
-+ connected_disks++;
-
- /*Open file*/
- if (s == NULL || open_disk(s, path, msg->drivertype, msg->readonly)) {
-@@ -645,7 +653,8 @@ static void handle_blktap_ctrlmsg(void*
- case CTLMSG_CLOSE:
- s = get_state(msg->cookie);
- if (s) unmap_disk(s);
-- break;
-+ connected_disks--;
-+ break;
-
- case CTLMSG_PID:
- memset(buf, 0x00, MSG_SIZE);
-Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-@@ -18,6 +18,7 @@ extern void *qemu_mallocz(size_t size);
- extern void qemu_free(void *ptr);
-
- extern void *fd_start;
-+extern int connected_disks;
-
- int domid = 0;
- FILE* logfile;
-@@ -98,7 +99,7 @@ int main(void)
- int max_fd;
- fd_set rfds;
- struct timeval tv;
-- void *old_fd_start = NULL;
-+ int old_connected_disks = 0;
-
- /* Daemonize */
- if (fork() != 0)
-@@ -153,11 +154,17 @@ int main(void)
- pioh = &ioh->next;
- }
-
-+ if (old_connected_disks != connected_disks)
-+ fprintf(stderr, "connected disks: %d => %d\n",
-+ old_connected_disks, connected_disks);
-+
- /* Exit when the last image has been closed */
-- if (old_fd_start != NULL && fd_start == NULL)
-+ if (old_connected_disks != 0 && connected_disks == 0) {
-+ fprintf(stderr, "Last image is closed, exiting.\n");
- exit(0);
-+ }
-
-- old_fd_start = fd_start;
-+ old_connected_disks = connected_disks;
- }
- return 0;
- }
-Index: xen-3.3.1-testing/tools/examples/blktap
-===================================================================
---- xen-3.3.1-testing.orig/tools/examples/blktap
-+++ xen-3.3.1-testing/tools/examples/blktap
-@@ -75,6 +75,7 @@ fi
- if [ "$command" = 'add' ]
- then
- [ -e "$file" ] || { fatal $file does not exist; }
-+ [ $(stat --format="%s" "$file") -ge 512 ] || { fatal $file is too small; }
-
- FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
- FRONTEND_UUID=$(xenstore_read "/local/domain/$FRONTEND_ID/vm")
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/DevController.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
-@@ -182,7 +182,7 @@ class DevController:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/DevController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
+@@ -155,7 +155,7 @@ class DevController:
(devid, self.deviceClass))
elif status == Error:
++++++ ioemu-debuginfo.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,21 +1,21 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile
-@@ -205,7 +205,7 @@ endif
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile
+@@ -242,7 +242,7 @@ endif
install: all $(if $(BUILD_DOCS),install-doc)
mkdir -p "$(DESTDIR)$(bindir)"
ifneq ($(TOOLS),)
- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
+ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)"
endif
+ ifneq ($(BLOBS),)
mkdir -p "$(DESTDIR)$(datadir)"
- set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
-Index: xen-3.3.1-testing/tools/ioemu-remote/Makefile.target
+Index: xen-3.4.0-testing/tools/ioemu-remote/Makefile.target
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/Makefile.target
-+++ xen-3.3.1-testing/tools/ioemu-remote/Makefile.target
-@@ -707,7 +707,7 @@ clean:
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/Makefile.target
++++ xen-3.4.0-testing/tools/ioemu-remote/Makefile.target
+@@ -754,7 +754,7 @@ clean:
install: all install-hook
ifneq ($(PROGS),)
++++++ ioemu-vnc-resize.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,35 +1,8 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/vnc.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/vnc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vnc.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vnc.c
-@@ -352,6 +352,11 @@ static void vnc_dpy_update(DisplayState
- {
- VncState *vs = ds->opaque;
-
-+ x = MIN(x, vs->width);
-+ y = MIN(y, vs->height);
-+ w = MIN(w, vs->width - x);
-+ h = MIN(h, vs->height - y);
-+
- set_bits_in_row(vs, vs->dirty_row, x, y, w, h);
- }
-
-@@ -419,9 +424,13 @@ static void vnc_dpy_resize_shared(Displa
- size_changed = ds->width != w || ds->height != h;
- ds->width = w;
- ds->height = h;
-- if (vs->csock != -1 && vs->has_resize && size_changed) {
-+ if (size_changed) {
- vs->width = ds->width;
- vs->height = ds->height;
-+ VNC_DEBUG("vs->width = %d, vs->height = %d\n",
-+ ds->width, ds->height);
-+ }
-+ if (vs->csock != -1 && vs->has_resize && size_changed) {
- if (vs->update_requested) {
- vnc_write_u8(vs, 0); /* msg id */
- vnc_write_u8(vs, 0);
-@@ -1808,6 +1817,31 @@ static int protocol_client_msg(VncState
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/vnc.c
++++ xen-3.4.0-testing/tools/ioemu-remote/vnc.c
+@@ -1713,6 +1713,31 @@ static int protocol_client_msg(VncState
}
set_encodings(vs, (int32_t *)(data + 4), limit);
@@ -48,13 +21,13 @@
+ vnc_write_u8(vs, 0); /* msg id */
+ vnc_write_u8(vs, 0);
+ vnc_write_u16(vs, 1); /* number of rects */
-+ vnc_framebuffer_update(vs, 0, 0, vs->ds->width, vs->ds->height, -223);
++ vnc_framebuffer_update(vs, 0, 0, vs->serverds.width, vs->serverds.height, -223);
+
+ /* Ensure that the new area is updated */
+ vnc_write_u8(vs, 0); /* msg id */
+ vnc_write_u8(vs, 0);
+ vnc_write_u16(vs, 1); /* number of rects */
-+ send_framebuffer_update(vs, 0, 0, vs->ds->width, vs->ds->height);
++ send_framebuffer_update(vs, 0, 0, vs->serverds.width, vs->serverds.height);
+
+ vnc_flush(vs);
+ }
++++++ libxen_permissive.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/libxen/src/xen_common.c
+Index: xen-3.4.0-testing/tools/libxen/src/xen_common.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxen/src/xen_common.c
-+++ xen-3.3.1-testing/tools/libxen/src/xen_common.c
-@@ -902,8 +902,15 @@ static void parse_into(xen_session *s, x
+--- xen-3.4.0-testing.orig/tools/libxen/src/xen_common.c
++++ xen-3.4.0-testing/tools/libxen/src/xen_common.c
+@@ -904,8 +904,15 @@ static void parse_into(xen_session *s, x
0 != strcmp((char *)value_node->children->name, "struct") ||
value_node->children->children == NULL)
{
++++++ network-nat-open-SuSEfirewall2-FORWARD.patch ++++++
Open SuSEfirewall2 FORWARD rule when use xen nat
diff -uNrp xen-3.4.0-testing/tools/hotplug/Linux/network-nat xen-3.4.0-testing/tools/hotplug/Linux/network-nat
--- xen-3.4.0-testing/tools/hotplug/Linux/network-nat 2009-04-08 17:31:50.000000000 +0800
+++ xen-3.4.0-testing/tools/hotplug/Linux/network-nat 2009-04-08 17:33:20.000000000 +0800
@@ -82,6 +82,7 @@ function dhcp_stop()
op_start() {
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ${netdev} -j MASQUERADE
+ iptables -P FORWARD ACCEPT
[ "$dhcp" != 'no' ] && dhcp_start
}
@@ -89,6 +90,7 @@ op_start() {
op_stop() {
[ "$dhcp" != 'no' ] && dhcp_stop
iptables -t nat -D POSTROUTING -o ${netdev} -j MASQUERADE
+ iptables -P FORWARD DROP
}
++++++ network-nat.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-nat
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-nat
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-nat
-+++ xen-3.3.1-testing/tools/examples/network-nat
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-nat
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-nat
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
++++++ network-route.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/network-route
+Index: xen-3.4.0-testing/tools/hotplug/Linux/network-route
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/network-route
-+++ xen-3.3.1-testing/tools/examples/network-route
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/network-route
++++ xen-3.4.0-testing/tools/hotplug/Linux/network-route
@@ -21,7 +21,7 @@ dir=$(dirname "$0")
evalVariables "$@"
++++++ pv-driver-build.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,5 +1,7 @@
---- a/unmodified_drivers/linux-2.6/blkfront/Kbuild
-+++ b/unmodified_drivers/linux-2.6/blkfront/Kbuild
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild
+===================================================================
+--- xen-3.4.0-testing.orig/unmodified_drivers/linux-2.6/blkfront/Kbuild
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/blkfront/Kbuild
@@ -3,3 +3,4 @@ include $(M)/overrides.mk
obj-m += xen-vbd.o
++++++ pvdrv_emulation_control.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,12 +1,12 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_platform.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-@@ -101,6 +101,19 @@ static void platform_ioport_write(void *
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
+@@ -356,6 +356,19 @@ static void platform_ioport_write(void *
net_tap_shutdown_all();
fprintf(logfile, "Done.\n");
break;
-+ case 8:
++ case 8:
+ if (val ==1 ) {
+ fprintf(logfile, "Disconnect IDE hard disk...\n");
+ ide_unplug_harddisks();
++++++ python2.6-fixes.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/util/acmpolicy.py
+Index: xen-3.4.0-testing/tools/python/xen/util/acmpolicy.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/util/acmpolicy.py
-+++ xen-3.3.1-testing/tools/python/xen/util/acmpolicy.py
+--- xen-3.4.0-testing.orig/tools/python/xen/util/acmpolicy.py
++++ xen-3.4.0-testing/tools/python/xen/util/acmpolicy.py
@@ -17,7 +17,10 @@
#============================================================================
@@ -14,10 +14,10 @@
import stat
import array
import struct
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendAPI.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendAPI.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendAPI.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendAPI.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendAPI.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendAPI.py
@@ -18,7 +18,6 @@
import inspect
import os
@@ -26,7 +26,7 @@
import string
import sys
import traceback
-@@ -116,13 +115,13 @@ event_registrations = {}
+@@ -119,7 +118,7 @@ event_registrations = {}
def event_register(session, reg_classes):
if session not in event_registrations:
event_registrations[session] = {
@@ -35,10 +35,11 @@
'queue' : Queue.Queue(EVENT_QUEUE_LENGTH),
'next-id' : 1
}
- if not reg_classes:
- reg_classes = classes
-- event_registrations[session]['classes'].union_update(reg_classes)
-+ event_registrations[session]['classes'].update(reg_classes)
+@@ -131,7 +130,6 @@ def event_register(session, reg_classes)
+ event_registrations[session]['classes'].update(reg_classes)
+-
def event_unregister(session, unreg_classes):
+ if session not in event_registrations:
+ return
++++++ qemu-dm-segfault.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,86 +1,85 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/ide.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ide.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
-@@ -908,8 +908,12 @@ static inline void ide_dma_submit_check(
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/ide.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/ide.c
+@@ -934,8 +934,9 @@ static inline void ide_dma_submit_check(
static inline void ide_set_irq(IDEState *s)
{
- BMDMAState *bm = s->bmdma;
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
+ BMDMAState *bm;
-+
-+ if (!s || !s->bs) return; /* yikes */
-+
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+ bm = s->bmdma;
-+
if (!(s->cmd & IDE_CMD_DISABLE_IRQ)) {
if (bm) {
bm->status |= BM_STATUS_INT;
-@@ -1094,15 +1098,13 @@ static void ide_read_dma_cb(void *opaque
+@@ -1223,14 +1224,14 @@ static void ide_read_dma_cb(void *opaque
int n;
int64_t sector_num;
-+ if (!s || !s->bs) return; /* yikes */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+
if (ret < 0) {
+ dma_buf_commit(s, 1);
ide_dma_error(s);
return;
}
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
-
n = s->io_buffer_size >> 9;
sector_num = ide_get_sector(s);
if (n > 0) {
-@@ -1222,15 +1224,13 @@ static void ide_write_dma_cb(void *opaqu
+@@ -1334,6 +1335,8 @@ static void ide_write_flush_cb(void *opa
+ BMDMAState *bm = opaque;
+ IDEState *s = bm->ide_if;
+
++ if (!s) return; /* yikes */
++
+ if (ret != 0) {
+ ide_dma_error(s);
+ return;
+@@ -1365,13 +1368,13 @@ static void ide_write_dma_cb(void *opaqu
int n;
int64_t sector_num;
-+ if (!s || !s->bs) return; /* yikes */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
+
if (ret < 0) {
- ide_dma_error(s);
- return;
+ if (ide_handle_write_error(s, -ret, BM_STATUS_DMA_RETRY))
+ return;
}
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
-
n = s->io_buffer_size >> 9;
sector_num = ide_get_sector(s);
if (n > 0) {
-@@ -1290,7 +1290,7 @@ static void ide_flush_cb(void *opaque, i
+@@ -1428,7 +1431,7 @@ static void ide_flush_cb(void *opaque, i
{
IDEState *s = opaque;
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see below) */
++ if (!s || !s->bs) return; /* ouch! (see below) */
if (ret) {
/* We are completely doomed. The IDE spec does not permit us
-@@ -1536,9 +1536,7 @@ static void ide_atapi_cmd_read_dma_cb(vo
+@@ -1685,7 +1688,7 @@ static void ide_atapi_cmd_read_dma_cb(vo
IDEState *s = bm->ide_if;
int data_offset, n;
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
if (ret < 0) {
ide_atapi_io_error(s, ret);
-@@ -2119,9 +2117,7 @@ static void cdrom_change_cb(void *opaque
+@@ -2363,7 +2366,7 @@ static void cdrom_change_cb(void *opaque
IDEState *s = opaque;
uint64_t nb_sectors;
-- if (!s->bs) return; /* yikes */
--
-- if (!s->bs) return; /* yikes */
-+ if (!s || !s->bs) return; /* yikes */
+- if (!s->bs) return; /* ouch! (see ide_flush_cb) */
++ if (!s || !s->bs) return; /* ouch! (see ide_flush_cb) */
- /* XXX: send interrupt too */
bdrv_get_geometry(s->bs, &nb_sectors);
+ s->nb_sectors = nb_sectors;
++++++ qemu-security-etch1.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,21 +1,7 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/block.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/ne2000.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/block.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/block.c
-@@ -630,6 +630,9 @@ int bdrv_write(BlockDriverState *bs, int
- return 0;
- }
- } else {
-+ unsigned int ns = sector_num * 512;
-+ if (ns < 0)
-+ return -1;
- return drv->bdrv_write(bs, sector_num, buf, nb_sectors);
- }
- }
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ne2000.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ne2000.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ne2000.c
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/ne2000.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/ne2000.c
@@ -218,7 +218,7 @@ static int ne2000_can_receive(void *opaq
NE2000State *s = opaque;
@@ -25,11 +11,11 @@
return !ne2000_buffer_full(s);
}
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/pc.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/pc.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/pc.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/pc.c
-@@ -387,7 +387,8 @@ static void bochs_bios_write(void *opaqu
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/pc.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/pc.c
+@@ -409,7 +409,8 @@ static void bochs_bios_write(void *opaqu
case 0x400:
case 0x401:
fprintf(stderr, "BIOS panic at rombios.c, line %d\n", val);
@@ -39,7 +25,7 @@
case 0x402:
case 0x403:
#ifdef DEBUG_BIOS
-@@ -410,8 +411,9 @@ static void bochs_bios_write(void *opaqu
+@@ -432,8 +433,9 @@ static void bochs_bios_write(void *opaqu
/* LGPL'ed VGA BIOS messages */
case 0x501:
case 0x502:
@@ -50,65 +36,3 @@
case 0x500:
case 0x503:
#ifdef DEBUG_BIOS
-Index: xen-3.3.1-testing/tools/ioemu-remote/target-i386/translate.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/target-i386/translate.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/target-i386/translate.c
-@@ -5661,6 +5661,7 @@ static target_ulong disas_insn(DisasCont
- gen_jmp_im(pc_start - s->cs_base);
- gen_op_into(s->pc - pc_start);
- break;
-+#ifdef WANT_ICEBP
- case 0xf1: /* icebp (undocumented, exits to external debugger) */
- if (gen_svm_check_intercept(s, pc_start, SVM_EXIT_ICEBP))
- break;
-@@ -5672,6 +5673,7 @@ static target_ulong disas_insn(DisasCont
- cpu_set_log(CPU_LOG_INT | CPU_LOG_TB_IN_ASM);
- #endif
- break;
-+#endif /* icebp */
- case 0xfa: /* cli */
- if (!s->vm86) {
- if (s->cpl <= s->iopl) {
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -4380,8 +4380,8 @@ typedef struct NetSocketState {
- VLANClientState *vc;
- int fd;
- int state; /* 0 = getting length, 1 = getting data */
-- int index;
-- int packet_len;
-+ unsigned int index;
-+ unsigned int packet_len;
- uint8_t buf[4096];
- struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
- } NetSocketState;
-@@ -4412,7 +4412,8 @@ static void net_socket_receive_dgram(voi
- static void net_socket_send(void *opaque)
- {
- NetSocketState *s = opaque;
-- int l, size, err;
-+ int size, err;
-+ unsigned l;
- uint8_t buf1[4096];
- const uint8_t *buf;
-
-@@ -4451,7 +4452,15 @@ static void net_socket_send(void *opaque
- l = s->packet_len - s->index;
- if (l > size)
- l = size;
-- memcpy(s->buf + s->index, buf, l);
-+ if (s->index + l <= sizeof(s->buf)) {
-+ memcpy(s->buf + s->index, buf, l);
-+ } else {
-+ fprintf(stderr, "serious error: oversized packet received,"
-+ "connection terminated.\n");
-+ s->state = 0;
-+ goto eoc;
-+ }
-+
- s->index += l;
- buf += l;
- size -= l;
++++++ serial-split.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/misc/serial-split/Makefile
+Index: xen-3.4.0-testing/tools/misc/serial-split/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/misc/serial-split/Makefile
++++ xen-3.4.0-testing/tools/misc/serial-split/Makefile
@@ -0,0 +1,20 @@
+CC ?= gcc
+CFLAGS ?= -Wall -Os
@@ -23,10 +23,10 @@
+
+%.o: %.c Makefile
+ $(CC) $(CFLAGS) -c -o $@ $<
-Index: xen-3.3.1-testing/tools/misc/serial-split/serial-split.c
+Index: xen-3.4.0-testing/tools/misc/serial-split/serial-split.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/misc/serial-split/serial-split.c
++++ xen-3.4.0-testing/tools/misc/serial-split/serial-split.c
@@ -0,0 +1,422 @@
+/*
+ * serial-split.c
++++++ snapshot-ioemu-delete.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,13 +1,12 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -671,6 +671,18 @@ static void xenstore_process_dm_command_
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -919,6 +919,18 @@ static void xenstore_process_dm_command_
}
snapshot_name = xs_read(xsh, XBT_NULL, path, &len);
+ } else if (!strncmp(command, "snapshot-delete", len)) {
-+
+ if (pasprintf(&path,
+ "/local/domain/0/device-model/%u/parameter", domid) == -1) {
+ fprintf(logfile, "out of memory reading dm command parameter\n");
@@ -18,23 +17,15 @@
+ goto out;
+ if (delete_disk_snapshots(par) == 0)
+ xenstore_record_dm_state("snapshot-deleted");
++ free(par);
} else if (!strncmp(command, "continue", len)) {
fprintf(logfile, "dm-command: continue after state save\n");
xen_pause_requested = 0;
-Index: xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/savevm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xen-vl-extra.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
-@@ -16,6 +16,8 @@ static int qemu_savevm_state(QEMUFile *f
- static int qemu_loadvm_state(QEMUFile *f);
-
- static int bdrv_can_snapshot(BlockDriverState *bs);
-+static int bdrv_has_snapshot(BlockDriverState *bs);
-+static BlockDriverState *get_bs_snapshots(void);
- static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
- const char *name);
-
-@@ -166,6 +168,35 @@ the_end:
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/savevm.c
++++ xen-3.4.0-testing/tools/ioemu-remote/savevm.c
+@@ -1096,6 +1096,35 @@ the_end:
return ret;
}
@@ -67,14 +58,14 @@
+ return 0;
+}
+
- struct qemu_alarm_timer;
- static int unix_start_timer(struct qemu_alarm_timer *t) { return 0; }
- static void unix_stop_timer(struct qemu_alarm_timer *t) { }
-Index: xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
+ #ifndef CONFIG_DM
+
+ void do_savevm(const char *name)
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/qemu-xen.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
-@@ -22,6 +22,7 @@ enum {
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-xen.h
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
+@@ -42,6 +42,7 @@ enum {
/* xen-vl-extra.c */
int save_disk_snapshots(const char* name);
++++++ snapshot-ioemu-restore.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
+Index: xen-3.4.0-testing/tools/blktap/drivers/blktapctrl.c
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/blktapctrl.c
-+++ xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
-@@ -305,6 +305,7 @@ static int write_msg(int fd, int msgtype
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/blktapctrl.c
++++ xen-3.4.0-testing/tools/blktap/drivers/blktapctrl.c
+@@ -346,6 +346,7 @@ static int write_msg(int fd, int msgtype
msg_dev = (msg_newdev_t *)(buf + sizeof(msg_hdr_t));
msg_dev->devnum = blkif->minor;
msg_dev->domid = blkif->domid;
@@ -10,10 +10,10 @@
break;
-Index: xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
+Index: xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/lib/blktaplib.h
-+++ xen-3.3.1-testing/tools/blktap/lib/blktaplib.h
+--- xen-3.4.0-testing.orig/tools/blktap/lib/blktaplib.h
++++ xen-3.4.0-testing/tools/blktap/lib/blktaplib.h
@@ -189,6 +189,7 @@ typedef struct msg_hdr {
typedef struct msg_newdev {
uint8_t devnum;
@@ -22,11 +22,11 @@
} msg_newdev_t;
typedef struct msg_pid {
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_blktap.c
-@@ -69,6 +69,8 @@ int write_fd;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
+@@ -67,6 +67,8 @@ int write_fd;
static pid_t process;
fd_list_entry_t *fd_start = NULL;
@@ -35,7 +35,7 @@
static void handle_blktap_iomsg(void* private);
struct aiocb_info {
-@@ -502,6 +504,10 @@ static void handle_blktap_ctrlmsg(void*
+@@ -500,6 +502,10 @@ static void handle_blktap_ctrlmsg(void*
char buf[MSG_SIZE];
@@ -46,7 +46,7 @@
length = read(read_fd, buf, MSG_SIZE);
if (length > 0 && length >= sizeof(msg_hdr_t))
-@@ -557,7 +563,39 @@ static void handle_blktap_ctrlmsg(void*
+@@ -555,7 +561,39 @@ static void handle_blktap_ctrlmsg(void*
if (s != NULL) {
ret = ((map_new_dev(s, msg_dev->devnum)
== msg_dev->devnum ? 0: -1));
@@ -87,11 +87,11 @@
memset(buf, 0x00, MSG_SIZE);
msglen = sizeof(msg_hdr_t);
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -37,6 +37,8 @@ static QEMUTimer *insert_timer = NULL;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -38,6 +38,8 @@ static QEMUTimer *insert_timer = NULL;
#define UWAIT_MAX (30*1000000) /* thirty seconds */
#define UWAIT (100000) /* 1/10th second */
@@ -100,15 +100,15 @@
static int pasprintf(char **buf, const char *fmt, ...)
{
va_list ap;
-@@ -363,8 +365,33 @@ void xenstore_parse_domain_config(int hv
+@@ -533,8 +535,33 @@ void xenstore_parse_domain_config(int hv
}
}
pstrcpy(bs->filename, sizeof(bs->filename), params);
-- if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0)
-+ if (bdrv_open2(bs, params, 0 /* snapshot */, format) < 0) {
+- if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0)
++ if (bdrv_open2(bs, params, BDRV_O_CACHE_WB /* snapshot and write-back */, format) < 0) {
fprintf(stderr, "qemu: could not open vbd '%s' or hard disk image '%s' (drv '%s' format '%s')\n", buf, params, drv ? drv : "?", format ? format->format_name : "0");
+ } else {
-+ char* snapshot = get_snapshot_name(atoi(e[i]));
++ char* snapshot = get_snapshot_name(atoi(e_danger[i]));
+ if (snapshot) {
+ fprintf(stderr, "Using snapshot %s\n", snapshot);
+ ret = bdrv_snapshot_goto(bs, snapshot);
@@ -135,8 +135,8 @@
}
/* if cdrom pyhsical put a watch on media-present */
if (bdrv_get_type_hint(bs) == BDRV_TYPE_CDROM) {
-@@ -474,6 +485,23 @@ void xenstore_parse_domain_config(int hv
- return;
+@@ -726,6 +753,23 @@ int xenstore_parse_disable_pf_config ()
+ return disable_pf;
}
+
++++++ snapshot-ioemu-save.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,28 +1,17 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/savevm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xen-vl-extra.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xen-vl-extra.c
-@@ -8,12 +8,18 @@
- * there is only one place where this file is included. */
-
- #include "qemu-xen.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/savevm.c
++++ xen-3.4.0-testing/tools/ioemu-remote/savevm.c
+@@ -28,6 +28,7 @@
+ #include "sysemu.h"
+ #include "qemu-timer.h"
+ #include "qemu-char.h"
+#include "block_int.h"
-
- /* forward declarations of things in vl.c */
-
- static int qemu_savevm_state(QEMUFile *f);
- static int qemu_loadvm_state(QEMUFile *f);
-
-+static int bdrv_can_snapshot(BlockDriverState *bs);
-+static int bdrv_snapshot_find(BlockDriverState *bs, QEMUSnapshotInfo *sn_info,
-+ const char *name);
-+
-+
- /* We use simpler state save/load functions for Xen */
-
- void do_savevm(const char *name)
-@@ -85,6 +91,81 @@ void do_loadvm(const char *name)
- vm_start();
+ #include "block.h"
+ #include "audio/audio.h"
+ #include "migration.h"
+@@ -1015,6 +1016,86 @@ static int bdrv_snapshot_find(BlockDrive
+ return ret;
}
+int save_disk_snapshots(const char* name)
@@ -35,11 +24,16 @@
+ int i;
+ int ret = 0;
+
++ /* Deal with all aio submit */
++ qemu_aio_flush();
++ /* Do fsync at backend fs */
++ ret = bdrv_flush_all();
++ if (ret)
++ fprintf(stderr, "Fsync error[%d] when do snapshot[%s]\n", ret, name);
++
+ saved_vm_running = vm_running;
+ vm_stop(0);
+
-+ qemu_aio_flush();
-+
+ /* Ensure that all images support snapshots or are read-only */
+ for(i = 0; i < MAX_DRIVES; i++) {
+ bs = drives_table[i].bdrv;
@@ -100,14 +94,14 @@
+ return ret;
+}
+
- struct qemu_alarm_timer;
- static int unix_start_timer(struct qemu_alarm_timer *t) { return 0; }
- static void unix_stop_timer(struct qemu_alarm_timer *t) { }
-Index: xen-3.3.1-testing/tools/ioemu-remote/i386-dm/helper2.c
+ #ifndef CONFIG_DM
+
+ void do_savevm(const char *name)
+Index: xen-3.4.0-testing/tools/ioemu-remote/i386-dm/helper2.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/i386-dm/helper2.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/i386-dm/helper2.c
-@@ -101,6 +101,9 @@ int send_vcpu = 0;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/i386-dm/helper2.c
++++ xen-3.4.0-testing/tools/ioemu-remote/i386-dm/helper2.c
+@@ -109,6 +109,9 @@ int send_vcpu = 0;
#define NR_CPUS 32
evtchn_port_t ioreq_local_port[NR_CPUS];
@@ -117,7 +111,7 @@
CPUX86State *cpu_x86_init(const char *cpu_model)
{
CPUX86State *env;
-@@ -547,6 +550,7 @@ int main_loop(void)
+@@ -551,6 +554,7 @@ int main_loop(void)
int evtchn_fd = xce_handle == -1 ? -1 : xc_evtchn_fd(xce_handle);
char *qemu_file;
fd_set fds;
@@ -125,7 +119,7 @@
main_loop_prepare();
-@@ -574,11 +578,43 @@ int main_loop(void)
+@@ -578,11 +582,43 @@ int main_loop(void)
main_loop_wait(1); /* For the select() on events */
/* Save the device state */
@@ -173,11 +167,11 @@
/* Wait to be allowed to continue */
while (xen_pause_requested) {
-Index: xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
+Index: xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/qemu-xen.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/qemu-xen.h
-@@ -14,6 +14,15 @@ void qemu_invalidate_map_cache(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/qemu-xen.h
++++ xen-3.4.0-testing/tools/ioemu-remote/qemu-xen.h
+@@ -34,6 +34,15 @@ void qemu_invalidate_map_cache(void)
#define mapcache_lock() ((void)0)
#define mapcache_unlock() ((void)0)
@@ -193,18 +187,18 @@
/* helper2.c */
extern long time_offset;
void timeoffset_get(void);
-@@ -43,6 +52,7 @@ int xenstore_fd(void);
+@@ -68,6 +77,7 @@ int xenstore_fd(void);
void xenstore_process_event(void *opaque);
- void xenstore_record_dm(char *subpath, char *state);
- void xenstore_record_dm_state(char *state);
+ void xenstore_record_dm(const char *subpath, const char *state);
+ void xenstore_record_dm_state(const char *state);
+void xenstore_record_dm_error(char *errmsg);
void xenstore_check_new_media_present(int timeout);
void xenstore_write_vncport(int vnc_display);
void xenstore_read_vncpasswd(int domid, char *pwbuf, size_t pwbuflen);
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
@@ -24,6 +24,7 @@
#include "exec-all.h"
@@ -213,7 +207,7 @@
#include "hw.h"
#include "pci.h"
-@@ -601,6 +602,7 @@ static void xenstore_process_dm_command_
+@@ -849,6 +850,7 @@ static void xenstore_process_dm_command_
{
char *path = NULL, *command = NULL, *par = NULL;
unsigned int len;
@@ -221,7 +215,7 @@
if (pasprintf(&path,
"/local/domain/0/device-model/%u/command", domid) == -1) {
-@@ -613,7 +615,18 @@ static void xenstore_process_dm_command_
+@@ -861,7 +863,18 @@ static void xenstore_process_dm_command_
if (!strncmp(command, "save", len)) {
fprintf(logfile, "dm-command: pause and save state\n");
@@ -241,7 +235,7 @@
} else if (!strncmp(command, "continue", len)) {
fprintf(logfile, "dm-command: continue after state save\n");
xen_pause_requested = 0;
-@@ -677,6 +690,13 @@ void xenstore_record_dm_state(char *stat
+@@ -966,6 +979,13 @@ void xenstore_record_dm_state(const char
xenstore_record_dm("state", state);
}
++++++ snapshot-xend.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,17 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -447,6 +447,12 @@ class ImageHandler:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -447,7 +447,7 @@ class ImageHandler:
+ # have a callback but sadly we don't have Twisted in xend
+ self.sentinel_thread = thread.start_new_thread(self._sentinel_watch,())
+
+- def signalDeviceModel(self, cmd, ret, par = None):
++ def signalDeviceModel(self, cmd, ret, par = None, timeout = True):
+ if self.device_model is None:
+ return
+ # Signal the device model to for action
+@@ -470,10 +470,17 @@ class ImageHandler:
while state != ret:
state = xstransact.Read("/local/domain/0/device-model/%i/state"
% self.vm.getDomid())
@@ -13,37 +22,45 @@
+ raise VmError(msg)
+
time.sleep(0.1)
- count += 1
- if count > 100:
-@@ -476,6 +482,10 @@ class ImageHandler:
- # but this can easily lead to very rapid restart loops against
- # which we currently have no protection
+- count += 1
+- if count > 100:
+- raise VmError('Timed out waiting for device model action')
++ if timeout:
++ count += 1
++ if count > 100:
++ raise VmError('Timed out waiting for device model action')
+
+ #resotre orig state
+ xstransact.Store("/local/domain/0/device-model/%i"
+@@ -498,6 +505,10 @@ class ImageHandler:
+ except:
+ pass
+ def snapshotDeviceModel(self, name):
+ # Signal the device model to perform snapshot operation
-+ self.signalDeviceModel('snapshot', 'paused', name)
++ self.signalDeviceModel('snapshot', 'paused', name, False)
+
def recreate(self):
if self.device_model is None:
return
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/blkif.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/blkif.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
-@@ -84,6 +84,9 @@ class BlkifController(DevController):
- if uuid:
- back['uuid'] = uuid
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/blkif.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/blkif.py
+@@ -88,6 +88,9 @@ class BlkifController(DevController):
+ if bootable != None:
+ back['bootable'] = str(bootable)
+ if 'snapshotname' in self.vm.info:
+ back['snapshot'] = self.vm.info['snapshotname']
+
- if security.on() == xsconstants.XS_POLICY_ACM:
+ if security.on() == xsconstants.XS_POLICY_USE:
self.do_access_control(config, uname)
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
@@ -95,6 +95,31 @@ class SrvDomain(SrvDir):
def do_save(self, _, req):
return self.xd.domain_save(self.dom.domid, req.args['file'][0])
@@ -76,7 +93,7 @@
def op_dump(self, op, req):
self.acceptCommand(req)
return req.threadRequest(self.do_dump, op, req)
-@@ -230,7 +255,7 @@ class SrvDomain(SrvDir):
+@@ -231,7 +256,7 @@ class SrvDomain(SrvDir):
def render_GET(self, req):
op = req.args.get('op')
@@ -85,25 +102,20 @@
return self.perform(req)
#
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendCheckpoint.py
-@@ -65,10 +65,12 @@ def insert_after(list, pred, value):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -65,7 +65,7 @@ def insert_after(list, pred, value):
return
-def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
+def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1, name=None, diskonly=False):
- write_exact(fd, SIGNATURE, "could not write guest state file: signature")
-
- sxprep = dominfo.sxpr()
-+ if name:
-+ sxprep.append(['snapshotname', name])
-
- if node > -1:
- insert_after(sxprep,'vcpus',['node', str(node)])
-@@ -91,52 +93,60 @@ def save(fd, dominfo, network, live, dst
+ try:
+ if not os.path.isdir("/var/lib/xen"):
+ os.makedirs("/var/lib/xen")
+@@ -98,52 +98,59 @@ def save(fd, dominfo, network, live, dst
image_cfg = dominfo.info.get('image', {})
hvm = dominfo.info.is_hvm()
@@ -123,7 +135,7 @@
- if line == "suspend":
- log.debug("Suspending %d ...", dominfo.getDomid())
- dominfo.shutdown('suspend')
-- dominfo.waitForShutdown()
+- dominfo.waitForSuspend()
- if line in ('suspend', 'suspended'):
- dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
- domain_name)
@@ -161,7 +173,7 @@
+ # libxenguest; see the comments and/or code in xc_linux_save() for
+ # more information.
+ cmd = [xen.util.auxbin.pathTo(XC_SAVE), str(fd),
-+ str(dominfo.getDomid()), "0", "0",
++ str(dominfo.getDomid()), "0", "0",
+ str(int(live) | (int(hvm) << 2)) ]
+ log.debug("[xc_save]: %s", string.join(cmd))
+
@@ -170,7 +182,7 @@
+ if line == "suspend":
+ log.debug("Suspending %d ...", dominfo.getDomid())
+ dominfo.shutdown('suspend')
-+ dominfo.waitForShutdown()
++ dominfo.waitForSuspend()
+ if line in ('suspend', 'suspended'):
+ dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
+ domain_name)
@@ -206,11 +218,10 @@
+
+ if name:
+ dominfo.image.snapshotDeviceModel(name)
-+
if checkpoint:
dominfo.resumeDomain()
-@@ -193,6 +203,63 @@ def restore(xd, fd, dominfo = None, paus
+@@ -207,6 +214,71 @@ def restore(xd, fd, dominfo = None, paus
if othervm is not None and othervm.domid is not None:
raise VmError("Domain '%s' already exists with ID '%d'" % (domconfig["name_label"], othervm.domid))
@@ -222,7 +233,7 @@
+ ret = False
+ if cur < end:
+ ret = True
-+
++
+ os.lseek(fd, cur, 0)
+ return ret
+ except OSError, (errno, strerr):
@@ -247,10 +258,13 @@
+ dominfo.waitForDevices() # Wait for backends to set up
+ except Exception, exn:
+ log.exception(exn)
++ if lock:
++ XendDomain.instance().domains_lock.acquire()
++ raise
+
+ if lock:
+ XendDomain.instance().domains_lock.acquire()
-+
++
+
+ if not contains_state(fd):
+ # Disk-only snapshot. Just start the vm from config (which should
@@ -265,16 +279,21 @@
+ log.debug("### starting domain through XendDomain.create()")
+ dominfo = xd.domain_create(vmconfig)
+
-+ wait_devs(dominfo)
++ try:
++ wait_devs(dominfo)
++ except:
++ dominfo.destroy()
++ raise
++
+ dominfo.unpause()
-+
++
+ # Done if disk only snapshot
+ return dominfo
-+
++
if dominfo:
dominfo.resume()
else:
-@@ -308,27 +375,8 @@ def restore(xd, fd, dominfo = None, paus
+@@ -322,26 +394,7 @@ def restore(xd, fd, dominfo = None, paus
dominfo.completeRestore(handler.store_mfn, handler.console_mfn)
@@ -298,37 +317,35 @@
-
- if lock:
- XendDomain.instance().domains_lock.acquire()
--
+ wait_devs(dominfo)
-+
+
if not paused:
dominfo.unpause()
-
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendConfig.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
-@@ -209,6 +209,7 @@ XENAPI_CFG_TYPES = {
- 'cpuid_check' : dict,
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendConfig.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendConfig.py
+@@ -220,6 +220,7 @@ XENAPI_CFG_TYPES = {
'machine_address_size': int,
'suppress_spurious_page_faults': bool0,
+ 's3_integrity' : int,
+ 'snapshotname': str,
}
# List of legacy configuration keys that have no equivalent in the
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomain.py
@@ -52,6 +52,7 @@ from xen.xend.xenstore.xstransact import
from xen.xend.xenstore.xswatch import xswatch
- from xen.util import mkdir
+ from xen.util import mkdir, rwlock
from xen.xend import uuid
+from xen.xend import sxp
xc = xen.lowlevel.xc.xc()
xoptions = XendOptions.instance()
-@@ -1400,6 +1401,181 @@ class XendDomain:
+@@ -1418,6 +1419,181 @@ class XendDomain:
raise XendError("can't write guest state file %s: %s" %
(dst, ex[1]))
@@ -343,7 +360,7 @@
+ @type dst: bool
+ @rtype: None
+ @raise XendError: Failed to snapshot domain
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -405,7 +422,7 @@
+ @param domid: Domain ID or Name
+ @type domid: int or string.
+ @rtype: list of snapshot names
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -417,7 +434,7 @@
+
+ if not os.access(snap_path, os.R_OK):
+ return []
-+
++
+ return os.listdir(snap_path)
+
+ except:
@@ -432,7 +449,7 @@
+ @type dst: string
+ @rtype: None
+ @raise XendError: Failed to apply snapshot
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ try:
+ dominfo = self.domain_lookup_nr(domid)
@@ -473,7 +490,7 @@
+ @param name: Snapshot name
+ @type domid: string
+ @rtype: None
-+ @raise XendInvalidDomain: Domain is not valid
++ @raise XendInvalidDomain: Domain is not valid
+ """
+ dominfo = self.domain_lookup_nr(domid)
+ if not dominfo:
@@ -510,11 +527,11 @@
def domain_pincpu(self, domid, vcpu, cpumap):
"""Set which cpus vcpu can use
-Index: xen-3.3.1-testing/tools/python/xen/xm/main.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/main.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/main.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/main.py
-@@ -126,6 +126,14 @@ SUBCOMMAND_HELP = {
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/main.py
++++ xen-3.4.0-testing/tools/python/xen/xm/main.py
+@@ -120,6 +120,14 @@ SUBCOMMAND_HELP = {
'Restore a domain from a saved state.'),
'save' : ('[-c] <Domain> <CheckpointFile>',
'Save a domain state to restore later.'),
@@ -529,7 +546,7 @@
'shutdown' : ('<Domain> [-waRH]', 'Shutdown a domain.'),
'top' : ('', 'Monitor a host and the domains in real time.'),
'unpause' : ('<Domain>', 'Unpause a paused domain.'),
-@@ -282,6 +290,9 @@ SUBCOMMAND_OPTIONS = {
+@@ -276,6 +284,9 @@ SUBCOMMAND_OPTIONS = {
'save': (
('-c', '--checkpoint', 'Leave domain running after creating snapshot'),
),
@@ -539,7 +556,7 @@
'restore': (
('-p', '--paused', 'Do not unpause domain after restoring it'),
),
-@@ -308,6 +319,10 @@ common_commands = [
+@@ -302,6 +313,10 @@ common_commands = [
"restore",
"resume",
"save",
@@ -550,7 +567,7 @@
"shell",
"shutdown",
"start",
-@@ -339,6 +354,10 @@ domain_commands = [
+@@ -333,6 +348,10 @@ domain_commands = [
"restore",
"resume",
"save",
@@ -561,14 +578,14 @@
"shutdown",
"start",
"suspend",
-@@ -730,6 +749,62 @@ def xm_event_monitor(args):
+@@ -724,6 +743,62 @@ def xm_event_monitor(args):
#
#########################################################################
+def xm_snapshot_create(args):
+
+ arg_check(args, "snapshot-create", 2, 3)
-+
++
+ try:
+ (options, params) = getopt.gnu_getopt(args, 'd', ['diskonly'])
+ except getopt.GetoptError, opterr:
@@ -584,7 +601,7 @@
+ err("Wrong number of parameters")
+ usage('snapshot-create')
+
-+ if serverType == SERVER_XEN_API:
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_create(get_single_vm(params[0]), params[1], diskonly)
+ else:
+ server.xend.domain.snapshot_create(params[0], params[1], diskonly)
@@ -593,7 +610,7 @@
+ arg_check(args, "snapshot-list", 1, 2)
+
+ snapshots = None
-+ if serverType == SERVER_XEN_API:
++ if serverType == SERVER_XEN_API:
+ snapshots = server.xenapi.VM.snapshot_list(get_single_vm(args[0]))
+ else:
+ snapshots = server.xend.domain.snapshot_list(args[0])
@@ -607,16 +624,16 @@
+
+def xm_snapshot_apply(args):
+ arg_check(args, "snapshot-apply", 2, 3)
-+
-+ if serverType == SERVER_XEN_API:
++
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_apply(get_single_vm(args[0]), args[1])
+ else:
+ server.xend.domain.snapshot_apply(args[0], args[1])
-+
++
+def xm_snapshot_delete(args):
+ arg_check(args, "snapshot-delete", 2, 3)
-+
-+ if serverType == SERVER_XEN_API:
++
++ if serverType == SERVER_XEN_API:
+ server.xenapi.VM.snapshot_delete(get_single_vm(args[0]), args[1])
+ else:
+ server.xend.domain.snapshot_delete(args[0], args[1])
@@ -624,7 +641,7 @@
def xm_save(args):
arg_check(args, "save", 2, 3)
-@@ -2762,6 +2837,10 @@ commands = {
+@@ -2853,6 +2928,10 @@ commands = {
"restore": xm_restore,
"resume": xm_resume,
"save": xm_save,
++++++ supported_module.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -2,10 +2,10 @@
Signed-off-by: K. Y. Srinivasan
-Index: xen-3.3.1-testing/unmodified_drivers/linux-2.6/Module.supported
+Index: xen-3.4.0-testing/unmodified_drivers/linux-2.6/Module.supported
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/unmodified_drivers/linux-2.6/Module.supported
++++ xen-3.4.0-testing/unmodified_drivers/linux-2.6/Module.supported
@@ -0,0 +1,5 @@
+xen-vbd
+xen-platform-pci
++++++ svm-lmsl.patch ++++++
Index: xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/hvm.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
@@ -537,11 +537,12 @@ static int hvm_load_cpu_ctxt(struct doma
return -EINVAL;
}
- if ( (ctxt.msr_efer & ~(EFER_FFXSE | EFER_LME | EFER_LMA |
+ if ( (ctxt.msr_efer & ~(EFER_FFXSE | EFER_LMSLE | EFER_LME | EFER_LMA |
EFER_NX | EFER_SCE)) ||
((sizeof(long) != 8) && (ctxt.msr_efer & EFER_LME)) ||
(!cpu_has_nx && (ctxt.msr_efer & EFER_NX)) ||
(!cpu_has_syscall && (ctxt.msr_efer & EFER_SCE)) ||
+ (!cpu_has_lmsl && (ctxt.msr_efer & EFER_LMSLE)) ||
(!cpu_has_ffxsr && (ctxt.msr_efer & EFER_FFXSE)) ||
((ctxt.msr_efer & (EFER_LME|EFER_LMA)) == EFER_LMA) )
{
@@ -818,10 +819,11 @@ int hvm_set_efer(uint64_t value)
value &= ~EFER_LMA;
- if ( (value & ~(EFER_FFXSE | EFER_LME | EFER_NX | EFER_SCE)) ||
+ if ( (value & ~(EFER_FFXSE | EFER_LMSLE | EFER_LME | EFER_NX | EFER_SCE)) ||
((sizeof(long) != 8) && (value & EFER_LME)) ||
(!cpu_has_nx && (value & EFER_NX)) ||
(!cpu_has_syscall && (value & EFER_SCE)) ||
+ (!cpu_has_lmsl && (value & EFER_LMSLE)) ||
(!cpu_has_ffxsr && (value & EFER_FFXSE)) )
{
gdprintk(XENLOG_WARNING, "Trying to set reserved bit in "
Index: xen-3.4.0-testing/xen/arch/x86/hvm/svm/svm.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/svm/svm.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/svm/svm.c
@@ -53,6 +53,11 @@
u32 svm_feature_flags;
+#ifdef __x86_64__
+/* indicate whether guest may use EFER.LMSLE */
+unsigned char cpu_has_lmsl = 0;
+#endif
+
#define set_segment_register(name, value) \
asm volatile ( "movw %%ax ,%%" STR(name) "" : : "a" (value) )
@@ -875,6 +880,22 @@ int start_svm(struct cpuinfo_x86 *c)
/* Initialize core's ASID handling. */
svm_asid_init(c);
+#ifdef __x86_64__
+ /*
+ * Check whether EFER.LMSLE can be written.
+ * Unfortunately there's no feature bit defined for this.
+ */
+ eax = read_efer();
+ edx = read_efer() >> 32;
+ if ( wrmsr_safe(MSR_EFER, eax | EFER_LMSLE, edx) == 0 )
+ rdmsr(MSR_EFER, eax, edx);
+ if ( eax & EFER_LMSLE )
+ {
+ cpu_has_lmsl = 1;
+ wrmsr(MSR_EFER, eax ^ EFER_LMSLE, edx);
+ }
+#endif
+
if ( cpu != 0 )
return 1;
Index: xen-3.4.0-testing/xen/include/asm-x86/hvm/hvm.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/hvm/hvm.h
+++ xen-3.4.0-testing/xen/include/asm-x86/hvm/hvm.h
@@ -134,6 +134,12 @@ struct hvm_function_table {
extern struct hvm_function_table hvm_funcs;
extern int hvm_enabled;
+#ifdef __i386__
+# define cpu_has_lmsl 0
+#else
+extern unsigned char cpu_has_lmsl;
+#endif
+
int hvm_domain_initialise(struct domain *d);
void hvm_domain_relinquish_resources(struct domain *d);
void hvm_domain_destroy(struct domain *d);
++++++ tapdisk-ioemu-logfile.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,21 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
+From 903a145f3eace5e3ae914f0335ab6c4e33635d2f Mon Sep 17 00:00:00 2001
+From: Kevin Wolf
+Date: Tue, 10 Mar 2009 16:36:23 +0100
+Subject: [PATCH 4/6] tapdisk-ioemu: Write messages to a logfile
+
+Typically, tapdisk-ioemu runs as a daemon and messages to stderr are
+simply lost. Write them to a logfile instead.
+
+Signed-off-by: Kevin Wolf
+---
+ tapdisk-ioemu.c | 19 +++++++++++++------
+ 1 files changed, 13 insertions(+), 6 deletions(-)
+
+Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
-@@ -100,16 +100,23 @@ int main(void)
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
++++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
+@@ -78,15 +78,22 @@ int main(void)
struct timeval tv;
void *old_fd_start = NULL;
@@ -13,7 +26,6 @@
+ exit(0);
+
bdrv_init();
- qemu_aio_init();
init_blktap();
- /* Daemonize */
++++++ tapdisk-ioemu-shutdown-fix.patch ++++++
From 9062564d79cb45029403cc998b48410e42ead924 Mon Sep 17 00:00:00 2001
From: Kevin Wolf
Date: Tue, 10 Mar 2009 16:45:44 +0100
Subject: [PATCH 6/6] tapdisk-ioemu: Fix shutdown condition
Even when opening the only image a tapdisk-ioemu instance is
responsible for fails, it can't immediately shut down. blktapctrl
still wants to communicate with tapdisk-ioemu and close the disk.
This patch changes tapdisk-ioemu to count the connections to
blktapctrl rather than the number of opened disk images.
Signed-off-by: Kevin Wolf
---
hw/xen_blktap.c | 5 ++++-
tapdisk-ioemu.c | 13 ++++++++++---
2 files changed, 14 insertions(+), 4 deletions(-)
Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_blktap.c
+++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_blktap.c
@@ -65,6 +65,7 @@ int read_fd;
int write_fd;
static pid_t process;
+int connected_disks = 0;
fd_list_entry_t *fd_start = NULL;
extern char* get_snapshot_name(int devid);
@@ -547,6 +548,7 @@ static void handle_blktap_ctrlmsg(void*
/* Allocate the disk structs */
s = state_init();
+ connected_disks++;
/*Open file*/
if (s == NULL || open_disk(s, path, msg->drivertype, msg->readonly)) {
@@ -629,7 +631,8 @@ static void handle_blktap_ctrlmsg(void*
case CTLMSG_CLOSE:
s = get_state(msg->cookie);
if (s) unmap_disk(s);
- break;
+ connected_disks--;
+ break;
case CTLMSG_PID:
memset(buf, 0x00, MSG_SIZE);
Index: xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
===================================================================
--- xen-3.4.0-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
+++ xen-3.4.0-testing/tools/ioemu-remote/tapdisk-ioemu.c
@@ -14,6 +14,7 @@ extern void qemu_aio_init(void);
extern void qemu_aio_poll(void);
extern void *fd_start;
+extern int connected_disks;
int domid = 0;
FILE* logfile;
@@ -76,7 +77,7 @@ int main(void)
int max_fd;
fd_set rfds;
struct timeval tv;
- void *old_fd_start = NULL;
+ int old_connected_disks = 0;
/* Daemonize */
if (fork() != 0)
@@ -128,11 +129,17 @@ int main(void)
pioh = &ioh->next;
}
+ if (old_connected_disks != connected_disks)
+ fprintf(stderr, "connected disks: %d => %d\n",
+ old_connected_disks, connected_disks);
+
/* Exit when the last image has been closed */
- if (old_fd_start != NULL && fd_start == NULL)
+ if (old_connected_disks != 0 && connected_disks == 0) {
+ fprintf(stderr, "Last image is closed, exiting.\n");
exit(0);
+ }
- old_fd_start = fd_start;
+ old_connected_disks = connected_disks;
}
return 0;
}
++++++ tmp_build.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
-@@ -60,6 +60,7 @@ $(CLIENTS_DOMU): xenstore
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
+@@ -56,6 +56,7 @@ $(CLIENTS_DOMU): xenstore
xenstore: xenstore_client.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
@@ -10,11 +10,11 @@
xenstore-control: xenstore_control.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
-@@ -108,10 +109,11 @@ install: all
+@@ -104,10 +105,11 @@ install: all
$(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
- $(INSTALL_PROG) xenstore $(DESTDIR)/usr/bin
+ $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
set -e ; for c in $(CLIENTS) ; do \
-- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
+- ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
+ ln -fs /usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
done
+ $(INSTALL_PROG) domu-xenstore $(DESTDIR)/bin
++++++ tools-gdbserver-build.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
+Index: xen-3.4.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
===================================================================
---- xen-3.3.1-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
-+++ xen-3.3.1-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
+--- xen-3.4.0-testing.orig/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
++++ xen-3.4.0-testing/tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/Makefile.in
@@ -90,7 +90,7 @@ INCLUDE_CFLAGS = -I. -I${srcdir} -I$(src
GLOBAL_CFLAGS = ${MT_CFLAGS} ${MH_CFLAGS}
#PROFILE_CFLAGS = -pg
++++++ tools-kboot.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -13,10 +13,10 @@
tools/kboot/select-kernel | 59 +
9 files changed, 2111 insertions(+)
-Index: xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
+Index: xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
++++ xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_32
@@ -0,0 +1,874 @@
+#
+# Automatically generated make config: don't edit
@@ -892,10 +892,10 @@
+CONFIG_X86_NO_TSS=y
+CONFIG_X86_NO_IDT=y
+CONFIG_KTIME_SCALAR=y
-Index: xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
+Index: xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
++++ xen-3.4.0-testing/buildconfigs/linux-defconfig_xenUboot_x86_64
@@ -0,0 +1,653 @@
+#
+# Automatically generated make config: don't edit
@@ -1550,17 +1550,17 @@
+# CONFIG_CRC32 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
-Index: xen-3.3.1-testing/buildconfigs/mk.linux-2.6-xenUboot
+Index: xen-3.4.0-testing/buildconfigs/mk.linux-2.6-xenUboot
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/buildconfigs/mk.linux-2.6-xenUboot
++++ xen-3.4.0-testing/buildconfigs/mk.linux-2.6-xenUboot
@@ -0,0 +1,2 @@
+EXTRAVERSION = xenUboot
+include buildconfigs/mk.linux-2.6-xen
-Index: xen-3.3.1-testing/tools/kboot/Makefile
+Index: xen-3.4.0-testing/tools/kboot/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/Makefile
++++ xen-3.4.0-testing/tools/kboot/Makefile
@@ -0,0 +1,23 @@
+#
+# tools/kboot/Makefile
@@ -1585,10 +1585,10 @@
+kboot.initramfs: mkinitramfs init select-kernel ../xcutils/xc_kexec
+ sh ./mkinitramfs | tee $@
+
-Index: xen-3.3.1-testing/tools/kboot/README
+Index: xen-3.4.0-testing/tools/kboot/README
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/README
++++ xen-3.4.0-testing/tools/kboot/README
@@ -0,0 +1,43 @@
+
+This is a simple kexec-based boot loader
@@ -1633,10 +1633,10 @@
+
+--
+Gerd Hoffmann
-Index: xen-3.3.1-testing/tools/kboot/init
+Index: xen-3.4.0-testing/tools/kboot/init
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/init
++++ xen-3.4.0-testing/tools/kboot/init
@@ -0,0 +1,309 @@
+#!/bin/sh
+
@@ -1947,10 +1947,10 @@
+msg "bye ..."
+banner "boot $guestos"
+xc_kexec -e
-Index: xen-3.3.1-testing/tools/kboot/mkinitramfs
+Index: xen-3.4.0-testing/tools/kboot/mkinitramfs
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/mkinitramfs
++++ xen-3.4.0-testing/tools/kboot/mkinitramfs
@@ -0,0 +1,111 @@
+#!/bin/sh
+
@@ -2063,10 +2063,10 @@
+ echo "file $LIB/$(basename $lib) $lib 0755 0 0"
+done
+echo
-Index: xen-3.3.1-testing/tools/kboot/select-kernel
+Index: xen-3.4.0-testing/tools/kboot/select-kernel
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/kboot/select-kernel
++++ xen-3.4.0-testing/tools/kboot/select-kernel
@@ -0,0 +1,59 @@
+#!/bin/sh
+
@@ -2127,10 +2127,10 @@
+msg "using $kernelname"
+echo "$kernelname"
+
-Index: xen-3.3.1-testing/make-kboot
+Index: xen-3.4.0-testing/make-kboot
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/make-kboot
++++ xen-3.4.0-testing/make-kboot
@@ -0,0 +1,37 @@
+#!/bin/sh
+
++++++ tools-xc_kexec.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -23,20 +23,20 @@
tools/xcutils/xc_kexec.c | 503 +++++++++++++++
19 files changed, 4988 insertions(+), 2 deletions(-)
-Index: xen-3.3.1-testing/tools/xcutils/Makefile
+Index: xen-3.4.0-testing/tools/xcutils/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xcutils/Makefile
-+++ xen-3.3.1-testing/tools/xcutils/Makefile
-@@ -18,7 +18,7 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_
- CFLAGS += -Wp,-MD,.$(@F).d
- PROG_DEP = .*.d
+--- xen-3.4.0-testing.orig/tools/xcutils/Makefile
++++ xen-3.4.0-testing/tools/xcutils/Makefile
+@@ -14,7 +14,7 @@ include $(XEN_ROOT)/tools/Rules.mk
+ CFLAGS += -Werror
+ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
-PROGRAMS = xc_restore xc_save readnotes lsevtchn
+PROGRAMS = xc_restore xc_save readnotes lsevtchn xc_kexec
LDLIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
-@@ -31,6 +31,11 @@ build: $(PROGRAMS)
+@@ -27,6 +27,11 @@ build: $(PROGRAMS)
$(PROGRAMS): %: %.o
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
@@ -48,17 +48,17 @@
.PHONY: install
install: build
$(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-@@ -41,5 +46,6 @@ install: build
+@@ -37,5 +42,6 @@ install: build
clean:
$(RM) *.o $(PROGRAMS)
- $(RM) $(PROG_DEP)
+ $(RM) $(DEPS)
+ make -C helper clean
- -include $(PROG_DEP)
-Index: xen-3.3.1-testing/tools/xcutils/helper/Makefile
+ -include $(DEPS)
+Index: xen-3.4.0-testing/tools/xcutils/helper/Makefile
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/Makefile
++++ xen-3.4.0-testing/tools/xcutils/helper/Makefile
@@ -0,0 +1,39 @@
+
+XEN_ROOT = ../../..
@@ -99,10 +99,10 @@
+# dependencies
+
+$(XEN_TARGET_ARCH)/entry.o: $(XEN_TARGET_ARCH)/entry.S $(XEN_TARGET_ARCH)/offsets.h
-Index: xen-3.3.1-testing/tools/xcutils/helper/console.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/console.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/console.c
++++ xen-3.4.0-testing/tools/xcutils/helper/console.c
@@ -0,0 +1,69 @@
+#include
+
@@ -173,10 +173,10 @@
+
+ return printed_len;
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/ctype.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/ctype.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/ctype.c
++++ xen-3.4.0-testing/tools/xcutils/helper/ctype.c
@@ -0,0 +1,35 @@
+/*
+ * linux/lib/ctype.c
@@ -213,10 +213,10 @@
+_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */
+
+EXPORT_SYMBOL(_ctype);
-Index: xen-3.3.1-testing/tools/xcutils/helper/ctype.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/ctype.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/ctype.h
++++ xen-3.4.0-testing/tools/xcutils/helper/ctype.h
@@ -0,0 +1,54 @@
+#ifndef _LINUX_CTYPE_H
+#define _LINUX_CTYPE_H
@@ -272,10 +272,10 @@
+#define toupper(c) __toupper(c)
+
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/helper.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/helper.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/helper.h
++++ xen-3.4.0-testing/tools/xcutils/helper/helper.h
@@ -0,0 +1,107 @@
+#include
+#include
@@ -384,10 +384,10 @@
+int sprintf(char * buf, const char *fmt, ...);
+int vsscanf(const char * buf, const char * fmt, va_list args);
+int sscanf(const char * buf, const char * fmt, ...);
-Index: xen-3.3.1-testing/tools/xcutils/helper/main.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/main.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/main.c
++++ xen-3.4.0-testing/tools/xcutils/helper/main.c
@@ -0,0 +1,651 @@
+#include
+#include "hypercall.h"
@@ -1040,10 +1040,10 @@
+ printk("\r\n");
+ start_kernel();
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/make-offsets.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/make-offsets.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/make-offsets.c
++++ xen-3.4.0-testing/tools/xcutils/helper/make-offsets.c
@@ -0,0 +1,28 @@
+#include
+#include
@@ -1073,10 +1073,10 @@
+ vcpu_off("cr3", ctrlreg[3]);
+ return 0;
+}
-Index: xen-3.3.1-testing/tools/xcutils/helper/printk.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/printk.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/printk.c
++++ xen-3.4.0-testing/tools/xcutils/helper/printk.c
@@ -0,0 +1,1051 @@
+/*
+ * linux/kernel/printk.c
@@ -2129,10 +2129,10 @@
+ printk_ratelimit_burst);
+}
+EXPORT_SYMBOL(printk_ratelimit);
-Index: xen-3.3.1-testing/tools/xcutils/helper/string.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/string.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/string.c
++++ xen-3.4.0-testing/tools/xcutils/helper/string.c
@@ -0,0 +1,601 @@
+/*
+ * linux/lib/string.c
@@ -2735,10 +2735,10 @@
+}
+EXPORT_SYMBOL(memchr);
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/vsprintf.c
+Index: xen-3.4.0-testing/tools/xcutils/helper/vsprintf.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/vsprintf.c
++++ xen-3.4.0-testing/tools/xcutils/helper/vsprintf.c
@@ -0,0 +1,842 @@
+/*
+ * linux/lib/vsprintf.c
@@ -3582,10 +3582,10 @@
+}
+
+EXPORT_SYMBOL(sscanf);
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/div64.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/div64.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/div64.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/div64.h
@@ -0,0 +1,48 @@
+#ifndef __I386_DIV64
+#define __I386_DIV64
@@ -3635,10 +3635,10 @@
+
+}
+#endif
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/entry.S
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/entry.S
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/entry.S
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/entry.S
@@ -0,0 +1,49 @@
+#include "offsets.h"
+
@@ -3689,10 +3689,10 @@
+ nop
+ .align 4096
+hypercall_end:
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_32/hypercall.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_32/hypercall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_32/hypercall.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_32/hypercall.h
@@ -0,0 +1,359 @@
+/******************************************************************************
+ * hypercall.h
@@ -4053,10 +4053,10 @@
+
+
+#endif /* __HYPERCALL_H__ */
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/div64.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/div64.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/div64.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/div64.h
@@ -0,0 +1,57 @@
+#ifndef _ASM_GENERIC_DIV64_H
+#define _ASM_GENERIC_DIV64_H
@@ -4115,10 +4115,10 @@
+#endif /* BITS_PER_LONG */
+
+#endif /* _ASM_GENERIC_DIV64_H */
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/entry.S
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/entry.S
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/entry.S
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/entry.S
@@ -0,0 +1,50 @@
+#include "offsets.h"
+
@@ -4170,10 +4170,10 @@
+ nop
+ .align 4096
+hypercall_end:
-Index: xen-3.3.1-testing/tools/xcutils/helper/x86_64/hypercall.h
+Index: xen-3.4.0-testing/tools/xcutils/helper/x86_64/hypercall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/helper/x86_64/hypercall.h
++++ xen-3.4.0-testing/tools/xcutils/helper/x86_64/hypercall.h
@@ -0,0 +1,354 @@
+/******************************************************************************
+ * hypercall.h
@@ -4529,10 +4529,10 @@
+}
+
+#endif /* __HYPERCALL_H__ */
-Index: xen-3.3.1-testing/tools/xcutils/kexec-syscall.h
+Index: xen-3.4.0-testing/tools/xcutils/kexec-syscall.h
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/kexec-syscall.h
++++ xen-3.4.0-testing/tools/xcutils/kexec-syscall.h
@@ -0,0 +1,80 @@
+#ifndef KEXEC_SYSCALL_H
+#define KEXEC_SYSCALL_H
@@ -4614,10 +4614,10 @@
+#define KEXEC_MAX_SEGMENTS 16
+
+#endif /* KEXEC_SYSCALL_H */
-Index: xen-3.3.1-testing/tools/xcutils/xc_kexec.c
+Index: xen-3.4.0-testing/tools/xcutils/xc_kexec.c
===================================================================
--- /dev/null
-+++ xen-3.3.1-testing/tools/xcutils/xc_kexec.c
++++ xen-3.4.0-testing/tools/xcutils/xc_kexec.c
@@ -0,0 +1,503 @@
+#include
+#include
@@ -4629,7 +4629,7 @@
+
+#include
+#include
-+#include
++#include
+
+#include "kexec-syscall.h"
+
++++++ udev-rules.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:24.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:24.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/examples/xen-backend.rules
+Index: xen-3.4.0-testing/tools/hotplug/Linux/xen-backend.rules
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xen-backend.rules
-+++ xen-3.3.1-testing/tools/examples/xen-backend.rules
-@@ -7,3 +7,4 @@ SUBSYSTEM=="xen-backend", KERNEL=="vscsi
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/xen-backend.rules
++++ xen-3.4.0-testing/tools/hotplug/Linux/xen-backend.rules
+@@ -6,3 +6,4 @@ SUBSYSTEM=="xen-backend", KERNEL=="vscsi
SUBSYSTEM=="xen-backend", ACTION=="remove", RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
KERNEL=="evtchn", NAME="xen/%k"
KERNEL=="blktap[0-9]*", NAME="xen/%k"
++++++ x86_64-5Tb.patch ++++++
Index: xen-3.4.0-testing/xen/arch/x86/boot/head.S
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/boot/head.S
+++ xen-3.4.0-testing/xen/arch/x86/boot/head.S
@@ -33,7 +33,7 @@ ENTRY(start)
/* Checksum: must be the negated sum of the first two fields. */
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
- .section .init.text
+ .section .init.text, "ax"
.Lbad_cpu_msg: .asciz "ERR: Not a 64-bit CPU!"
.Lbad_ldr_msg: .asciz "ERR: Not a Multiboot bootloader!"
@@ -128,13 +128,13 @@ __start:
loop 1b
/* Initialise L3 xen-map page directory entry. */
mov $(sym_phys(l2_xenmap)+7),%eax
- mov %eax,sym_phys(l3_xenmap) + (50*8)
+ mov %eax,sym_phys(l3_xenmap) + l3_table_offset(XEN_VIRT_START)*8
/* Hook identity-map and xen-map L3 tables into PML4. */
mov $(sym_phys(l3_identmap)+7),%eax
mov %eax,sym_phys(idle_pg_table) + ( 0*8) /* PML4[ 0]: 1:1 map */
- mov %eax,sym_phys(idle_pg_table) + (262*8) /* PML4[262]: 1:1 map */
+ mov %eax,sym_phys(idle_pg_table) + l4_table_offset(DIRECTMAP_VIRT_START)*8
mov $(sym_phys(l3_xenmap)+7),%eax
- mov %eax,sym_phys(idle_pg_table) + (261*8) /* PML4[261]: xen map */
+ mov %eax,sym_phys(idle_pg_table) + l4_table_offset(XEN_VIRT_START)*8
#else
/* Initialize low and high mappings of memory with 2MB pages */
mov $sym_phys(idle_pg_table_l2),%edi
Index: xen-3.4.0-testing/xen/arch/x86/e820.c
===================================================================
--- xen-3.4.0-testing.orig/xen/arch/x86/e820.c
+++ xen-3.4.0-testing/xen/arch/x86/e820.c
@@ -467,15 +467,19 @@ static void __init machine_specific_memo
"can be accessed by Xen in 32-bit mode.");
#else
{
- unsigned long limit, mpt_limit, pft_limit;
+ unsigned long limit, mpt_limit, ro_mpt_limit, pft_limit;
limit = DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START;
mpt_limit = ((RDWR_MPT_VIRT_END - RDWR_MPT_VIRT_START)
/ sizeof(unsigned long)) << PAGE_SHIFT;
+ ro_mpt_limit = ((RO_MPT_VIRT_END - RO_MPT_VIRT_START)
+ / sizeof(unsigned long)) << PAGE_SHIFT;
pft_limit = ((FRAMETABLE_VIRT_END - FRAMETABLE_VIRT_START)
/ sizeof(struct page_info)) << PAGE_SHIFT;
if ( limit > mpt_limit )
limit = mpt_limit;
+ if ( limit > ro_mpt_limit )
+ limit = ro_mpt_limit;
if ( limit > pft_limit )
limit = pft_limit;
clip_to_limit(limit,
Index: xen-3.4.0-testing/xen/include/asm-x86/config.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/config.h
+++ xen-3.4.0-testing/xen/include/asm-x86/config.h
@@ -124,10 +124,12 @@ extern unsigned int video_mode, video_fl
#define PML4_ADDR(_slot) \
((((_slot ## UL) >> 8) * 0xffff000000000000UL) | \
(_slot ## UL << PML4_ENTRY_BITS))
+#define GB(_gb) (_gb ## UL << 30)
#else
#define PML4_ENTRY_BYTES (1 << PML4_ENTRY_BITS)
#define PML4_ADDR(_slot) \
(((_slot >> 8) * 0xffff000000000000) | (_slot << PML4_ENTRY_BITS))
+#define GB(_gb) (_gb << 30)
#endif
/*
@@ -151,21 +153,19 @@ extern unsigned int video_mode, video_fl
* 0xffff828000000000 - 0xffff8283ffffffff [16GB, 2^34 bytes, PML4:261]
* Machine-to-phys translation table.
* 0xffff828400000000 - 0xffff8287ffffffff [16GB, 2^34 bytes, PML4:261]
- * Page-frame information array.
- * 0xffff828800000000 - 0xffff828bffffffff [16GB, 2^34 bytes, PML4:261]
* ioremap()/fixmap area.
- * 0xffff828c00000000 - 0xffff828c3fffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828800000000 - 0xffff82883fffffff [1GB, 2^30 bytes, PML4:261]
* Compatibility machine-to-phys translation table.
- * 0xffff828c40000000 - 0xffff828c7fffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828840000000 - 0xffff82887fffffff [1GB, 2^30 bytes, PML4:261]
* High read-only compatibility machine-to-phys translation table.
- * 0xffff828c80000000 - 0xffff828cbfffffff [1GB, 2^30 bytes, PML4:261]
+ * 0xffff828880000000 - 0xffff8288bfffffff [1GB, 2^30 bytes, PML4:261]
* Xen text, static data, bss.
- * 0xffff828cc0000000 - 0xffff82ffffffffff [461GB, PML4:261]
+ * 0xffff8288c0000000 - 0xffff82ffffffffff [221GB, PML4:261]
* Reserved for future use.
- * 0xffff830000000000 - 0xffff83ffffffffff [1TB, 2^40 bytes, PML4:262-263]
+ * 0xffff82c000000000 - 0xffff82ffffffffff [256GB, 2^38 bytes, PML4:261]
+ * Page-frame information array.
+ * 0xffff830000000000 - 0xffff87ffffffffff [5TB, 5*2^40 bytes, PML4:262-271]
* 1:1 direct mapping of all physical memory.
- * 0xffff840000000000 - 0xffff87ffffffffff [4TB, 2^42 bytes, PML4:264-271]
- * Reserved for future use.
* 0xffff880000000000 - 0xffffffffffffffff [120TB, PML4:272-511]
* Guest-defined use.
*
@@ -206,25 +206,25 @@ extern unsigned int video_mode, video_fl
#define PERDOMAIN_MBYTES ((unsigned long)GDT_LDT_MBYTES)
/* Slot 261: machine-to-phys conversion table (16GB). */
#define RDWR_MPT_VIRT_START (PML4_ADDR(261))
-#define RDWR_MPT_VIRT_END (RDWR_MPT_VIRT_START + (16UL<<30))
-/* Slot 261: page-frame information array (16GB). */
-#define FRAMETABLE_VIRT_START (RDWR_MPT_VIRT_END)
-#define FRAMETABLE_VIRT_END (FRAMETABLE_VIRT_START + (16UL<<30))
+#define RDWR_MPT_VIRT_END (RDWR_MPT_VIRT_START + GB(16))
/* Slot 261: ioremap()/fixmap area (16GB). */
-#define IOREMAP_VIRT_START (FRAMETABLE_VIRT_END)
-#define IOREMAP_VIRT_END (IOREMAP_VIRT_START + (16UL<<30))
+#define IOREMAP_VIRT_START RDWR_MPT_VIRT_END
+#define IOREMAP_VIRT_END (IOREMAP_VIRT_START + GB(16))
/* Slot 261: compatibility machine-to-phys conversion table (1GB). */
#define RDWR_COMPAT_MPT_VIRT_START IOREMAP_VIRT_END
-#define RDWR_COMPAT_MPT_VIRT_END (RDWR_COMPAT_MPT_VIRT_START + (1UL << 30))
+#define RDWR_COMPAT_MPT_VIRT_END (RDWR_COMPAT_MPT_VIRT_START + GB(1))
/* Slot 261: high read-only compat machine-to-phys conversion table (1GB). */
#define HIRO_COMPAT_MPT_VIRT_START RDWR_COMPAT_MPT_VIRT_END
-#define HIRO_COMPAT_MPT_VIRT_END (HIRO_COMPAT_MPT_VIRT_START + (1UL << 30))
+#define HIRO_COMPAT_MPT_VIRT_END (HIRO_COMPAT_MPT_VIRT_START + GB(1))
/* Slot 261: xen text, static data and bss (1GB). */
#define XEN_VIRT_START (HIRO_COMPAT_MPT_VIRT_END)
-#define XEN_VIRT_END (XEN_VIRT_START + (1UL << 30))
-/* Slot 262-263: A direct 1:1 mapping of all of physical memory. */
+#define XEN_VIRT_END (XEN_VIRT_START + GB(1))
+/* Slot 261: page-frame information array (256GB). */
+#define FRAMETABLE_VIRT_END DIRECTMAP_VIRT_START
+#define FRAMETABLE_VIRT_START (FRAMETABLE_VIRT_END - GB(256))
+/* Slot 262-271: A direct 1:1 mapping of all of physical memory. */
#define DIRECTMAP_VIRT_START (PML4_ADDR(262))
-#define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + PML4_ENTRY_BYTES*2)
+#define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + PML4_ENTRY_BYTES*10)
#ifndef __ASSEMBLY__
Index: xen-3.4.0-testing/xen/include/asm-x86/x86_64/page.h
===================================================================
--- xen-3.4.0-testing.orig/xen/include/asm-x86/x86_64/page.h
+++ xen-3.4.0-testing/xen/include/asm-x86/x86_64/page.h
@@ -16,8 +16,8 @@
#define L4_PAGETABLE_ENTRIES (1<magic, sizeof(si->magic), "xen-3.0-x86_%d%s",
elf_64bit(&elf) ? 64 : 32, parms.pae ? "p" : "");
+ count = d->tot_pages;
+#ifdef __x86_64__
+ /* Set up the phys->machine table if not part of the initial mapping. */
+ if ( parms.p2m_base != UNSET_ADDR )
+ {
+ unsigned long va = vphysmap_start;
+
+ if ( v_start <= vphysmap_end && vphysmap_start <= v_end )
+ panic("DOM0 P->M table overlaps initial mapping");
+
+ while ( va < vphysmap_end )
+ {
+ if ( d->tot_pages + ((round_pgup(vphysmap_end) - va)
+ >> PAGE_SHIFT) + 3 > nr_pages )
+ panic("Dom0 allocation too small for initial P->M table.\n");
+
+ l4tab = l4start + l4_table_offset(va);
+ if ( !l4e_get_intpte(*l4tab) )
+ {
+ page = alloc_domheap_pages(d, 0, 0);
+ if ( !page )
+ break;
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l3_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l4tab = l4e_from_page(page, L4_PROT);
+ }
+ l3tab = page_to_virt(l4e_get_page(*l4tab));
+ l3tab += l3_table_offset(va);
+ if ( !l3e_get_intpte(*l3tab) )
+ {
+ if ( cpu_has_page1gb &&
+ !(va & ((1UL << L3_PAGETABLE_SHIFT) - 1)) &&
+ vphysmap_end >= va + (1UL << L3_PAGETABLE_SHIFT) &&
+ (page = alloc_domheap_pages(d,
+ L3_PAGETABLE_SHIFT -
+ PAGE_SHIFT,
+ 0)) != NULL )
+ {
+ *l3tab = l3e_from_page(page,
+ L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+ va += 1UL << L3_PAGETABLE_SHIFT;
+ continue;
+ }
+ else if ( (page = alloc_domheap_pages(d, 0, 0)) == NULL )
+ break;
+ else
+ {
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l2_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l3tab = l3e_from_page(page, L3_PROT);
+ }
+ }
+ l2tab = page_to_virt(l3e_get_page(*l3tab));
+ l2tab += l2_table_offset(va);
+ if ( !l2e_get_intpte(*l2tab) )
+ {
+ if ( !(va & ((1UL << L2_PAGETABLE_SHIFT) - 1)) &&
+ vphysmap_end >= va + (1UL << L2_PAGETABLE_SHIFT) &&
+ (page = alloc_domheap_pages(d,
+ L2_PAGETABLE_SHIFT -
+ PAGE_SHIFT,
+ 0)) != NULL )
+ {
+ *l2tab = l2e_from_page(page,
+ L1_PROT|_PAGE_DIRTY|_PAGE_PSE);
+ va += 1UL << L2_PAGETABLE_SHIFT;
+ continue;
+ }
+ else if ( (page = alloc_domheap_pages(d, 0, 0)) == NULL )
+ break;
+ else
+ {
+ /* No mapping, PGC_allocated + page-table page. */
+ page->count_info = PGC_allocated | 2;
+ page->u.inuse.type_info =
+ PGT_l1_page_table | PGT_validated | 1;
+ clear_page(page_to_virt(page));
+ *l2tab = l2e_from_page(page, L2_PROT);
+ }
+ }
+ l1tab = page_to_virt(l2e_get_page(*l2tab));
+ l1tab += l1_table_offset(va);
+ BUG_ON(l1e_get_intpte(*l1tab));
+ page = alloc_domheap_pages(d, 0, 0);
+ if ( !page )
+ break;
+ *l1tab = l1e_from_page(page, L1_PROT|_PAGE_DIRTY);
+ va += PAGE_SIZE;
+ va &= PAGE_MASK;
+ }
+ if ( !page )
+ panic("Not enough RAM for DOM0 P->M table.\n");
+ }
+#endif
+
/* Write the phys->machine and machine->phys table entries. */
- for ( pfn = 0; pfn < d->tot_pages; pfn++ )
+ for ( pfn = 0; pfn < count; pfn++ )
{
mfn = pfn + alloc_spfn;
#ifndef NDEBUG
@@ -755,6 +869,26 @@ int __init construct_dom0(
((unsigned int *)vphysmap_start)[pfn] = mfn;
set_gpfn_from_mfn(mfn, pfn);
}
+ si->first_p2m_pfn = pfn;
+ si->nr_p2m_frames = d->tot_pages - count;
+ list_for_each_entry ( page, &d->page_list, list )
+ {
+ mfn = page_to_mfn(page);
+ if ( get_gpfn_from_mfn(mfn) >= count )
+ {
+ BUG_ON(is_pv_32bit_domain(d));
+ if ( !page->u.inuse.type_info &&
+ !get_page_and_type(page, d, PGT_writable_page) )
+ BUG();
+ ((unsigned long *)vphysmap_start)[pfn] = mfn;
+ set_gpfn_from_mfn(mfn, pfn);
+ ++pfn;
+#ifndef NDEBUG
+ ++alloc_epfn;
+#endif
+ }
+ }
+ BUG_ON(pfn != d->tot_pages);
while ( pfn < nr_pages )
{
if ( (page = alloc_chunk(d, nr_pages - d->tot_pages)) == NULL )
--- 2009-01-08.orig/xen/arch/x86/mm.c 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/arch/x86/mm.c 2009-01-08 10:56:30.000000000 +0100
@@ -1013,7 +1013,8 @@ static int put_page_from_l2e(l2_pgentry_
{
unsigned long mfn = l2e_get_pfn(l2e), m = mfn;
int writeable = l2e_get_flags(l2e) & _PAGE_RW;
- ASSERT(opt_allow_hugepage && !(mfn & (L1_PAGETABLE_ENTRIES-1)));
+
+ ASSERT(!(mfn & (L1_PAGETABLE_ENTRIES-1)));
do {
put_data_page(mfn_to_page(m), writeable);
} while ( m++ < (mfn + (L1_PAGETABLE_ENTRIES-1)) );
@@ -1031,14 +1032,28 @@ static int __put_page_type(struct page_i
static int put_page_from_l3e(l3_pgentry_t l3e, unsigned long pfn,
int partial, int preemptible)
{
- if ( (l3e_get_flags(l3e) & _PAGE_PRESENT) &&
- (l3e_get_pfn(l3e) != pfn) )
+ if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) || (l3e_get_pfn(l3e) == pfn) )
+ return 1;
+
+#ifdef __x86_64__
+ if ( unlikely(l3e_get_flags(l3e) & _PAGE_PSE) )
{
- if ( unlikely(partial > 0) )
- return __put_page_type(l3e_get_page(l3e), preemptible);
- return put_page_and_type_preemptible(l3e_get_page(l3e), preemptible);
+ unsigned long mfn = l3e_get_pfn(l3e);
+ int writeable = l3e_get_flags(l3e) & _PAGE_RW;
+
+ ASSERT(!(mfn & ((1UL << (L3_PAGETABLE_SHIFT - PAGE_SHIFT)) - 1)));
+ do {
+ put_data_page(mfn_to_page(mfn), writeable);
+ } while ( ++mfn & ((1UL << (L3_PAGETABLE_SHIFT - PAGE_SHIFT)) - 1) );
+
+ return 0;
}
- return 1;
+#endif
+
+ if ( unlikely(partial > 0) )
+ return __put_page_type(l3e_get_page(l3e), preemptible);
+
+ return put_page_and_type_preemptible(l3e_get_page(l3e), preemptible);
}
#if CONFIG_PAGING_LEVELS >= 4
--- 2009-01-08.orig/xen/common/libelf/libelf-dominfo.c 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/common/libelf/libelf-dominfo.c 2009-01-08 10:56:30.000000000 +0100
@@ -90,6 +90,7 @@ int elf_xen_parse_note(struct elf_binary
[XEN_ELFNOTE_ENTRY] = { "ENTRY", 0},
[XEN_ELFNOTE_HYPERCALL_PAGE] = { "HYPERCALL_PAGE", 0},
[XEN_ELFNOTE_VIRT_BASE] = { "VIRT_BASE", 0},
+ [XEN_ELFNOTE_INIT_P2M] = { "INIT_P2M", 0},
[XEN_ELFNOTE_PADDR_OFFSET] = { "PADDR_OFFSET", 0},
[XEN_ELFNOTE_HV_START_LOW] = { "HV_START_LOW", 0},
[XEN_ELFNOTE_XEN_VERSION] = { "XEN_VERSION", 1},
@@ -164,6 +165,9 @@ int elf_xen_parse_note(struct elf_binary
case XEN_ELFNOTE_ENTRY:
parms->virt_entry = val;
break;
+ case XEN_ELFNOTE_INIT_P2M:
+ parms->p2m_base = val;
+ break;
case XEN_ELFNOTE_PADDR_OFFSET:
parms->elf_paddr_offset = val;
break;
@@ -392,6 +396,7 @@ static int elf_xen_addr_calc_check(struc
elf_msg(elf, " virt_kstart = 0x%" PRIx64 "\n", parms->virt_kstart);
elf_msg(elf, " virt_kend = 0x%" PRIx64 "\n", parms->virt_kend);
elf_msg(elf, " virt_entry = 0x%" PRIx64 "\n", parms->virt_entry);
+ elf_msg(elf, " p2m_base = 0x%" PRIx64 "\n", parms->p2m_base);
if ( (parms->virt_kstart > parms->virt_kend) ||
(parms->virt_entry < parms->virt_kstart) ||
@@ -403,6 +408,15 @@ static int elf_xen_addr_calc_check(struc
return -1;
}
+ if ( (parms->p2m_base != UNSET_ADDR) &&
+ (parms->p2m_base >= parms->virt_kstart) &&
+ (parms->p2m_base < parms->virt_kend) )
+ {
+ elf_err(elf, "%s: ERROR: P->M table base is out of bounds.\n",
+ __FUNCTION__);
+ return -1;
+ }
+
return 0;
}
@@ -422,6 +436,7 @@ int elf_xen_parse(struct elf_binary *elf
parms->virt_entry = UNSET_ADDR;
parms->virt_hypercall = UNSET_ADDR;
parms->virt_hv_start_low = UNSET_ADDR;
+ parms->p2m_base = UNSET_ADDR;
parms->elf_paddr_offset = UNSET_ADDR;
/* Find and parse elf notes. */
--- 2009-01-08.orig/xen/include/public/elfnote.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/elfnote.h 2009-01-08 10:56:30.000000000 +0100
@@ -162,9 +162,20 @@
#define XEN_ELFNOTE_SUSPEND_CANCEL 14
/*
+ * The (non-default) location the initial phys-to-machine map should be
+ * placed at by the hypervisor (Dom0) or the tools (DomU).
+ * The kernel must be prepared for this mapping to be established using
+ * large pages, despite such otherwise not being available to guests.
+ * The kernel must also be able to handle the page table pages used for
+ * this mapping not being accessible through the initial mapping.
+ * (Only x86-64 supports this at present.)
+ */
+#define XEN_ELFNOTE_INIT_P2M 15
+
+/*
* The number of the highest elfnote defined.
*/
-#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
+#define XEN_ELFNOTE_MAX XEN_ELFNOTE_INIT_P2M
/*
* System information exported through crash notes.
--- 2009-01-08.orig/xen/include/public/libelf.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/libelf.h 2009-01-08 10:56:30.000000000 +0100
@@ -232,6 +232,7 @@ struct elf_dom_parms {
uint64_t virt_entry;
uint64_t virt_hypercall;
uint64_t virt_hv_start_low;
+ uint64_t p2m_base;
uint64_t elf_paddr_offset;
uint32_t f_supported[XENFEAT_NR_SUBMAPS];
uint32_t f_required[XENFEAT_NR_SUBMAPS];
--- 2009-01-08.orig/xen/include/public/xen.h 2009-01-08 11:44:11.000000000 +0100
+++ 2009-01-08/xen/include/public/xen.h 2009-01-08 10:56:30.000000000 +0100
@@ -513,6 +513,7 @@ typedef struct shared_info shared_info_t
* a. relocated kernel image
* b. initial ram disk [mod_start, mod_len]
* c. list of allocated page frames [mfn_list, nr_pages]
+ * (unless relocated due to XEN_ELFNOTE_INIT_P2M)
* d. start_info_t structure [register ESI (x86)]
* e. bootstrap page tables [pt_base, CR3 (x86)]
* f. bootstrap stack [register ESP (x86)]
@@ -554,6 +555,9 @@ struct start_info {
unsigned long mod_start; /* VIRTUAL address of pre-loaded module. */
unsigned long mod_len; /* Size (bytes) of pre-loaded module. */
int8_t cmd_line[MAX_GUEST_CMDLINE];
+ /* The pfn range here covers both page table and p->m table frames. */
+ unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
+ unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
};
typedef struct start_info start_info_t;
++++++ x86-alloc-cpu-structs.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -101,10 +101,10 @@
cpufreq_driver = &powernow_cpufreq_driver;
-Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/utility.c
+Index: xen-3.3.1-testing/xen/drivers/cpufreq/utility.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/acpi/cpufreq/utility.c
-+++ xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/utility.c
+--- xen-3.3.1-testing.orig/xen/drivers/cpufreq/utility.c
++++ xen-3.3.1-testing/xen/xen/drivers/cpufreq/utility.c
@@ -45,10 +45,12 @@ void px_statistic_suspend(void)
now = NOW();
@@ -323,10 +323,10 @@
stat->idle_time = v->runstate.time[RUNSTATE_running];
if ( v->is_running )
stat->idle_time += NOW() - v->runstate.state_entry_time;
-Index: xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
+Index: xen-3.3.1-testing/xen/drivers/acpi/pmstat.c
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/acpi/pmstat.c
-+++ xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
+--- xen-3.3.1-testing.orig/xen/drivers/acpi/pmstat.c
++++ xen-3.3.1-testing/xen/drivers/acpi/pmstat.c
@@ -41,7 +41,7 @@
#include
#include
++++++ x86-cpufreq-report.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,5 +1,7 @@
---- a/xen/arch/x86/platform_hypercall.c
-+++ b/xen/arch/x86/platform_hypercall.c
+Index: xen-3.4.0-testing/xen/arch/x86/platform_hypercall.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/platform_hypercall.c
++++ xen-3.4.0-testing/xen/arch/x86/platform_hypercall.c
@@ -21,7 +21,7 @@
#include
#include
@@ -9,7 +11,7 @@
#include
#include
#include "cpu/mtrr/mtrr.h"
-@@ -55,6 +55,7 @@ static long cpu_frequency_change_helper(
+@@ -56,6 +56,7 @@ static long cpu_frequency_change_helper(
ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op)
{
ret_t ret = 0;
@@ -17,7 +19,7 @@
struct xen_platform_op curop, *op = &curop;
if ( !IS_PRIV(current->domain) )
-@@ -300,7 +301,6 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
+@@ -313,7 +314,6 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
{
uint32_t cpu;
uint64_t idletime, now = NOW();
@@ -25,7 +27,7 @@
struct xenctl_cpumap ctlmap;
cpumask_t cpumap;
XEN_GUEST_HANDLE(uint8) cpumap_bitmap;
-@@ -461,6 +461,19 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
+@@ -386,6 +386,20 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
break;
}
break;
@@ -38,16 +40,19 @@
+ break;
+ }
+
-+ op->u.get_cpu_freq.freq = xen_px_policy[v->processor].cur;
++ op->u.get_cpu_freq.freq = cpufreq_cpu_policy[v->processor] ?
++ cpufreq_cpu_policy[v->processor]->cur : 0;
+ if ( copy_field_to_guest(u_xenpf_op, op, u.get_cpu_freq.freq) )
+ ret = -EFAULT;
+ break;
default:
ret = -ENOSYS;
---- a/xen/arch/x86/x86_64/platform_hypercall.c
-+++ b/xen/arch/x86/x86_64/platform_hypercall.c
-@@ -21,6 +21,8 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/platform_hypercall.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/platform_hypercall.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/platform_hypercall.c
+@@ -23,6 +23,8 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
#define xen_processor_power_t compat_processor_power_t
#define set_cx_pminfo compat_set_cx_pminfo
@@ -56,8 +61,10 @@
#define xenpf_enter_acpi_sleep compat_pf_enter_acpi_sleep
#define COMPAT
---- a/xen/include/public/platform.h
-+++ b/xen/include/public/platform.h
+Index: xen-3.4.0-testing/xen/include/public/platform.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/public/platform.h
++++ xen-3.4.0-testing/xen/include/public/platform.h
@@ -312,6 +312,16 @@ struct xenpf_set_processor_pminfo {
typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);
++++++ x86-extra-trap-info.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/xen/arch/x86/x86_32/entry.S
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/entry.S
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/x86_32/entry.S
-+++ xen-3.3.1-testing/xen/arch/x86/x86_32/entry.S
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/entry.S
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/entry.S
@@ -401,21 +401,33 @@ ring1: /* obtain ss/esp from oldss/olde
movl %eax,UREGS_eip+4(%esp)
ret
@@ -46,10 +46,10 @@
domain_crash_synchronous:
pushl $domain_crash_synchronous_string
call printk
-Index: xen-3.3.1-testing/xen/arch/x86/x86_64/entry.S
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/entry.S
===================================================================
---- xen-3.3.1-testing.orig/xen/arch/x86/x86_64/entry.S
-+++ xen-3.3.1-testing/xen/arch/x86/x86_64/entry.S
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/entry.S
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/entry.S
@@ -419,17 +419,30 @@ create_bounce_frame:
movq %rax,UREGS_rip+8(%rsp)
ret
++++++ x86-show-page-walk-early.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,6 +1,8 @@
---- a/xen/arch/x86/traps.c
-+++ b/xen/arch/x86/traps.c
-@@ -1273,6 +1273,7 @@ asmlinkage void do_early_page_fault(stru
+Index: xen-3.4.0-testing/xen/arch/x86/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/traps.c
+@@ -1293,6 +1293,7 @@ asmlinkage void do_early_page_fault(stru
unsigned long *stk = (unsigned long *)regs;
printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n",
regs->cs, _p(regs->eip), _p(cr2), regs->error_code);
@@ -8,8 +10,10 @@
printk("Stack dump: ");
while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 )
printk("%p ", _p(*stk++));
---- a/xen/arch/x86/x86_32/mm.c
-+++ b/xen/arch/x86/x86_32/mm.c
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/mm.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/mm.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/mm.c
@@ -38,6 +38,7 @@ extern l1_pgentry_t l1_identmap[L1_PAGET
unsigned int PAGE_HYPERVISOR = __PAGE_HYPERVISOR;
unsigned int PAGE_HYPERVISOR_NOCACHE = __PAGE_HYPERVISOR_NOCACHE;
@@ -27,8 +31,10 @@
/* Fill with an obvious debug pattern. */
for ( i = 0; i < (mpt_size / BYTES_PER_LONG); i++)
set_gpfn_from_mfn(i, 0x55555555);
---- a/xen/arch/x86/x86_32/traps.c
-+++ b/xen/arch/x86/x86_32/traps.c
+Index: xen-3.4.0-testing/xen/arch/x86/x86_32/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_32/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_32/traps.c
@@ -160,7 +160,8 @@ void show_page_walk(unsigned long addr)
l3t += (cr3 & 0xFE0UL) >> 3;
l3e = l3t[l3_table_offset(addr)];
@@ -59,17 +65,19 @@
printk(" L1[0x%03lx] = %"PRIpte" %08lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
unmap_domain_page(l1t);
---- a/xen/arch/x86/x86_64/mm.c
-+++ b/xen/arch/x86/x86_64/mm.c
-@@ -32,6 +32,7 @@
- #include
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/mm.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/mm.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/mm.c
+@@ -33,6 +33,7 @@
+ #include
#include
+int mpt_valid;
#ifdef CONFIG_COMPAT
unsigned int m2p_compat_vstart = __HYPERVISOR_COMPAT_VIRT_START;
#endif
-@@ -151,6 +152,8 @@ void __init paging_init(void)
+@@ -181,6 +182,8 @@ void __init paging_init(void)
l2_ro_mpt++;
}
@@ -78,9 +86,11 @@
/* Create user-accessible L2 directory to map the MPT for compat guests. */
BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) !=
l4_table_offset(HIRO_COMPAT_MPT_VIRT_START));
---- a/xen/arch/x86/x86_64/traps.c
-+++ b/xen/arch/x86/x86_64/traps.c
-@@ -174,7 +174,8 @@ void show_page_walk(unsigned long addr)
+Index: xen-3.4.0-testing/xen/arch/x86/x86_64/traps.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/x86_64/traps.c
++++ xen-3.4.0-testing/xen/arch/x86/x86_64/traps.c
+@@ -176,7 +176,8 @@ void show_page_walk(unsigned long addr)
l4t = mfn_to_virt(mfn);
l4e = l4t[l4_table_offset(addr)];
mfn = l4e_get_pfn(l4e);
@@ -90,7 +100,7 @@
printk(" L4[0x%03lx] = %"PRIpte" %016lx\n",
l4_table_offset(addr), l4e_get_intpte(l4e), pfn);
if ( !(l4e_get_flags(l4e) & _PAGE_PRESENT) )
-@@ -183,7 +184,8 @@ void show_page_walk(unsigned long addr)
+@@ -185,7 +186,8 @@ void show_page_walk(unsigned long addr)
l3t = mfn_to_virt(mfn);
l3e = l3t[l3_table_offset(addr)];
mfn = l3e_get_pfn(l3e);
@@ -100,7 +110,7 @@
printk(" L3[0x%03lx] = %"PRIpte" %016lx%s\n",
l3_table_offset(addr), l3e_get_intpte(l3e), pfn,
(l3e_get_flags(l3e) & _PAGE_PSE) ? " (PSE)" : "");
-@@ -194,7 +196,8 @@ void show_page_walk(unsigned long addr)
+@@ -196,7 +198,8 @@ void show_page_walk(unsigned long addr)
l2t = mfn_to_virt(mfn);
l2e = l2t[l2_table_offset(addr)];
mfn = l2e_get_pfn(l2e);
@@ -110,7 +120,7 @@
printk(" L2[0x%03lx] = %"PRIpte" %016lx %s\n",
l2_table_offset(addr), l2e_get_intpte(l2e), pfn,
(l2e_get_flags(l2e) & _PAGE_PSE) ? "(PSE)" : "");
-@@ -205,7 +208,8 @@ void show_page_walk(unsigned long addr)
+@@ -207,7 +210,8 @@ void show_page_walk(unsigned long addr)
l1t = mfn_to_virt(mfn);
l1e = l1t[l1_table_offset(addr)];
mfn = l1e_get_pfn(l1e);
@@ -120,9 +130,11 @@
printk(" L1[0x%03lx] = %"PRIpte" %016lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
}
---- a/xen/include/asm-x86/mm.h
-+++ b/xen/include/asm-x86/mm.h
-@@ -330,6 +330,7 @@ TYPE_SAFE(unsigned long,mfn);
+Index: xen-3.4.0-testing/xen/include/asm-x86/mm.h
+===================================================================
+--- xen-3.4.0-testing.orig/xen/include/asm-x86/mm.h
++++ xen-3.4.0-testing/xen/include/asm-x86/mm.h
+@@ -411,6 +411,7 @@ TYPE_SAFE(unsigned long,mfn);
#define machine_to_phys_mapping ((unsigned long *)RDWR_MPT_VIRT_START)
#define INVALID_M2P_ENTRY (~0UL)
#define VALID_M2P(_e) (!((_e) & (1UL<<(BITS_PER_LONG-1))))
++++++ xen-3.3.1-testing-src.tar.bz2 -> xen-3.4.0-testing-src.tar.bz2 ++++++
xen/xen-3.3.1-testing-src.tar.bz2 /mounts/work_src_done/STABLE/xen/xen-3.4.0-testing-src.tar.bz2 differ: byte 11, line 1
++++++ xen-api-auth.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendAuthSessions.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendAuthSessions.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendAuthSessions.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendAuthSessions.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendAuthSessions.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendAuthSessions.py
@@ -84,7 +84,7 @@ class XendAuthSessions:
# if PAM doesn't exist, let's ignore it
return False
++++++ xenapi-console-protocol.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -3247,6 +3247,14 @@ class XendDomainInfo:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -3570,6 +3570,14 @@ class XendDomainInfo:
if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000"
++++++ xen-changeset.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/xen/Makefile
+Index: xen-3.4.0-testing/xen/Makefile
===================================================================
---- xen-3.3.1-testing.orig/xen/Makefile
-+++ xen-3.3.1-testing/xen/Makefile
+--- xen-3.4.0-testing.orig/xen/Makefile
++++ xen-3.4.0-testing/xen/Makefile
@@ -1,3 +1,4 @@
+export XEN_CHANGESET = unavailable
# This is the correct place to edit the build version.
# All other places this is stored (eg. compile.h) should be autogenerated.
export XEN_VERSION = 3
-@@ -81,7 +82,7 @@ delete-unfresh-files:
+@@ -82,7 +83,7 @@ delete-unfresh-files:
@rm -f $@1 $@2
# compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
@@ -16,7 +16,7 @@
@sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
-e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
-@@ -91,10 +92,9 @@ include/xen/compile.h: include/xen/compi
+@@ -92,10 +93,9 @@ include/xen/compile.h: include/xen/compi
-e 's/@@version@@/$(XEN_VERSION)/g' \
-e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
-e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
++++++ xen-config.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,24 +1,13 @@
-Index: xen-3.3.1-testing/Config.mk
+Index: xen-3.4.0-testing/Config.mk
===================================================================
---- xen-3.3.1-testing.orig/Config.mk
-+++ xen-3.3.1-testing/Config.mk
-@@ -85,20 +85,20 @@ QEMU_REMOTE=http://xenbits.xensource.com
-
+--- xen-3.4.0-testing.orig/Config.mk
++++ xen-3.4.0-testing/Config.mk
+@@ -117,14 +117,14 @@ QEMU_REMOTE=http://xenbits.xensource.com
# Specify which qemu-dm to use. This may be `ioemu' to use the old
# Mercurial in-tree version, or a local directory, or a git URL.
--# CONFIG_QEMU ?= ioemu
+ # CONFIG_QEMU ?= ../qemu-xen.git
+-CONFIG_QEMU ?= $(QEMU_REMOTE)
+CONFIG_QEMU ?= ioemu-remote
- # CONFIG_QEMU ?= ../qemu-xen.git
--ifeq ($(XEN_TARGET_ARCH),ia64)
--CONFIG_QEMU ?= ioemu
--else
--CONFIG_QEMU ?= $(QEMU_REMOTE)
--endif
-+# ifeq ($(XEN_TARGET_ARCH),ia64)
-+# CONFIG_QEMU ?= ioemu
-+# else
-+# CONFIG_QEMU ?= $(QEMU_REMOTE)
-+# endif
# Optional components
XENSTAT_XENTOP ?= y
++++++ xend-config.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/init.d/sysconfig.xendomains
+Index: xen-3.4.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/init.d/sysconfig.xendomains
-+++ xen-3.3.1-testing/tools/examples/init.d/sysconfig.xendomains
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xendomains
++++ xen-3.4.0-testing/tools/hotplug/Linux/init.d/sysconfig.xendomains
@@ -1,4 +1,4 @@
-## Path: System/xen
+## Path: System/Virtualization
@@ -27,11 +27,11 @@
## Type: integer
## Default: 300
-Index: xen-3.3.1-testing/tools/examples/xend-config.sxp
+Index: xen-3.4.0-testing/tools/examples/xend-config.sxp
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xend-config.sxp
-+++ xen-3.3.1-testing/tools/examples/xend-config.sxp
-@@ -54,11 +54,12 @@
+--- xen-3.4.0-testing.orig/tools/examples/xend-config.sxp
++++ xen-3.4.0-testing/tools/examples/xend-config.sxp
+@@ -58,11 +58,12 @@
#(xend-http-server no)
@@ -44,9 +44,9 @@
#(xend-relocation-server no)
-(xend-relocation-server yes)
#(xend-relocation-ssl-server no)
+ #(xend-udev-event-server no)
- #(xend-unix-path /var/lib/xend/xend-socket)
-@@ -140,7 +141,8 @@
+@@ -145,7 +146,8 @@
#
# (network-script 'network-bridge netdev=eth1')
#
@@ -56,7 +56,7 @@
#
# (network-script 'network-bridge bridge=<name>')
#
-@@ -149,7 +151,12 @@
+@@ -154,7 +156,12 @@
# two fake interfaces per guest domain. To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
@@ -64,13 +64,13 @@
+# SuSE users note:
+# On openSUSE >= 11.1 and SLES >= 11, networks should be configured using
+# native platform tool - YaST. vif-bridge and qemu-ifup can be used to
-+# connect vifs to the YaST-managed networks.
++# connect vifs to the YaST-managed networks.
+#(network-script network-bridge)
+(network-script )
# The script used to control virtual interfaces. This can be overridden on a
# per-vif basis when creating a domain or a configuring a new vif. The
-@@ -181,7 +188,7 @@
+@@ -186,7 +193,7 @@
# dom0-min-mem is the lowest permissible memory level (in MB) for dom0.
# This is a minimum both for auto-ballooning (as enabled by
# enable-dom0-ballooning below) and for xm mem-set when applied to dom0.
++++++ xend-core-dump-loc.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,13 +1,13 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1867,7 +1867,7 @@ class XendDomainInfo:
- try:
- if not corefile:
- this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
-- corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
-+ corefile = "/var/lib/xen/dump/%s-%s.%s.core" % (this_time,
- self.info['name_label'], self.domid)
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -2117,7 +2117,7 @@ class XendDomainInfo:
+
+ if not corefile:
+ this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
+- corefile = "/var/xen/dump/%s-%s.%s.core" % (this_time,
++ corefile = "/var/lib/xen/dump/%s-%s.%s.core" % (this_time,
+ self.info['name_label'], self.domid)
- if os.path.isdir(corefile):
+ if os.path.isdir(corefile):
++++++ xend-domain-lock.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,146 +1,76 @@
-Index: xen-3.3.1-testing/tools/examples/domain-lock
+Index: xen-3.4.0-testing/tools/examples/xend-config.sxp
===================================================================
---- /dev/null
-+++ xen-3.3.1-testing/tools/examples/domain-lock
-@@ -0,0 +1,83 @@
-+#!/bin/bash
-+
-+usage() {
-+ echo "usage: domain-lock [-l|-u|-s] [-n <vm name>] [-i <vm uuid>] [-p <physical host>] path"
-+ echo ""
-+ echo "-l lock"
-+ echo "-u unlock"
-+ echo "-s status (default)"
-+ echo "-n Virtual Machine name"
-+ echo "-i Virtual Machine Id or UUID"
-+ echo "-p Virtual Machine Server (physical host) name"
-+ echo "path A per-VM, unique location where external lock will be managed"
-+ exit 1
-+}
-+
-+create_lock() {
-+ local path=$1
-+ local name=$2
-+ local uuid=$3
-+ local host=$4
-+
-+ path=$path/lock
-+ cat > $path < on domain
-+# startup and removed when domain is stopped. By default, a lock file
-+# is not created. Set to yes to enable lock file creation.
-+# Note that external locking mechanisms are no substitute for a cluster
-+# environment that protects shared resources, but may be useful in
-+# some circumstances nonetheless.
++# Domain Locking
++# In a multihost environment, domain locking prevents simultaneously
++# running a domain on more than one host.
++#
++# If enabled, xend will execute a external lock utility (defined below)
++# on each domain start and stop event. Disabled by default. Set to yes
++# to enable domain locking.
+#
+#(xend-domain-lock no)
+
+# Path where domain lock is stored if xend-domain-lock is enabled.
+# Note: This path must be accessible to all VM Servers participating
+# in domain locking, e.g. by specifying a shared mount point.
-+# Lock is placed in <xend-domain-lock-path>/<domain-uuid>.
++# Lock is placed in /<xend-domain-lock-path>/<domain-uuid>.
+# Default is /var/lib/xend/domains/
+#
+#(xend-domain-lock-path /var/lib/xend/domains)
+
-+# External locking utility for acquiring/releasing domain lock.
-+# By default /etc/xen/scripts/domain-lock will be used if
-+# xend-domain-lock is set to yes. Set to path of custom
-+# locking utility to override the default. Synopsis:
++# External locking utility called by xend for acquiring/releasing
++# domain lock. By default /etc/xen/scripts/domain-lock will be used
++# if xend-domain-lock is set to yes. Set to path of custom locking
++# utility to override the default.
+#
-+# lock-util <-l | -u | -s> [-n <vm-name>] [-i <vm-id>] [-p <phy-host>] path
-+#
-+# Utility should return zero on success, non-zero on error.
-+# -l lock Acquire (create) lock file
-+# -u unlock Remove lock file
-+# -s status Default action. If lock file exists, print contents on
-+# stdout and return 0)
-+# -p phy-host Name of physical host (dom0)
++# Synopsis of lock-util:
++# lock-util [-l|-u] -n <vm name> -i <vm uuid> -p <physical host> path"
++# -l Acquire (create) lock
++# -u Remove lock
+# -n vm-name Name of domain
+# -i vm-id Id or UUID of domain
-+# path A unique location for external lock must be specified
++# -p phy-host Name of physical host (dom0)
++# path /<xend-domain-lock-path>/<vm-uuid>
++# Return 0 on success, non-zero on error.
++#
++# lock-util [-s] path"
++# -s Lock status. If lock is acquired, print any contents
++# on stdout and return 0. Return non-zero if lock is
++# available.
++# path /<xend-domain-lock-path>/<vm-uuid>
++# If lock is acquired, print any contents on stdout and return 0.
++# Return non-zero if lock is available.
++#
++# Default lock-util behavior:
++# On domain start event, domain-lock will create and flock(1)
++# /<xend-domain-lock-path>/<vm-uuid>/lock. Every two seconds it
++# will write <vm-name>, <vm-id>, <vm-host>, and <tick> to the lock.
++# <tick> is running counter.
++# On domain stop event, domain-lock will unlock and remove
++# /<xend-domain-lock-path>/<vm-uuid>/lock.
+#
-+# The /etc/xen/scripts/domain-lock default utility will create
-+# <xend-domain-lock-path>/<vm-uuid>/lock and write <vm-name>, <vm-id>,
-+# and <vm-host> (if supplied) to the lock file in that order.
++# Note: If xend-domain-lock-path is a cluster-unaware file system,
++# administrator intervention may be required to remove stale
++# locks. Consider two hosts using NFS for xend-domain-lock-path
++# when HostA, running vm1, crashes. HostB could not acquire a
++# lock for vm1 since the NFS server holds an exclusive lock
++# acquired by HostA. The lock file must be manually removed
++# before starting vm1 on HostA.
+#
+#(xend-domain-lock-utility domain-lock)
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -30,11 +30,13 @@ import threading
import re
import copy
@@ -156,7 +86,7 @@
from xen.util.blkif import parse_uname
import xen.util.xsm.xsm as security
from xen.util import xsconstants
-@@ -443,6 +445,7 @@ class XendDomainInfo:
+@@ -452,6 +454,7 @@ class XendDomainInfo:
if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED):
try:
@@ -164,15 +94,7 @@
XendTask.log_progress(0, 30, self._constructDomain)
XendTask.log_progress(31, 60, self._initDomain)
-@@ -475,6 +478,7 @@ class XendDomainInfo:
- state = self._stateGet()
- if state in (DOM_STATE_SUSPENDED, DOM_STATE_HALTED):
- try:
-+ self.acquire_running_lock();
- self._constructDomain()
-
- try:
-@@ -2339,6 +2343,11 @@ class XendDomainInfo:
+@@ -2626,6 +2629,11 @@ class XendDomainInfo:
self._stateSet(DOM_STATE_HALTED)
self.domid = None # Do not push into _stateSet()!
@@ -184,28 +106,22 @@
finally:
self.refresh_shutdown_lock.release()
-@@ -3560,6 +3569,74 @@ class XendDomainInfo:
+@@ -3992,6 +4000,74 @@ class XendDomainInfo:
def has_device(self, dev_class, dev_uuid):
return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
-+ # Check if domain has a lock file present
-+ def is_dom_locked(self, path):
-+ status = os.system('%s -s %s' % \
-+ (xoptions.get_xend_domain_lock_utility(), \
-+ path))
-+
-+ return status == 0
-+
-+ # Return name of host contained in lock file. Host should be last
-+ # entry in the lock file.
++ # Return name of host contained in lock file.
+ def get_lock_host(self, path):
+ fin = os.popen(xoptions.get_xend_domain_lock_utility() + \
+ ' -s ' + path, 'r')
+ hostname = "unknown"
+
+ try:
-+ line = fin.readline()
-+ hostname = line.split()[-1]
++ tokens = fin.readline().split()
++ for token in tokens:
++ item = token.split('=')
++ if item[0] == 'host':
++ hostname = item[1]
+ return hostname
+ finally:
+ fin.close()
@@ -215,12 +131,10 @@
+ if not xoptions.get_xend_domain_lock():
+ return
+
++ log.debug("Acquiring lock for domain %s" % self.info['name_label'])
+ path = xoptions.get_xend_domain_lock_path()
+ path = os.path.join(path, self.get_uuid())
+
-+ if self.is_dom_locked(path):
-+ raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path))
-+
+ try:
+ if not os.path.exists(path):
+ mkdir.parents(path, stat.S_IRWXU)
@@ -235,47 +149,43 @@
+ self.info['uuid'], \
+ path))
+ if status != 0:
-+ raise XendError('Acquire running lock failed: %s' % status)
++ log.debug("Failed to aqcuire lock: status = %d" % status)
++ raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path))
+
-+ # Release lock for domain. Should be called at end of domain cleanup
-+ def release_running_lock(self):
++ # Release lock for domain. No-op if domain locking is turned off.
++ def release_running_lock(self, name = None):
+ if not xoptions.get_xend_domain_lock():
+ return
+
++ dom_name = self.info['name_label']
++ if name:
++ dom_name = name
++ log.debug("Releasing lock for domain %s" % dom_name)
++
+ path = xoptions.get_xend_domain_lock_path()
+ path = os.path.join(path, self.get_uuid())
-+ status = os.system('%s -u %s' % \
++ status = os.system('%s -u -p %s -n %s -i %s %s' % \
+ (xoptions.get_xend_domain_lock_utility(), \
++ XendNode.instance().get_name(), \
++ dom_name, \
++ self.info['uuid'], \
+ path))
+ if status != 0:
-+ log.exception("Release running lock failed: %s" % status)
++ log.exception("Failed to release lock: status = %s" % status)
+ try:
+ if len(os.listdir(path)) == 0:
+ shutil.rmtree(path)
+ except:
+ log.exception("Failed to remove unmanaged directory %s." % path)
+
-+
def __str__(self):
return '<domain id=%s name=%s memory=%s state=%s>' % \
(str(self.domid), self.info['name_label'],
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
-===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomain.py
-@@ -1299,6 +1299,7 @@ class XendDomain:
- POWER_STATE_NAMES[DOM_STATE_RUNNING],
- POWER_STATE_NAMES[dominfo._stateGet()])
-
-+ dominfo.release_running_lock();
- """ The following call may raise a XendError exception """
- dominfo.testMigrateDevices(True, dst)
-
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendOptions.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendOptions.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendOptions.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendOptions.py
-@@ -135,6 +135,17 @@ class XendOptions:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendOptions.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendOptions.py
+@@ -141,6 +141,17 @@ class XendOptions:
"""Default rotation count of qemu-dm log file."""
qemu_dm_logrotate_count = 10
@@ -293,7 +203,7 @@
def __init__(self):
self.configure()
-@@ -358,6 +369,19 @@ class XendOptions:
+@@ -368,6 +379,19 @@ class XendOptions:
return self.get_config_int("qemu-dm-logrotate-count",
self.qemu_dm_logrotate_count)
@@ -313,15 +223,169 @@
class XendOptionsFile(XendOptions):
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
-@@ -35,6 +35,7 @@ XEN_SCRIPTS += vtpm vtpm-delete
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendCheckpoint.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendCheckpoint.py
+@@ -117,6 +117,7 @@ def save(fd, dominfo, network, live, dst
+ dominfo.shutdown('suspend')
+ dominfo.waitForSuspend()
+ if line in ('suspend', 'suspended'):
++ dominfo.release_running_lock(domain_name)
+ dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP2,
+ domain_name)
+ log.info("Domain %d suspended.", dominfo.getDomid())
+@@ -399,6 +400,7 @@ def restore(xd, fd, dominfo = None, paus
+ if not paused:
+ dominfo.unpause()
+
++ dominfo.acquire_running_lock()
+ return dominfo
+ except:
+ dominfo.destroy()
+Index: xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/Makefile
++++ xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+@@ -20,6 +20,7 @@ XEN_SCRIPTS += vtpm vtpm-delete
XEN_SCRIPTS += xen-hotplug-cleanup
XEN_SCRIPTS += external-device-migrate
XEN_SCRIPTS += vscsi
-+XEN_SCRIPTS += domain-lock
++XEN_SCRIPTS += domain-lock xen-monitor
XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
+Index: xen-3.4.0-testing/tools/hotplug/Linux/domain-lock
+===================================================================
+--- /dev/null
++++ xen-3.4.0-testing/tools/hotplug/Linux/domain-lock
+@@ -0,0 +1,83 @@
++#!/bin/bash
++
++basedir=$(dirname "$0")
++
++usage() {
++ echo "usage: domain-lock [-l|-u] -n <vm name> -i <vm uuid> -p <physical host> path"
++ echo "usage: domain-lock [-s] path"
++ echo ""
++ echo "-l lock"
++ echo "-u unlock"
++ echo "-s status (default)"
++ echo "-n Virtual Machine name"
++ echo "-i Virtual Machine Id or UUID"
++ echo "-p Virtual Machine Server (physical host) name"
++ echo "path A per-VM, unique location where external lock will be managed"
++ exit 1
++}
++
++remove_lock(){
++ local path=$1/lock
++ local name=$2
++
++ pid=`ps -efwww | grep xen-monitor | grep $name | awk '{print $2}'`
++ if [ -n "$pid" ]; then
++ kill $pid
++ rm -f $path
++ fi
++}
++
++get_status(){
++ local path=$1/lock
++ [ -f $path ] || exit 1
++
++ rc=`flock -xn $path /bin/true`
++ cat $path
++ exit $rc
++}
++
++mode="status"
++
++while getopts ":lusn:i:p:" opt; do
++ case $opt in
++ l )
++ mode="lock"
++ ;;
++ u )
++ mode="unlock"
++ ;;
++ s )
++ mode="status"
++ ;;
++ p )
++ vm_host=$OPTARG
++ ;;
++ n )
++ vm_name=$OPTARG
++ ;;
++ i )
++ vm_uuid=$OPTARG
++ ;;
++ \? )
++ usage
++ ;;
++ esac
++done
++
++shift $(($OPTIND - 1))
++vm_path=$1
++
++case $mode in
++ lock )
++ [ -z "$vm_path" ] || [ -z "$vm_name" ] || [ -z "$vm_uuid" ] || [ -z "$vm_host" ] && usage
++ $basedir/set-lock $vm_path $vm_name $vm_uuid $vm_host
++ ;;
++ unlock )
++ [ -z "$vm_path" ] || [ -z "$vm_name" ] || [ -z "$vm_uuid" ] || [ -z "$vm_host" ] && usage
++ remove_lock $vm_path $vm_name $vm_uuid $vm_host
++ ;;
++ status )
++ [ -z "$vm_path" ] && usage
++ get_status $vm_path
++ ;;
++esac
+Index: xen-3.4.0-testing/tools/hotplug/Linux/xen-monitor
+===================================================================
+--- /dev/null
++++ xen-3.4.0-testing/tools/hotplug/Linux/xen-monitor
+@@ -0,0 +1,41 @@
++#!/bin/bash
++
++basedir=$(dirname "$0")
++HA_TICK=2
++
++monitor() {
++ local path=$1
++ local name=$2
++ local uuid=$3
++ local host=$4
++ local count=0
++ path=$path/lock
++
++ while :
++ do
++ echo "name=$name uuid=$uuid host=$host count=$count" > $path
++ count=$(($count+1))
++ sleep $HA_TICK
++ done&
++}
++
++create_lock() {
++ local path=$1/lock
++ local rc=0
++
++ [ -f $path ] || touch $path
++ flock -x -w $HA_TICK $path $basedir/xen-monitor $*
++ rc=$?
++ if [ $rc -eq 1 ]; then
++ echo `cat $path`
++ exit 1
++ else
++ exit $rc
++ fi
++}
++
++if [ $0 = "$basedir/set-lock" ]; then
++ create_lock $*
++elif [ $0 = "$basedir/xen-monitor" ]; then
++ monitor $*
++fi
++++++ xen-destdir.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/docs/Makefile
+Index: xen-3.4.0-testing/docs/Makefile
===================================================================
---- xen-3.3.1-testing.orig/docs/Makefile
-+++ xen-3.3.1-testing/docs/Makefile
+--- xen-3.4.0-testing.orig/docs/Makefile
++++ xen-3.4.0-testing/docs/Makefile
@@ -90,7 +90,8 @@ install: all
$(INSTALL_DIR) $(DESTDIR)$(MANDIR)
cp -dR man1 $(DESTDIR)$(MANDIR)
@@ -22,108 +22,50 @@
+ ln -sf $*.html html.done/$*/index.html
+ rm -rf html/
+
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/security/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
-@@ -47,18 +47,6 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
- UDEV_RULES_DIR = /etc/udev
- UDEV_RULES = xen-backend.rules
-
--DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
--DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
--ifeq ($(findstring $(DI),$(DE)),$(DI))
--HOTPLUGS=install-hotplug install-udev
--else
--ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
--HOTPLUGS=install-udev
--else
--HOTPLUGS=install-hotplug
--endif
--endif
--
- .PHONY: all
- all:
-
-@@ -66,7 +54,7 @@ all:
- build:
-
- .PHONY: install
--install: all install-readmes install-initd install-configs install-scripts $(HOTPLUGS)
-+install: all install-readmes install-initd install-configs install-scripts install-udev
-
- .PHONY: install-readmes
- install-readmes:
-@@ -80,10 +68,10 @@ install-readmes:
- .PHONY: install-initd
- install-initd:
- [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
-- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
-+ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
- $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
- $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
-- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
-+ $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/var/adm/fillup-templates/
-
- .PHONY: install-configs
- install-configs: $(XEN_CONFIGS)
-@@ -124,8 +112,7 @@ install-udev:
- $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
- set -e; for i in $(UDEV_RULES); \
- do \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
-- ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
-+ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
- done
-
- .PHONY: clean
-Index: xen-3.3.1-testing/tools/security/Makefile
-===================================================================
---- xen-3.3.1-testing.orig/tools/security/Makefile
-+++ xen-3.3.1-testing/tools/security/Makefile
-@@ -64,9 +64,9 @@ install: all $(ACM_CONFIG_FILE)
+--- xen-3.4.0-testing.orig/tools/security/Makefile
++++ xen-3.4.0-testing/tools/security/Makefile
+@@ -61,7 +61,7 @@ install: all $(ACM_CONFIG_FILE)
$(INSTALL_DIR) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
$(INSTALL_PROG) $(ACM_INST_CGI) $(DESTDIR)$(ACM_SECGEN_CGIDIR)
- ifndef XEN_PYTHON_NATIVE_INSTALL
-- python python/setup.py install --install-lib="$(DESTDIR)$(LIBPATH)/python"
-+ python python/setup.py install --install-lib="$(DESTDIR)$(LIBPATH)/python" --prefix=""
- else
-- python python/setup.py install --root="$(DESTDIR)"
-+ python python/setup.py install --root="$(DESTDIR)" --prefix="/usr"
- endif
+ python python/setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
else
.PHONY: all
-Index: xen-3.3.1-testing/tools/pygrub/Makefile
+ all:
+Index: xen-3.4.0-testing/tools/pygrub/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/pygrub/Makefile
-+++ xen-3.3.1-testing/tools/pygrub/Makefile
-@@ -16,7 +16,7 @@ install: all
- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
- else
+--- xen-3.4.0-testing.orig/tools/pygrub/Makefile
++++ xen-3.4.0-testing/tools/pygrub/Makefile
+@@ -11,7 +11,7 @@ build:
+ .PHONY: install
install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr"
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
$(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
- endif
-Index: xen-3.3.1-testing/tools/python/Makefile
+ .PHONY: clean
+Index: xen-3.4.0-testing/tools/python/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/python/Makefile
-+++ xen-3.3.1-testing/tools/python/Makefile
-@@ -80,7 +80,7 @@ install: install-messages install-dtd
- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
- else
+--- xen-3.4.0-testing.orig/tools/python/Makefile
++++ xen-3.4.0-testing/tools/python/Makefile
+@@ -56,7 +56,7 @@ refresh-po: $(POTFILE)
+ .PHONY: install
install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
-+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --prefix="/usr" --force
- endif
+ CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install \
+- --prefix="$(PREFIX)" --root="$(DESTDIR)" --force
++ --prefix="/usr" --root="$(DESTDIR)" --force
install-dtd: all
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+ $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
-@@ -14,6 +14,7 @@ DEP = .*.d
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
+@@ -10,6 +10,7 @@ CFLAGS += $(CFLAGS_libxenctrl)
CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
CLIENTS += xenstore-write xenstore-ls
@@ -131,7 +73,7 @@
XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
-@@ -34,7 +35,7 @@ endif
+@@ -30,7 +31,7 @@ endif
all: libxenstore.so libxenstore.a xenstored clients xs_tdb_dump
.PHONY: clients
@@ -140,7 +82,7 @@
ifeq ($(CONFIG_SunOS),y)
xenstored_probes.h: xenstored_probes.d
-@@ -54,6 +55,9 @@ xenstored: $(XENSTORED_OBJS)
+@@ -50,6 +51,9 @@ xenstored: $(XENSTORED_OBJS)
$(CLIENTS): xenstore
ln -f xenstore $@
@@ -150,16 +92,16 @@
xenstore: xenstore_client.o $(LIBXENSTORE)
$(CC) $(CFLAGS) $(LDFLAGS) $< -L. -lxenstore $(SOCKET_LIBS) -o $@
-@@ -81,7 +85,7 @@ clean:
+@@ -77,7 +81,7 @@ clean:
rm -f *.a *.o *.opic *.so* xenstored_probes.h
rm -f xenstored xs_random xs_stress xs_crashme
rm -f xs_tdb_dump xenstore-control
- rm -f xenstore $(CLIENTS)
+ rm -f $(CLIENTS) $(CLIENTS_DOMU)
- $(RM) $(DEP)
+ $(RM) $(DEPS)
.PHONY: TAGS
-@@ -96,6 +100,7 @@ tarball: clean
+@@ -92,6 +96,7 @@ tarball: clean
install: all
$(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
$(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
@@ -167,9 +109,9 @@
$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-@@ -105,6 +110,9 @@ install: all
+@@ -101,6 +106,9 @@ install: all
set -e ; for c in $(CLIENTS) ; do \
- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
+ ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
done
+ for client in $(CLIENTS_DOMU); do \
+ $(INSTALL_PROG) $$client $(DESTDIR)/bin/$${client/domu-}; \
@@ -177,3 +119,55 @@
$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
$(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
+Index: xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+===================================================================
+--- xen-3.4.0-testing.orig/tools/hotplug/Linux/Makefile
++++ xen-3.4.0-testing/tools/hotplug/Linux/Makefile
+@@ -31,18 +31,6 @@ XEN_HOTPLUG_SCRIPTS = xen-backend.agent
+ UDEV_RULES_DIR = /etc/udev
+ UDEV_RULES = xen-backend.rules xend.rules
+
+-DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
+-DE = $(if $(DESTDIR),$(shell readlink -f $(DESTDIR)),)
+-ifeq ($(findstring $(DI),$(DE)),$(DI))
+-HOTPLUGS=install-hotplug install-udev
+-else
+-ifeq ($(shell [ -x /usr/bin/udevinfo ] && [ `/usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
+-HOTPLUGS=install-udev
+-else
+-HOTPLUGS=install-hotplug
+-endif
+-endif
+-
+ .PHONY: all
+ all:
+
+@@ -50,15 +38,15 @@ all:
+ build:
+
+ .PHONY: install
+-install: all install-initd install-scripts $(HOTPLUGS)
++install: all install-initd install-scripts install-udev
+
+ .PHONY: install-initd
+ install-initd:
+ [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
+- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
++ [ -d $(DESTDIR)/var/adm/fillup-templates ] || $(INSTALL_DIR) $(DESTDIR)/var/adm/fillup-templates/
+ $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
+ $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
+- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
++ $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/var/adm/fillup-templates/
+
+ .PHONY: install-scripts
+ install-scripts:
+@@ -88,8 +76,7 @@ install-udev:
+ $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
+ set -e; for i in $(UDEV_RULES); \
+ do \
+- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
+- ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
++ $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
+ done
+
+ .PHONY: clean
++++++ xen-disable-qemu-monitor.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -5,11 +5,11 @@
commands that can read/write dom0's state.
-Index: xen-3.3.1-testing/tools/ioemu-remote/monitor.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/monitor.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/monitor.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/monitor.c
-@@ -1320,6 +1320,7 @@ static term_cmd_t term_cmds[] = {
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/monitor.c
++++ xen-3.4.0-testing/tools/ioemu-remote/monitor.c
+@@ -1481,6 +1481,7 @@ static const term_cmd_t term_cmds[] = {
"device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
{ "info", "s?", do_info,
"subcommand", "show various information about the system state" },
@@ -17,7 +17,7 @@
{ "q|quit", "", do_quit,
"", "quit the emulator" },
{ "eject", "-fB", do_eject,
-@@ -1332,6 +1333,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1493,6 +1494,7 @@ static const term_cmd_t term_cmds[] = {
"filename", "output logs to 'filename'" },
{ "log", "s", do_log,
"item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
@@ -25,7 +25,7 @@
{ "savevm", "s?", do_savevm,
"tag|id", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
{ "loadvm", "s", do_loadvm,
-@@ -1361,12 +1363,14 @@ static term_cmd_t term_cmds[] = {
+@@ -1522,12 +1524,14 @@ static const term_cmd_t term_cmds[] = {
"", "reset the system" },
{ "system_powerdown", "", do_system_powerdown,
"", "send system power down event" },
@@ -40,7 +40,7 @@
#ifdef CONFIG_PHP_DEBUG
{ "pci_add", "s", do_pci_add,
"device", "insert PCI pass-through device by BDF,e.g. (dom, bus, dev, func) by hex '0x0, 0x3, 0x0, 0x0'" },
-@@ -1381,6 +1385,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1542,6 +1546,7 @@ static const term_cmd_t term_cmds[] = {
"state", "change mouse button state (1=L, 2=M, 4=R)" },
{ "mouse_set", "i", do_mouse_set,
"index", "set which mouse device receives events" },
@@ -48,26 +48,26 @@
#ifdef HAS_AUDIO
{ "wavcapture", "si?i?i?", do_wav_capture,
"path [frequency bits channels]",
-@@ -1388,6 +1393,7 @@ static term_cmd_t term_cmds[] = {
+@@ -1549,6 +1554,7 @@ static const term_cmd_t term_cmds[] = {
#endif
- { "stopcapture", "i", do_stop_capture,
- "capture index", "stop capture" },
+ { "stopcapture", "i", do_stop_capture,
+ "capture index", "stop capture" },
+#endif
{ "memsave", "lis", do_memory_save,
"addr size file", "save to disk virtual memory dump starting at 'addr' of size 'size'", },
{ "pmemsave", "lis", do_physical_memory_save,
-@@ -1434,6 +1440,7 @@ static term_cmd_t info_cmds[] = {
- "", "show kqemu information", },
+@@ -1628,6 +1634,7 @@ static const term_cmd_t info_cmds[] = {
+ "", "show KVM information", },
{ "usb", "", usb_info,
"", "show guest USB devices", },
+#ifdef CONFIG_TRUSTED_CLIENT
{ "usbhost", "", usb_host_info,
"", "show host USB devices", },
{ "profile", "", do_info_profile,
-@@ -1458,6 +1465,7 @@ static term_cmd_t info_cmds[] = {
- { "slirp", "", do_info_slirp,
- "", "show SLIRP statistics", },
- #endif
+@@ -1659,6 +1666,7 @@ static const term_cmd_t info_cmds[] = {
+ { "migrate", "", do_info_migrate, "", "show migration status" },
+ { "balloon", "", do_info_balloon,
+ "", "show balloon information" },
+#endif
{ NULL, NULL, },
};
++++++ xen-domUloader.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/python/xen/util/blkif.py
+Index: xen-3.4.0-testing/tools/python/xen/util/blkif.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/util/blkif.py
-+++ xen-3.3.1-testing/tools/python/xen/util/blkif.py
+--- xen-3.4.0-testing.orig/tools/python/xen/util/blkif.py
++++ xen-3.4.0-testing/tools/python/xen/util/blkif.py
@@ -71,23 +71,24 @@ def blkdev_segment(name):
'type' : 'Disk' }
return val
@@ -12,7 +12,7 @@
+ fn = typ = taptype = None
if uname.find(":") != -1:
(typ, fn) = uname.split(":", 1)
- if typ == "phy" and not fn.startswith("/"):
+ if typ in ("phy", "drbd") and not fn.startswith("/"):
fn = "/dev/%s" %(fn,)
if typ == "tap":
(taptype, fn) = fn.split(":", 1)
@@ -32,11 +32,11 @@
def mount_mode(name):
mode = None
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/DevController.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/DevController.py
-@@ -620,6 +620,31 @@ class DevController:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/DevController.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/DevController.py
+@@ -593,6 +593,31 @@ class DevController:
return (Missing, None)
@@ -68,22 +68,20 @@
def backendPath(self, backdom, devid):
"""Construct backend path given the backend domain and device id.
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendBootloader.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendBootloader.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendBootloader.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendBootloader.py
-@@ -12,8 +12,9 @@
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendBootloader.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendBootloader.py
+@@ -12,7 +12,7 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-import os, select, errno, stat, signal, tty
+import os, select, errno, stat, signal, tty, time
import random
-+import re
import shlex
from xen.xend import sxp
-
-@@ -38,8 +39,25 @@ def bootloader(blexec, disk, dom, quiet
+@@ -38,8 +38,25 @@ def bootloader(blexec, disk, dom, quiet
msg = "Bootloader isn't executable"
log.error(msg)
raise VmError(msg)
@@ -111,25 +109,10 @@
log.error(msg)
raise VmError(msg)
-@@ -184,3 +202,14 @@ def bootloader_tidy(dom):
- os.kill(pid, signal.SIGKILL)
-
-
-+def bootfilter(bootloader, bootloader_args, vdisk):
-+ """Is this virtual disk ok to boot from?"""
-+ if vdisk.endswith(':disk'):
-+ vdisk = vdisk[:-5] # temporary work-around for bug 237414
-+ if bootloader.endswith('domUloader.py'):
-+ for arg in bootloader_args.split():
-+ if arg.startswith('--entry='):
-+ m = re.match(r'^([hsx]v?d[a-z])[0-9]*:[^,]*(,[^,]*)?$', arg[8:])
-+ if m:
-+ return vdisk == m.group(1) or vdisk == m.group(2)
-+ return True
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -35,7 +35,7 @@ from types import StringTypes
import xen.lowlevel.xc
@@ -139,16 +122,7 @@
import xen.util.xsm.xsm as security
from xen.util import xsconstants
-@@ -43,7 +43,7 @@ from xen.xend import balloon, sxp, uuid,
- from xen.xend import XendOptions, XendNode, XendConfig
-
- from xen.xend.XendConfig import scrub_password
--from xen.xend.XendBootloader import bootloader, bootloader_tidy
-+from xen.xend.XendBootloader import bootloader, bootloader_tidy, bootfilter
- from xen.xend.XendError import XendError, VmError
- from xen.xend.XendDevices import XendDevices
- from xen.xend.XendTask import XendTask
-@@ -1878,6 +1878,10 @@ class XendDomainInfo:
+@@ -2134,6 +2134,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid'])
@@ -159,21 +133,7 @@
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath)
-@@ -2569,8 +2573,11 @@ class XendDomainInfo:
- blexec = osdep.pygrub_path
-
- blcfg = None
-- disks = [x for x in self.info['vbd_refs']
-- if self.info['devices'][x][1]['bootable']]
-+ disks = []
-+ for x in self.info['vbd_refs']:
-+ vdisk = self.info['devices'][x][1]['dev']
-+ if bootfilter(blexec, bootloader_args, vdisk):
-+ disks.append(x)
-
- if not disks:
- msg = "Had a bootloader specified, but no disks are bootable"
-@@ -2581,13 +2588,10 @@ class XendDomainInfo:
+@@ -2892,9 +2896,19 @@ class XendDomainInfo:
devtype = devinfo[0]
disk = devinfo[1]['uname']
@@ -181,16 +141,22 @@
- taptype = blkdev_uname_to_taptype(disk)
- mounted = devtype == 'tap' and taptype != 'aio' and taptype != 'sync' and not os.stat(fn).st_rdev
+ (fn, types) = parse_uname(disk)
-+ mounted = (types[0] not in ('file', 'phy'))
++
++ def _shouldMount(types):
++ if types[0] in ('file', 'phy'):
++ return False
++ if types[0] == 'tap':
++ if types[1] in ('aio', 'sync'):
++ return False
++ else:
++ return True
++ return os.access('/etc/xen/scripts/block-%s' % types[0], os.X_OK)
++
++ mounted = _shouldMount(types)
if mounted:
-- # This is a file, not a device. pygrub can cope with a
-- # file if it's raw, but if it's QCOW or other such formats
-- # used through blktap, then we need to mount it first.
-+ # This is not a raw file or device, so we need to mount it first.
-
- log.info("Mounting %s on %s." %
- (fn, BOOTLOADER_LOOPBACK_DEVICE))
-@@ -2599,7 +2603,9 @@ class XendDomainInfo:
+ # This is a file, not a device. pygrub can cope with a
+ # file if it's raw, but if it's QCOW or other such formats
+@@ -2910,7 +2924,9 @@ class XendDomainInfo:
from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain()
@@ -201,12 +167,16 @@
fn = BOOTLOADER_LOOPBACK_DEVICE
try:
-@@ -2610,7 +2616,7 @@ class XendDomainInfo:
+@@ -2920,8 +2936,10 @@ class XendDomainInfo:
+ if mounted:
log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))
-
+-
- dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
-+ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
++ if devtype == 'tap':
++ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
++ else:
++ dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE)
if blcfg is None:
msg = "Had a bootloader specified, but can't find disk"
++++++ xen-fixme-doc.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -335,16 +335,10 @@ at hda1, which is the root filesystem.
=item I<NFS Root>
@@ -19,10 +19,10 @@
=back
=head1 SEE ALSO
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -297,7 +297,8 @@ scheduling by the Xen hypervisor.
=item B
++++++ xen-hvm-default-bridge.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,9 +1,9 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/net.h
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -134,8 +134,8 @@ int inet_aton(const char *cp, struct in_
- #include "exec-all.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/net.h
++++ xen-3.4.0-testing/tools/ioemu-remote/net.h
+@@ -107,8 +107,8 @@ void net_host_device_add(const char *dev
+ void net_host_device_remove(int vlan_id, const char *device);
#ifndef DEFAULT_NETWORK_SCRIPT
-#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
@@ -13,26 +13,28 @@
#endif
#ifdef __sun__
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
-@@ -4997,10 +4997,10 @@ static int net_client_init(const char *s
- pstrcpy(down_script, sizeof(down_script), DEFAULT_NETWORK_DOWN_SCRIPT);
+Index: xen-3.4.0-testing/tools/ioemu-remote/net.c
+===================================================================
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/net.c
++++ xen-3.4.0-testing/tools/ioemu-remote/net.c
+@@ -1759,9 +1759,10 @@ int net_client_init(const char *device,
}
if (get_param_value(script_arg, sizeof(script_arg), "scriptarg", p) == 0 &&
-- get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) { /* deprecated; for xend compatibility */
+ get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) { /* deprecated; for xend compatibility */
- pstrcpy(script_arg, sizeof(script_arg), "");
-- }
-- ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
-+ get_param_value(script_arg, sizeof(script_arg), "bridge", p) == 0) /* deprecated; for xend compatibility */
-+ ret = net_tap_init(vlan, ifname, setup_script, NULL, NULL);
-+ else
-+ ret = net_tap_init(vlan, ifname, setup_script, down_script, script_arg);
++ ret = net_tap_init(vlan, device, name, ifname, setup_script, NULL, NULL);
++ } else {
++ ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script, script_arg);
+ }
+- ret = net_tap_init(vlan, device, name, ifname, setup_script, down_script, script_arg);
}
} else
#endif
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -764,14 +764,16 @@ class HVMImageHandler(ImageHandler):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -832,14 +832,16 @@ class HVMImageHandler(ImageHandler):
mac = devinfo.get('mac')
if mac is None:
raise VmError("MAC address not specified or generated.")
@@ -52,10 +54,10 @@
if nics == 0:
ret.append("-net")
-Index: xen-3.3.1-testing/tools/ioemu-remote/i386-dm/qemu-ifup
+Index: xen-3.4.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup
-+++ xen-3.3.1-testing/tools/ioemu-remote/i386-dm/qemu-ifup
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/i386-dm/qemu-ifup
++++ xen-3.4.0-testing/tools/ioemu-remote/i386-dm/qemu-ifup
@@ -1,36 +1,22 @@
#!/bin/sh
++++++ xen-hvm-default-pae.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,15 +1,15 @@
PAE must be on for 64-on-64 to work at all.
-Index: xen-3.3.1-testing/tools/python/xen/xend/image.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/image.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/image.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/image.py
-@@ -871,7 +871,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/image.py
++++ xen-3.4.0-testing/tools/python/xen/xend/image.py
+@@ -943,7 +943,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
def configure(self, vmConfig):
HVMImageHandler.configure(self, vmConfig)
- self.pae = int(vmConfig['platform'].get('pae', 0))
+ self.pae = int(vmConfig['platform'].get('pae', 1))
+ self.vramsize = int(vmConfig['platform'].get('videoram',4)) * 1024
def buildDomain(self):
- xc.hvm_set_param(self.vm.getDomid(), HVM_PARAM_PAE_ENABLED, self.pae)
++++++ xen-ioapic-ack-default.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,9 +1,11 @@
Change default IO-APIC ack mode for single IO-APIC systems to old-style. Jan
---- a/xen/arch/x86/io_apic.c
-+++ b/xen/arch/x86/io_apic.c
-@@ -1354,7 +1354,7 @@ static unsigned int startup_level_ioapic
+Index: xen-3.4.0-testing/xen/arch/x86/io_apic.c
+===================================================================
+--- xen-3.4.0-testing.orig/xen/arch/x86/io_apic.c
++++ xen-3.4.0-testing/xen/arch/x86/io_apic.c
+@@ -1298,7 +1298,7 @@ static unsigned int startup_level_ioapic
return 0; /* don't check for pending */
}
@@ -12,7 +14,7 @@
static void setup_ioapic_ack(char *s)
{
if ( !strcmp(s, "old") )
-@@ -1854,6 +1854,8 @@ void __init setup_IO_APIC(void)
+@@ -1802,6 +1802,8 @@ void __init setup_IO_APIC(void)
else
io_apic_irqs = ~PIC_IRQS;
++++++ xen-ioemu-hvm-pv-support.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,114 +1,17 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/ide.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/ide.c
-@@ -485,6 +485,9 @@ typedef struct PCIIDEState {
- } PCIIDEState;
-
-
-+static PCIIDEState *principal_ide_controller;
-+extern FILE *logfile;
-+
- #if defined(__ia64__)
- #include
-
-@@ -2770,6 +2773,27 @@ static void ide_reset(IDEState *s)
- s->media_changed = 0;
- }
-
-+void ide_unplug_harddisks(void)
-+{
-+ IDEState *s;
-+ int i;
-+
-+ if (!principal_ide_controller) {
-+ fprintf(logfile, "No principal controller?\n");
-+ return;
-+ }
-+ for (i = 0; i < 4; i++) {
-+ s = principal_ide_controller->ide_if + i;
-+ if (!s->bs)
-+ continue; /* drive not present */
-+ if (s->is_cdrom)
-+ continue; /* cdrom */
-+ /* Is a hard disk, unplug it. */
-+ s->bs = NULL;
-+ ide_reset(s);
-+ }
-+}
-+
- struct partition {
- uint8_t boot_ind; /* 0x80 - active */
- uint8_t head; /* starting head */
-@@ -3282,6 +3306,10 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
- sizeof(PCIIDEState),
- -1,
- NULL, NULL);
-+ if (principal_ide_controller)
-+ abort();
-+ principal_ide_controller = d;
-+
- d->type = IDE_TYPE_CMD646;
- pci_conf = d->dev.config;
- pci_conf[0x00] = 0x95; // CMD646
-@@ -3413,6 +3441,10 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
- NULL, NULL);
- d->type = IDE_TYPE_PIIX3;
-
-+ if (principal_ide_controller)
-+ abort();
-+ principal_ide_controller = d;
-+
- pci_conf = d->dev.config;
- pci_conf[0x00] = 0x86; // Intel
- pci_conf[0x01] = 0x80;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/pci.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/pci.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/pci.c
-@@ -648,6 +648,28 @@ void pci_nic_init(PCIBus *bus, NICInfo *
- }
- }
-
-+void pci_unplug_netifs(void)
-+{
-+ PCIBus *bus;
-+ int x;
-+
-+ /* We only support one PCI bus */
-+ for (bus = first_bus; bus; bus = NULL) {
-+ for (x = 0; x < 256; x++) {
-+ if (bus->devices[x] &&
-+ bus->devices[x]->config[0xa] == 0 &&
-+ bus->devices[x]->config[0xb] == 2) {
-+ /* Found a netif. Remove it from the bus. Note that
-+ we don't free it here, since there could still be
-+ references to it floating around. There are only
-+ ever one or two structures leaked, and it's not
-+ worth finding them all. */
-+ bus->devices[x] = NULL;
-+ }
-+ }
-+ }
-+}
-+
- typedef struct {
- PCIDevice dev;
- PCIBus *bus;
-Index: xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/hw/xen_platform.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/hw/xen_platform.c
-@@ -26,6 +26,8 @@
- #include "hw.h"
- #include "pci.h"
- #include "irq.h"
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/hw/xen_platform.c
++++ xen-3.4.0-testing/tools/ioemu-remote/hw/xen_platform.c
+@@ -30,6 +30,8 @@
+ #include "qemu-xen.h"
+ #include "net.h"
+ #include "xen_platform.h"
+#include "sysemu.h"
+#include
+ #include
#include
-
-@@ -71,12 +73,53 @@ static void xen_platform_ioport_writeb(v
+@@ -326,11 +328,51 @@ static void xen_platform_ioport_writeb(v
}
}
@@ -147,7 +50,6 @@
+ }
+}
+
-
static void platform_ioport_map(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type)
{
+ ioport_base = addr;
@@ -155,124 +57,9 @@
+ register_ioport_write(addr, 16, 4, platform_ioport_write, NULL);
+/*
PCIXenPlatformState *d = (PCIXenPlatformState *)pci_dev;
-+
register_ioport_write(addr, size, 1, xen_platform_ioport_writeb, d);
register_ioport_read(addr, size, 1, xen_platform_ioport_readb, d);
+*/
}
static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
-Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
-@@ -259,6 +259,20 @@ static int event_pending = 1;
-
- #include "xen-vl-extra.c"
-
-+typedef struct IOHandlerRecord {
-+ int fd;
-+ IOCanRWHandler *fd_read_poll;
-+ IOHandler *fd_read;
-+ IOHandler *fd_write;
-+ int deleted;
-+ void *opaque;
-+ /* temporary data */
-+ struct pollfd *ufd;
-+ struct IOHandlerRecord *next;
-+} IOHandlerRecord;
-+
-+static IOHandlerRecord *first_io_handler;
-+
- /***********************************************************/
- /* x86 ISA bus support */
-
-@@ -4054,6 +4068,7 @@ typedef struct TAPState {
- int fd;
- char down_script[1024];
- char script_arg[1024];
-+ struct TAPState *next;
- } TAPState;
-
- static void tap_receive(void *opaque, const uint8_t *buf, int size)
-@@ -4089,6 +4104,36 @@ static void tap_send(void *opaque)
- }
- }
-
-+static TAPState *head_net_tap;
-+
-+void net_tap_shutdown_all(void)
-+{
-+ struct IOHandlerRecord **pioh, *ioh;
-+
-+ while (head_net_tap) {
-+ pioh = &first_io_handler;
-+ for (;;) {
-+ ioh = *pioh;
-+ if (ioh == NULL)
-+ break;
-+ if (ioh->fd == head_net_tap->fd) {
-+ *pioh = ioh->next;
-+ qemu_free(ioh);
-+ break;
-+ }
-+ pioh = &ioh->next;
-+ }
-+ if (!ioh)
-+ fprintf(stderr,
-+ "warning: can't find iohandler for %d to close it properly.\n",
-+ head_net_tap->fd);
-+ close(head_net_tap->fd);
-+ head_net_tap = head_net_tap->next;
-+ }
-+}
-+
-+
-+
- /* fd support */
-
- static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
-@@ -4100,6 +4145,8 @@ static TAPState *net_tap_fd_init(VLANSta
- return NULL;
- s->fd = fd;
- s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
-+ s->next = head_net_tap;
-+ head_net_tap = s;
- qemu_set_fd_handler(s->fd, tap_send, NULL, s);
- snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
- return s;
-@@ -5674,20 +5721,6 @@ static void dumb_display_init(DisplaySta
-
- #define MAX_IO_HANDLERS 64
-
--typedef struct IOHandlerRecord {
-- int fd;
-- IOCanRWHandler *fd_read_poll;
-- IOHandler *fd_read;
-- IOHandler *fd_write;
-- int deleted;
-- void *opaque;
-- /* temporary data */
-- struct pollfd *ufd;
-- struct IOHandlerRecord *next;
--} IOHandlerRecord;
--
--static IOHandlerRecord *first_io_handler;
--
- /* XXX: fd_read_poll should be suppressed, but an API change is
- necessary in the character devices to suppress fd_can_read(). */
- int qemu_set_fd_handler2(int fd,
-Index: xen-3.3.1-testing/tools/ioemu-remote/sysemu.h
-===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/sysemu.h
-+++ xen-3.3.1-testing/tools/ioemu-remote/sysemu.h
-@@ -49,6 +49,9 @@ void do_loadvm(const char *name);
- void do_delvm(const char *name);
- void do_info_snapshots(void);
-
-+void net_tap_shutdown_all(void);
-+void pci_unplug_netifs(void);
-+
- void main_loop_wait(int timeout);
-
- /* Polling handling */
++++++ xen-max-free-mem.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendNode.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendNode.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendNode.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendNode.py
-@@ -650,11 +650,35 @@ class XendNode:
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendNode.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendNode.py
+@@ -809,11 +809,35 @@ class XendNode:
info['cpu_mhz'] = info['cpu_khz'] / 1000
@@ -43,7 +43,7 @@
ITEM_ORDER = ['nr_cpus',
'nr_nodes',
-@@ -665,6 +689,9 @@ class XendNode:
+@@ -824,6 +848,9 @@ class XendNode:
'virt_caps',
'total_memory',
'free_memory',
@@ -53,10 +53,10 @@
'node_to_cpu',
'node_to_memory'
]
-Index: xen-3.3.1-testing/tools/python/xen/xend/balloon.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/balloon.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/balloon.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/balloon.py
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/balloon.py
++++ xen-3.4.0-testing/tools/python/xen/xend/balloon.py
@@ -41,6 +41,8 @@ SLEEP_TIME_GROWTH = 0.1
# label actually shown in the PROC_XEN_BALLOON file.
#labels = { 'current' : 'Current allocation',
@@ -87,16 +87,16 @@
+ raise VmError('Failed to query maximum target memory allocation of dom0.')
+ return kb
+
- def free(need_mem):
+ def free(need_mem, dominfo):
"""Balloon out memory from the privileged domain so that there is the
specified required amount (in KiB) free.
-Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1046,6 +1046,27 @@ class XendDomainInfo:
-
- return None
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/XendDomainInfo.py
++++ xen-3.4.0-testing/tools/python/xen/xend/XendDomainInfo.py
+@@ -1294,6 +1294,27 @@ class XendDomainInfo:
+ dev_str_list = dev_str_list + [dev_str]
+ return dev_str_list
+ def capAndSetMemoryTarget(self, target):
+ """Potentially lowers the requested target to the largest possible
@@ -122,11 +122,11 @@
def setMemoryTarget(self, target):
"""Set the memory target of this domain.
@param target: In MiB.
-Index: xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
+Index: xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xend/server/SrvDomain.py
-+++ xen-3.3.1-testing/tools/python/xen/xend/server/SrvDomain.py
-@@ -171,7 +171,7 @@ class SrvDomain(SrvDir):
+--- xen-3.4.0-testing.orig/tools/python/xen/xend/server/SrvDomain.py
++++ xen-3.4.0-testing/tools/python/xen/xend/server/SrvDomain.py
+@@ -172,7 +172,7 @@ class SrvDomain(SrvDir):
def op_mem_target_set(self, _, req):
++++++ xen-no-dummy-nfs-ip.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -1081,9 +1081,8 @@ def preprocess_access_control(vals):
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -1160,9 +1160,8 @@ def preprocess_access_control(vals):
def preprocess_ip(vals):
if vals.ip or vals.dhcp != 'off':
++++++ xen-paths.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,8 +1,8 @@
-Index: xen-3.3.1-testing/tools/python/xen/xm/create.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/create.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/create.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/create.py
-@@ -70,7 +70,7 @@ gopts.opt('quiet', short='q',
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/create.py
++++ xen-3.4.0-testing/tools/python/xen/xm/create.py
+@@ -72,7 +72,7 @@ gopts.opt('quiet', short='q',
use="Quiet.")
gopts.opt('path', val='PATH',
@@ -11,10 +11,10 @@
use="Search path for configuration scripts. "
"The value of PATH is a colon-separated directory list.")
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -77,7 +77,7 @@ in the config file. See L
format, and possible options used in either the configfile or for I<vars>.
@@ -33,10 +33,10 @@
soon as it is run.
=item I<without config file>
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for
=head1 SYNOPSIS
++++++ xen-qemu-iscsi-fix.patch ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:25.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:25.000000000 +0200
@@ -1,20 +1,20 @@
-Index: xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
+Index: xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
===================================================================
---- xen-3.3.1-testing.orig/tools/ioemu-remote/xenstore.c
-+++ xen-3.3.1-testing/tools/ioemu-remote/xenstore.c
-@@ -153,7 +153,7 @@ void xenstore_parse_domain_config(int hv
- char *buf = NULL, *path;
+--- xen-3.4.0-testing.orig/tools/ioemu-remote/xenstore.c
++++ xen-3.4.0-testing/tools/ioemu-remote/xenstore.c
+@@ -313,7 +313,7 @@ void xenstore_parse_domain_config(int hv
+ char *buf = NULL;
char *fpath = NULL, *bpath = NULL, *btype = NULL,
- *dev = NULL, *params = NULL, *type = NULL, *drv = NULL;
+ *dev = NULL, *params = NULL, *drv = NULL;
- int i, any_hdN = 0, ret, is_tap;
+ int i, j, any_hdN = 0, ret, is_tap;
unsigned int len, num, hd_index, pci_devid = 0;
BlockDriverState *bs;
BlockDriver *format;
-@@ -238,12 +238,7 @@ void xenstore_parse_domain_config(int hv
+@@ -400,12 +400,7 @@ void xenstore_parse_domain_config(int hv
continue;
- free(type);
- type = xs_read(xsh, XBT_NULL, buf, &len);
+ free(danger_type);
+ danger_type = xs_read(xsh, XBT_NULL, danger_buf, &len);
- if (pasprintf(&buf, "%s/params", bpath) == -1)
- continue;
- free(params);
@@ -25,13 +25,13 @@
/* read the name of the device */
if (pasprintf(&buf, "%s/type", bpath) == -1)
continue;
-@@ -251,6 +246,35 @@ void xenstore_parse_domain_config(int hv
+@@ -413,6 +408,35 @@ void xenstore_parse_domain_config(int hv
drv = xs_read(xsh, XBT_NULL, buf, &len);
if (drv == NULL)
continue;
+
+ free(params);
-+ if (!strcmp(drv,"iscsi"))
++ if (!strcmp(drv,"iscsi"))
+ {
+ if (pasprintf(&buf, "%s/node", bpath) == -1)
+ continue;
@@ -50,7 +50,7 @@
+ }
+ }
+ else
-+ {
++ {
+ if (pasprintf(&buf, "%s/params", bpath) == -1)
+ continue;
+ params = xs_read(xsh, XBT_NULL, buf, &len);
++++++ xen-rpmoptflags.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/blktap/drivers/Makefile
+Index: xen-3.4.0-testing/tools/blktap/drivers/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/blktap/drivers/Makefile
-+++ xen-3.3.1-testing/tools/blktap/drivers/Makefile
+--- xen-3.4.0-testing.orig/tools/blktap/drivers/Makefile
++++ xen-3.4.0-testing/tools/blktap/drivers/Makefile
@@ -5,7 +5,6 @@ IBIN = blktapctrl tapdisk
QCOW_UTIL = img2qcow qcow2raw qcow-create
LIBAIO_DIR = ../../libaio/src
@@ -10,10 +10,10 @@
CFLAGS += -Wno-unused
CFLAGS += -I../lib
CFLAGS += $(CFLAGS_libxenctrl)
-Index: xen-3.3.1-testing/Config.mk
+Index: xen-3.4.0-testing/Config.mk
===================================================================
---- xen-3.3.1-testing.orig/Config.mk
-+++ xen-3.3.1-testing/Config.mk
+--- xen-3.4.0-testing.orig/Config.mk
++++ xen-3.4.0-testing/Config.mk
@@ -14,7 +14,7 @@ SHELL ?= /bin/sh
# Tools to run on system hosting the build
++++++ xen-warnings.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/misc/miniterm/miniterm.c
+Index: xen-3.4.0-testing/tools/misc/miniterm/miniterm.c
===================================================================
---- xen-3.3.1-testing.orig/tools/misc/miniterm/miniterm.c
-+++ xen-3.3.1-testing/tools/misc/miniterm/miniterm.c
+--- xen-3.4.0-testing.orig/tools/misc/miniterm/miniterm.c
++++ xen-3.4.0-testing/tools/misc/miniterm/miniterm.c
@@ -157,7 +157,7 @@ int main(int argc, char **argv)
case 0:
close(1); /* stdout not needed */
@@ -35,10 +35,10 @@
break;
}
-Index: xen-3.3.1-testing/tools/libxc/xc_dom_elfloader.c
+Index: xen-3.4.0-testing/tools/libxc/xc_dom_elfloader.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxc/xc_dom_elfloader.c
-+++ xen-3.3.1-testing/tools/libxc/xc_dom_elfloader.c
+--- xen-3.4.0-testing.orig/tools/libxc/xc_dom_elfloader.c
++++ xen-3.4.0-testing/tools/libxc/xc_dom_elfloader.c
@@ -193,8 +193,9 @@ static int xc_dom_load_elf_symtab(struct
if ( load )
@@ -50,10 +50,10 @@
elf_section_start(elf, shdr2),
size);
}
-Index: xen-3.3.1-testing/tools/xenstore/Makefile
+Index: xen-3.4.0-testing/tools/xenstore/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/Makefile
-+++ xen-3.3.1-testing/tools/xenstore/Makefile
+--- xen-3.4.0-testing.orig/tools/xenstore/Makefile
++++ xen-3.4.0-testing/tools/xenstore/Makefile
@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
MAJOR = 3.0
MINOR = 0
@@ -63,10 +63,10 @@
CFLAGS += -I.
CFLAGS += $(CFLAGS_libxenctrl)
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_core.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_core.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_core.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_core.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_core.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_core.c
@@ -77,8 +77,8 @@ static void check_store(void);
int quota_nb_entry_per_domain = 1000;
@@ -91,10 +91,10 @@
break;
case 'T':
tracefile = optarg;
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_domain.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_domain.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_domain.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_domain.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_domain.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_domain.c
@@ -212,7 +212,7 @@ void handle_event(void)
{
evtchn_port_t port;
@@ -113,10 +113,10 @@
return -1;
dom0 = new_domain(NULL, 0, port);
-Index: xen-3.3.1-testing/tools/xenstore/xenstored_transaction.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstored_transaction.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstored_transaction.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstored_transaction.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstored_transaction.c
++++ xen-3.4.0-testing/tools/xenstore/xenstored_transaction.c
@@ -82,7 +82,7 @@ struct transaction
struct list_head changed_domains;
};
@@ -126,10 +126,10 @@
static unsigned int generation;
/* Return tdb context to use for this connection. */
-Index: xen-3.3.1-testing/tools/xenstore/xenstore_client.c
+Index: xen-3.4.0-testing/tools/xenstore/xenstore_client.c
===================================================================
---- xen-3.3.1-testing.orig/tools/xenstore/xenstore_client.c
-+++ xen-3.3.1-testing/tools/xenstore/xenstore_client.c
+--- xen-3.4.0-testing.orig/tools/xenstore/xenstore_client.c
++++ xen-3.4.0-testing/tools/xenstore/xenstore_client.c
@@ -251,7 +251,7 @@ do_chmod(char *path, struct xs_permissio
char **xsval = xs_directory(xsh, xth, path, &xsval_n);
@@ -139,11 +139,11 @@
for (i = 0; i < xsval_n; i++) {
snprintf(buf, MAX_PATH_LEN, "%s/%s", path, xsval[i]);
-Index: xen-3.3.1-testing/tools/libxen/src/xen_common.c
+Index: xen-3.4.0-testing/tools/libxen/src/xen_common.c
===================================================================
---- xen-3.3.1-testing.orig/tools/libxen/src/xen_common.c
-+++ xen-3.3.1-testing/tools/libxen/src/xen_common.c
-@@ -1055,6 +1055,8 @@ static size_t size_of_member(const abstr
+--- xen-3.4.0-testing.orig/tools/libxen/src/xen_common.c
++++ xen-3.4.0-testing/tools/libxen/src/xen_common.c
+@@ -1057,6 +1057,8 @@ static size_t size_of_member(const abstr
default:
assert(false);
}
@@ -152,7 +152,7 @@
}
-@@ -1566,6 +1568,8 @@ get_val_as_string(const struct abstract_
+@@ -1568,6 +1570,8 @@ get_val_as_string(const struct abstract_
default:
assert(false);
}
++++++ xen-xmexample.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,9 +1,9 @@
Change various example paths in the config files to match SUSE.
-Index: xen-3.3.1-testing/tools/examples/xmexample1
+Index: xen-3.4.0-testing/tools/examples/xmexample1
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample1
-+++ xen-3.3.1-testing/tools/examples/xmexample1
+--- xen-3.4.0-testing.orig/tools/examples/xmexample1
++++ xen-3.4.0-testing/tools/examples/xmexample1
@@ -7,11 +7,13 @@
#============================================================================
@@ -43,10 +43,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/tools/examples/xmexample2
+Index: xen-3.4.0-testing/tools/examples/xmexample2
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample2
-+++ xen-3.3.1-testing/tools/examples/xmexample2
+--- xen-3.4.0-testing.orig/tools/examples/xmexample2
++++ xen-3.4.0-testing/tools/examples/xmexample2
@@ -35,11 +35,13 @@ xm_vars.var('vmid',
xm_vars.check()
@@ -86,10 +86,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/tools/examples/xmexample3
+Index: xen-3.4.0-testing/tools/examples/xmexample3
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample3
-+++ xen-3.3.1-testing/tools/examples/xmexample3
+--- xen-3.4.0-testing.orig/tools/examples/xmexample3
++++ xen-3.4.0-testing/tools/examples/xmexample3
@@ -35,11 +35,13 @@ xm_vars.var('vmid',
xm_vars.check()
@@ -109,11 +109,11 @@
# The domain build function. Default is 'linux'.
#builder='linux'
-Index: xen-3.3.1-testing/tools/examples/xmexample.hvm
+Index: xen-3.4.0-testing/tools/examples/xmexample.hvm
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/xmexample.hvm
-+++ xen-3.3.1-testing/tools/examples/xmexample.hvm
-@@ -73,7 +73,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ]
+--- xen-3.4.0-testing.orig/tools/examples/xmexample.hvm
++++ xen-3.4.0-testing/tools/examples/xmexample.hvm
+@@ -81,7 +81,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ]
# and MODE is r for read-only, w for read-write.
#disk = [ 'phy:hda1,hda1,r' ]
@@ -122,10 +122,10 @@
#----------------------------------------------------------------------------
# Configure the behaviour when a domain exits. There are three 'reasons'
-Index: xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+Index: xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xmdomain.cfg.pod.5
-+++ xen-3.3.1-testing/docs/man/xmdomain.cfg.pod.5
+--- xen-3.4.0-testing.orig/docs/man/xmdomain.cfg.pod.5
++++ xen-3.4.0-testing/docs/man/xmdomain.cfg.pod.5
@@ -38,13 +38,13 @@ file.
The kernel image for the domain. The format of the parameter is the
@@ -161,10 +161,10 @@
at hda1, which is the root filesystem.
=item I<NFS Root>
-Index: xen-3.3.1-testing/docs/man/xm.pod.1
+Index: xen-3.4.0-testing/docs/man/xm.pod.1
===================================================================
---- xen-3.3.1-testing.orig/docs/man/xm.pod.1
-+++ xen-3.3.1-testing/docs/man/xm.pod.1
+--- xen-3.4.0-testing.orig/docs/man/xm.pod.1
++++ xen-3.4.0-testing/docs/man/xm.pod.1
@@ -163,8 +163,8 @@ soon as it is run.
=item I<without config file>
++++++ xen-xmexample-vti.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/examples/Makefile
+Index: xen-3.4.0-testing/tools/examples/Makefile
===================================================================
---- xen-3.3.1-testing.orig/tools/examples/Makefile
-+++ xen-3.3.1-testing/tools/examples/Makefile
+--- xen-3.4.0-testing.orig/tools/examples/Makefile
++++ xen-3.4.0-testing/tools/examples/Makefile
@@ -20,7 +20,6 @@ XEN_CONFIGS += xmexample.hvm-stubdom
XEN_CONFIGS += xmexample.hvm-dm
XEN_CONFIGS += xmexample.pv-grub
++++++ xen-xm-top-needs-root.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,11 +1,11 @@
From: Charles Coffing
Upstream: no
-Index: xen-3.3.1-testing/tools/python/xen/xm/main.py
+Index: xen-3.4.0-testing/tools/python/xen/xm/main.py
===================================================================
---- xen-3.3.1-testing.orig/tools/python/xen/xm/main.py
-+++ xen-3.3.1-testing/tools/python/xen/xm/main.py
-@@ -1938,6 +1938,10 @@ def xm_debug_keys(args):
+--- xen-3.4.0-testing.orig/tools/python/xen/xm/main.py
++++ xen-3.4.0-testing/tools/python/xen/xm/main.py
+@@ -1917,6 +1917,10 @@ def xm_debug_keys(args):
def xm_top(args):
arg_check(args, "top", 0)
++++++ xmclone.sh ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -23,7 +23,7 @@
#
# Defaults
#
-VERSION=0.4.4
+VERSION=0.4.5
XEN_CONFIGS=/etc/xen/vm/
XEN_BASE=/var/lib/xen/images/
SOURCE=
@@ -426,6 +426,18 @@
[ -z "$IP" ] && break
done
+ if [ -z "$MASK" ]
+ then
+ echo "You have not specified a network mask in bits. Please enter one now. Default is 24 "
+ read -p "Network mask? " MASK
+ fi
+ while [ -n "$MASK" ] && [ "${MASK/**/ok}" != "ok" ]
+ do
+ echo "The Network mask you specified is invalid. If you wish, enter a new one now."
+ read -p "Network mask? " MASK
+ [ -z "$MASK" ] && MASK=24
+ done
+
if [ -z "$MAC" ]
then
newMAC=""
@@ -461,6 +473,7 @@
else
HOSTNAME=
IP=
+ MASK=
MAC=
fi
@@ -647,11 +660,26 @@
pushd "$tmpdir" > /dev/null
#
+ # Find out if we are looking at SLE10
+ #
+ SLE10=
+ if [ -f etc/SuSE-release ]
+ then
+ OSVER=`cat etc/SuSE-release | sed -n 1p | awk -F'(' '{ print $1 }' | sed 's/ $//g'`
+ if [ "$OSVER" == "openSUSE 10" -o \
+ "$OSVER" == "SUSE Linux Enterprise Server 10" -o \
+ "$OSVER" == "SUSE Linux Enterprise Desktop 10" ]
+ then
+ SLE10=1
+ fi
+ fi
+
+ #
# Change the Network Configuration in the mounted image file
#
if [ -n "$MAC" ]
then
- if [ -d etc/sysconfig/network/ ]
+ if [ "$SLE10" -a -d etc/sysconfig/network/ ]
then
echo "Changing the Network configuration in the newly copied image."
pushd "etc/sysconfig/network/" > /dev/null
@@ -672,13 +700,19 @@
if [ -d etc/udev/rules.d/ ]
then
- # The 30-net_persistent_names.rules file
- # controls which interface to use.
+ # The 30-net_persistent_names.rules or 70-persistent-net.rules
+ # file controls which interface to use.
# By removing the SUBSYSTEM== lines, we force
# the system to recreate it.
pushd "etc/udev/rules.d/" > /dev/null
- sed -i -e "/SUBSYSTEM==/d" \
- 30-net_persistent_names.rules
+ if [ "$SLE10" ]
+ then
+ sed -i -e "/SUBSYSTEM==/d" \
+ 30-net_persistent_names.rules
+ else
+ sed -i -e "/SUBSYSTEM==/d" \
+ 70-persistent-net.rules
+ fi
popd > /dev/null
fi
fi
@@ -693,8 +727,14 @@
echo "Modify the IP Address of the new domU."
pushd "etc/sysconfig/network/" > /dev/null
- sed -i -e "s,^IPADDR=.*$,IPADDR=$IP," \
- ifcfg-eth-id-$MAC
+ if [ "$SLE10" ]
+ then
+ sed -i -e "s,^IPADDR=.*$,IPADDR=$IP," \
+ ifcfg-eth-id-$MAC
+ else
+ sed -i -e "s,^IPADDR=.*$,IPADDR=$IP/$MASK," \
+ ifcfg-eth0
+ fi
popd > /dev/null
fi
fi
++++++ xm-test-cleanup.diff ++++++
--- /var/tmp/diff_new_pack.Gn5561/_old 2009-05-04 18:37:26.000000000 +0200
+++ /var/tmp/diff_new_pack.Gn5561/_new 2009-05-04 18:37:26.000000000 +0200
@@ -1,7 +1,7 @@
-Index: xen-3.3.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py
+Index: xen-3.4.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py
===================================================================
---- xen-3.3.1-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py
-+++ xen-3.3.1-testing/tools/xm-test/tests/save/01_save_basic_pos.py
+--- xen-3.4.0-testing.orig/tools/xm-test/tests/save/01_save_basic_pos.py
++++ xen-3.4.0-testing/tools/xm-test/tests/save/01_save_basic_pos.py
@@ -35,3 +35,9 @@ if s != 0:
# Make sure it's gone
if isDomainRunning(domain.getName()):
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org