Hello community,
here is the log from the commit of package xen
checked in at Sat Feb 2 01:58:24 CET 2008.
--------
--- arch/i386/xen/xen.changes 2008-01-12 00:38:02.000000000 +0100
+++ xen/xen.changes 2008-02-02 01:14:42.753506000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 1 16:11:59 MST 2008 - carnold@novell.com
+
+- Update to xen 3.2 FCS. Changeset 16718
+- Merge xen-tools and xen-tools-ioemu into xen-tools.
+
+-------------------------------------------------------------------
@@ -679 +685 @@
-Tue Feb 6 12:02:47 CET 2007 - ro@suse.de
+Tue Feb 6 12:02:47 MST 2007 - ro@suse.de
Old:
----
netfront_mac.patch
svm-lmsl.patch
x86_64-syscall-clear-df.patch
xen-dhcpd
xen-hvm-netfront.diff
New:
----
16716-xend-version.patch
16718-batched-mmu-updates.patch
16777-xend-block-attach.patch
16873-net-nat.patch
16877-blktap.patch
16883-xend-crashed-state.patch
16884-xend-rename-restart.patch
16885-xend-config-comments.patch
16886-xenstore-leak.patch
16890-xenapi-version.patch
hypercall-check.patch
multinet-include.template
pv-drv-mkbuildtree.patch
xen-blktab-subtype-strip.patch
xend-core-dump-loc.diff
xend-network
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xen.spec ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:46.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:46.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package xen (Version 3.2.0_16701)
+# spec file for package xen (Version 3.2.0_16718_02)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@
Name: xen
%define xvers 3.2
%define xvermaj 3
-%define changeset 16701
+%define changeset 16718
%define xen_build_dir xen-3.2-testing
%if %sles_version
%define with_kmp 1
@@ -32,7 +32,7 @@
%if %{?with_kmp}0
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
%endif
-Version: 3.2.0_16701
+Version: 3.2.0_16718_02
Release: 1
License: GPL v2 only
Group: System/Kernel
@@ -53,12 +53,24 @@
Source12: block-iscsi
Source13: block-npiv
Source16: xmclone.sh
-Source17: sysconfig.xend
-Source18: network-multinet
-Source19: multinet-common.sh
-Source20: xen-dhcpd
-Source21: xend-relocation.sh
+Source17: xend-relocation.sh
+# network-multinet sources
+Source18: sysconfig.xend
+Source19: network-multinet
+Source20: multinet-common.sh
+Source21: multinet-include.template
+Source22: xend-network
# Upstream patches
+Patch0: 16716-xend-version.patch
+Patch1: 16718-batched-mmu-updates.patch
+Patch2: 16777-xend-block-attach.patch
+Patch3: 16873-net-nat.patch
+Patch4: 16877-blktap.patch
+Patch5: 16883-xend-crashed-state.patch
+Patch6: 16884-xend-rename-restart.patch
+Patch7: 16885-xend-config-comments.patch
+Patch8: 16886-xenstore-leak.patch
+Patch9: 16890-xenapi-version.patch
# Our patches
Patch100: xen-config.diff
Patch101: xend-config.diff
@@ -80,10 +92,9 @@
Patch122: block-losetup-retry.diff
Patch123: block-flags.diff
Patch124: xen-hvm-default-bridge.diff
-Patch125: xen-hvm-netfront.diff
-Patch126: xen-hvm-default-pae.diff
-Patch127: xm-test-cleanup.diff
-Patch128: cross-build-fix.diff
+Patch125: xen-hvm-default-pae.diff
+Patch126: xm-test-cleanup.diff
+Patch127: cross-build-fix.diff
Patch130: xen-generate-foreign-headers.diff
Patch131: tools-xc_kexec.diff
Patch132: tools-kboot.diff
@@ -94,10 +105,9 @@
Patch137: supported_module.diff
Patch138: disable_emulated_device.diff
Patch140: qemu-security-etch1.diff
-Patch141: netfront_mac.patch
-Patch142: vnc-i18n-keys.diff
-Patch143: rpmlint.diff
-Patch144: cdrom-removable.patch
+Patch141: vnc-i18n-keys.diff
+Patch142: rpmlint.diff
+Patch143: cdrom-removable.patch
Patch150: bridge-suse.diff
Patch151: bridge-bonding.diff
Patch152: bridge-hostonly.diff
@@ -105,16 +115,18 @@
Patch154: keymap_nl-be.patch
Patch155: svm-cr8-performance.diff
Patch156: xen-fbback-resize.patch
+Patch157: xend-core-dump-loc.diff
+Patch158: blktap.patch
+Patch159: xen-blktab-subtype-strip.patch
# Patches from Jan
Patch240: xenctx.patch
Patch241: const-callback-arg.patch
Patch242: const-set-trap-table-arg.patch
-Patch243: svm-lmsl.patch
-Patch244: x86_emulate.patch
-Patch245: x86-extra-trap-info.patch
-Patch290: x86_64-syscall-clear-df.patch
-Patch291: 32on64-extra-mem.patch
-Patch292: blktap.patch
+Patch243: hypercall-check.patch
+Patch244: pv-drv-mkbuildtree.patch
+Patch245: x86_emulate.patch
+Patch246: x86-extra-trap-info.patch
+Patch247: 32on64-extra-mem.patch
# Ky PV Driver Patches
Patch350: pv-driver-build.patch
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
@@ -181,7 +193,7 @@
%package libs
Summary: Xen Virtualization: Libraries
Group: System/Kernel
-Requires: xen >= 3.2.0_16500
+Requires: xen = %{version}
AutoReqProv: on
%description libs
@@ -230,7 +242,7 @@
%package tools
Summary: Xen Virtualization: Control tools for domain 0
Group: System/Kernel
-Requires: xen-libs >= 3.2.0_16500
+Requires: xen-libs = %{version}
Requires: bridge-utils multipath-tools python python-curses python-xml pyxml
AutoReqProv: on
@@ -300,59 +312,6 @@
--------
Ian Pratt
-%package tools-ioemu
-Summary: Xen Virtualization: BIOS and device emulation for unmodified guests
-Group: System/Kernel
-Requires: xen-tools >= 3.2.0_16500
-AutoReqProv: on
-
-%description tools-ioemu
-Xen is a virtual machine monitor for x86 that supports execution of
-multiple guest operating systems with unprecedented levels of
-performance and resource isolation.
-
-This package contains the needed BIOS and device emulation code to
-support unmodified guests. (You need virtualization support in hardware
-to make use of this.)
-
-Modern computers are sufficiently powerful to use virtualization to
-present the illusion of many smaller virtual machines (VMs), each
-running a separate operating system instance. Successful partitioning
-of a machine to support the concurrent execution of multiple operating
-systems poses several challenges. Firstly, virtual machines must be
-isolated from one another: It is not acceptable for the execution of
-one to adversely affect the performance of another. This is
-particularly true when virtual machines are owned by mutually
-untrusting users. Secondly, it is necessary to support a variety of
-different operating systems to accommodate the heterogeneity of popular
-applications. Thirdly, the performance overhead introduced by
-virtualization should be small.
-
-Xen uses a technique called paravirtualization: The guest OS is
-modified, mainly to enhance performance.
-
-The Xen hypervisor (microkernel) does not provide device drivers for
-your hardware (except for CPU and memory). This job is left to the
-kernel that's running in domain 0. Thus the domain 0 kernel is
-privileged; it has full hardware access. It's started immediately after
-Xen starts up. Other domains have no access to the hardware; instead
-they use virtual interfaces that are provided by Xen (with the help of
-the domain 0 kernel).
-
-Xen does support booting other Operating Systems; ports of NetBSD
-(Christian Limpach), FreeBSD (Kip Macy), and Plan 9 (Ron Minnich)
-exist. A port of Windows XP was developed for an earlier version of
-Xen, but is not available for release due to license restrictions.
-
-In addition to this package you need to install kernel-xen, xen, and
-xen-tools to use Xen.
-
-
-
-Authors:
---------
- Ian Pratt
-
%package devel
Summary: Xen Virtualization: Headers and libraries for development
Group: System/Kernel
@@ -489,6 +448,16 @@
%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
%patch100 -p1
%patch101 -p1
%patch102 -p1
@@ -512,7 +481,6 @@
%patch125 -p1
%patch126 -p1
%patch127 -p1
-%patch128 -p1
%patch130 -p1
%patch131 -p1
%patch132 -p1
@@ -526,7 +494,6 @@
%patch141 -p1
%patch142 -p1
%patch143 -p1
-%patch144 -p1
%patch150 -p1
#%patch151 -p1 # dump if all goes well with defaulting to network-multinet
#%patch152 -p1 # dump if all goes well with defaulting to network-multinet
@@ -534,15 +501,17 @@
%patch154 -p1
#%patch155 -p1 # AMD CR8 Performance - not clean for unstable
%patch156 -p1
+%patch157 -p1
+%patch158 -p1
+%patch159 -p1
%patch240 -p1
%patch241 -p1
%patch242 -p1
%patch243 -p1
%patch244 -p1
%patch245 -p1
-%patch290 -p1
-%patch291 -p1
-%patch292 -p1
+%patch246 -p1
+%patch247 -p1
%patch350 -p1
%build
@@ -648,10 +617,16 @@
mv $RPM_BUILD_ROOT/etc/xen/xmexample* $RPM_BUILD_ROOT/etc/xen/examples
rm $RPM_BUILD_ROOT/etc/xen/examples/*nbd
install -m644 %SOURCE9 %SOURCE10 $RPM_BUILD_ROOT/etc/xen/examples/
-install -m644 %SOURCE17 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.xend
+install -m644 %SOURCE18 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.xend
# scripts
rm $RPM_BUILD_ROOT/etc/xen/scripts/block-*nbd
-install -m755 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE16 %SOURCE18 %SOURCE19 %SOURCE20 %SOURCE21 $RPM_BUILD_ROOT/etc/xen/scripts/
+install -m755 %SOURCE11 %SOURCE12 %SOURCE13 %SOURCE16 %SOURCE17 $RPM_BUILD_ROOT/etc/xen/scripts/
+# network-multinet scripts
+mkdir -p $RPM_BUILD_ROOT/etc/xen/scripts/multinet.d/{post-start,post-stop,pre-start,pre-stop}
+install -m644 %SOURCE18 $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.xend
+install -m755 %SOURCE19 %SOURCE20 $RPM_BUILD_ROOT/etc/xen/scripts/
+install -m644 %SOURCE21 $RPM_BUILD_ROOT/etc/xen/scripts/multinet.d/
+install -m755 %SOURCE22 $RPM_BUILD_ROOT/usr/sbin/
# logrotate
install -m644 -D %SOURCE7 $RPM_BUILD_ROOT/etc/logrotate.d/xen
# directories
@@ -782,16 +757,7 @@
%{_defaultdocdir}/xen/boot.xen
%{_defaultdocdir}/xen/misc
%dir %pysite/xen
-%pysite/xen/*
-/usr/lib/xen/boot/domUloader.py
-
-%files tools-domU
-%defattr(-,root,root)
-/usr/bin/xen-detect
-/bin/xenstore-*
-
-%files tools-ioemu
-%defattr(-,root,root)
+# formerly tools-ioemu
%dir %{_datadir}/xen
%dir %{_datadir}/xen/qemu
%dir %{_datadir}/xen/qemu/keymaps
@@ -804,6 +770,13 @@
/usr/lib/xen/bin/xc_kexec
%endif
/usr/lib/xen/boot/hvmloader
+%pysite/xen/*
+/usr/lib/xen/boot/domUloader.py
+
+%files tools-domU
+%defattr(-,root,root)
+/usr/bin/xen-detect
+/bin/xenstore-*
%files devel
%defattr(-,root,root)
++++++ 16716-xend-version.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1200407045 0
# Node ID b64be2bc7a91c004982b0ddba0c644744f944141
# Parent e6e165f72e571c12f671c6ad8a70acf8d8090852
xend: Remove hardcoded (and apparently unused) xend version.
Signed-off-by: Jim Fehlig
diff -r e6e165f72e57 -r b64be2bc7a91 tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Tue Jan 15 14:22:50 2008 +0000
+++ b/tools/python/xen/xend/XendNode.py Tue Jan 15 14:24:05 2008 +0000
@@ -377,13 +377,7 @@ class XendNode:
def xen_version(self):
info = self.xc.xeninfo()
- try:
- from xen import VERSION
- info = {'Xen': '%(xen_major)d.%(xen_minor)d' % info,
- 'Xend': VERSION}
- except (ImportError, AttributeError):
- info = {'Xen': '%(xen_major)d.%(xen_minor)d' % info,
- 'Xend': '3.0.3'}
+ info = {'Xen': '%(xen_major)d.%(xen_minor)d' % info}
# Add xend_config_format
info.update(self.xendinfo_dict())
diff -r e6e165f72e57 -r b64be2bc7a91 tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Tue Jan 15 14:22:50 2008 +0000
+++ b/tools/python/xen/xend/server/SrvDaemon.py Tue Jan 15 14:24:05 2008 +0000
@@ -335,12 +335,6 @@ class Daemon:
log.info("Xend changeset: %s.", xinfo['xen_changeset'])
del xc
- try:
- from xen import VERSION
- log.info("Xend version: %s", VERSION)
- except ImportError:
- log.info("Xend version: Unknown.")
-
relocate.listenRelocation()
servers = SrvServer.create()
servers.start(status)
++++++ 16718-batched-mmu-updates.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1200407535 0
# Node ID fba4e7357744e96797916689e3274344b82a8e5f
# Parent 58dfcad8d56d3ebad2e8553c43db499ce727cb36
x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
Signed-off-by: Bruce Rogers
Signed-off-by: Keir Fraser
Index: xen-3.2-testing/xen/arch/x86/mm.c
===================================================================
--- xen-3.2-testing.orig/xen/arch/x86/mm.c
+++ xen-3.2-testing/xen/arch/x86/mm.c
@@ -1342,21 +1342,30 @@ static inline int update_intpte(intpte_t
intpte_t old,
intpte_t new,
unsigned long mfn,
- struct vcpu *v)
+ struct vcpu *v,
+ int preserve_ad)
{
int rv = 1;
#ifndef PTE_UPDATE_WITH_CMPXCHG
- rv = paging_write_guest_entry(v, p, new, _mfn(mfn));
-#else
+ if ( !preserve_ad )
+ {
+ rv = paging_write_guest_entry(v, p, new, _mfn(mfn));
+ }
+ else
+#endif
{
intpte_t t = old;
for ( ; ; )
{
- rv = paging_cmpxchg_guest_entry(v, p, &t, new, _mfn(mfn));
+ intpte_t _new = new;
+ if ( preserve_ad )
+ _new |= old & (_PAGE_ACCESSED | _PAGE_DIRTY);
+
+ rv = paging_cmpxchg_guest_entry(v, p, &t, _new, _mfn(mfn));
if ( unlikely(rv == 0) )
{
MEM_LOG("Failed to update %" PRIpte " -> %" PRIpte
- ": saw %" PRIpte, old, new, t);
+ ": saw %" PRIpte, old, _new, t);
break;
}
@@ -1369,20 +1378,19 @@ static inline int update_intpte(intpte_t
old = t;
}
}
-#endif
return rv;
}
/* Macro that wraps the appropriate type-changes around update_intpte().
* Arguments are: type, ptr, old, new, mfn, vcpu */
-#define UPDATE_ENTRY(_t,_p,_o,_n,_m,_v) \
+#define UPDATE_ENTRY(_t,_p,_o,_n,_m,_v,_ad) \
update_intpte(&_t ## e_get_intpte(*(_p)), \
_t ## e_get_intpte(_o), _t ## e_get_intpte(_n), \
- (_m), (_v))
+ (_m), (_v), (_ad))
/* Update the L1 entry at pl1e to new value nl1e. */
static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e,
- unsigned long gl1mfn)
+ unsigned long gl1mfn, int preserve_ad)
{
l1_pgentry_t ol1e;
struct vcpu *curr = current;
@@ -1393,7 +1401,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
return 0;
if ( unlikely(paging_mode_refcounts(d)) )
- return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr);
+ return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr, preserve_ad);
if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
{
@@ -1415,12 +1423,14 @@ static int mod_l1_entry(l1_pgentry_t *pl
/* Fast path for identical mapping, r/w and presence. */
if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
- return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr);
+ return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
+ preserve_ad);
if ( unlikely(!get_page_from_l1e(nl1e, FOREIGNDOM)) )
return 0;
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
+ preserve_ad)) )
{
put_page_from_l1e(nl1e, d);
return 0;
@@ -1428,7 +1438,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
}
else
{
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
+ preserve_ad)) )
return 0;
}
@@ -1441,7 +1452,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
static int mod_l2_entry(l2_pgentry_t *pl2e,
l2_pgentry_t nl2e,
unsigned long pfn,
- unsigned long type)
+ unsigned long type,
+ int preserve_ad)
{
l2_pgentry_t ol2e;
struct vcpu *curr = current;
@@ -1469,18 +1481,20 @@ static int mod_l2_entry(l2_pgentry_t *pl
/* Fast path for identical mapping and presence. */
if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT))
- return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr);
+ return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr, preserve_ad);
if ( unlikely(!get_page_from_l2e(nl2e, pfn, d)) )
return 0;
- if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr,
+ preserve_ad)) )
{
put_page_from_l2e(nl2e, pfn);
return 0;
}
}
- else if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr)) )
+ else if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr,
+ preserve_ad)) )
{
return 0;
}
@@ -1494,7 +1508,8 @@ static int mod_l2_entry(l2_pgentry_t *pl
/* Update the L3 entry at pl3e to new value nl3e. pl3e is within frame pfn. */
static int mod_l3_entry(l3_pgentry_t *pl3e,
l3_pgentry_t nl3e,
- unsigned long pfn)
+ unsigned long pfn,
+ int preserve_ad)
{
l3_pgentry_t ol3e;
struct vcpu *curr = current;
@@ -1532,18 +1547,20 @@ static int mod_l3_entry(l3_pgentry_t *pl
/* Fast path for identical mapping and presence. */
if (!l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT))
- return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr);
+ return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad);
if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) )
return 0;
- if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr,
+ preserve_ad)) )
{
put_page_from_l3e(nl3e, pfn);
return 0;
}
}
- else if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr)) )
+ else if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr,
+ preserve_ad)) )
{
return 0;
}
@@ -1564,7 +1581,8 @@ static int mod_l3_entry(l3_pgentry_t *pl
/* Update the L4 entry at pl4e to new value nl4e. pl4e is within frame pfn. */
static int mod_l4_entry(l4_pgentry_t *pl4e,
l4_pgentry_t nl4e,
- unsigned long pfn)
+ unsigned long pfn,
+ int preserve_ad)
{
struct vcpu *curr = current;
struct domain *d = curr->domain;
@@ -1592,18 +1610,20 @@ static int mod_l4_entry(l4_pgentry_t *pl
/* Fast path for identical mapping and presence. */
if (!l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT))
- return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr);
+ return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr, preserve_ad);
if ( unlikely(!get_page_from_l4e(nl4e, pfn, d)) )
return 0;
- if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr,
+ preserve_ad)) )
{
put_page_from_l4e(nl4e, pfn);
return 0;
}
}
- else if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr)) )
+ else if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr,
+ preserve_ad)) )
{
return 0;
}
@@ -1946,7 +1966,7 @@ int new_guest_cr3(unsigned long mfn)
l4e_from_pfn(
mfn,
(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED)),
- pagetable_get_pfn(v->arch.guest_table));
+ pagetable_get_pfn(v->arch.guest_table), 0);
if ( unlikely(!okay) )
{
MEM_LOG("Error while installing new compat baseptr %lx", mfn);
@@ -2458,13 +2478,16 @@ int do_mmu_update(
{
/*
* MMU_NORMAL_PT_UPDATE: Normal update to any level of page table.
+ * MMU_UPDATE_PT_PRESERVE_AD: As above but also preserve (OR)
+ * current A/D bits.
*/
case MMU_NORMAL_PT_UPDATE:
-
+ case MMU_PT_UPDATE_PRESERVE_AD:
rc = xsm_mmu_normal_update(d, req.val);
if ( rc )
break;
+ req.ptr -= cmd;
gmfn = req.ptr >> PAGE_SHIFT;
mfn = gmfn_to_mfn(d, gmfn);
@@ -2501,20 +2524,23 @@ int do_mmu_update(
case PGT_l1_page_table:
{
l1_pgentry_t l1e = l1e_from_intpte(req.val);
- okay = mod_l1_entry(va, l1e, mfn);
+ okay = mod_l1_entry(va, l1e, mfn,
+ cmd == MMU_PT_UPDATE_PRESERVE_AD);
}
break;
case PGT_l2_page_table:
{
l2_pgentry_t l2e = l2e_from_intpte(req.val);
- okay = mod_l2_entry(va, l2e, mfn, type_info);
+ okay = mod_l2_entry(va, l2e, mfn, type_info,
+ cmd == MMU_PT_UPDATE_PRESERVE_AD);
}
break;
#if CONFIG_PAGING_LEVELS >= 3
case PGT_l3_page_table:
{
l3_pgentry_t l3e = l3e_from_intpte(req.val);
- okay = mod_l3_entry(va, l3e, mfn);
+ okay = mod_l3_entry(va, l3e, mfn,
+ cmd == MMU_PT_UPDATE_PRESERVE_AD);
}
break;
#endif
@@ -2522,7 +2548,8 @@ int do_mmu_update(
case PGT_l4_page_table:
{
l4_pgentry_t l4e = l4e_from_intpte(req.val);
- okay = mod_l4_entry(va, l4e, mfn);
+ okay = mod_l4_entry(va, l4e, mfn,
+ cmd == MMU_PT_UPDATE_PRESERVE_AD);
}
break;
#endif
@@ -2652,7 +2679,7 @@ static int create_grant_pte_mapping(
}
ol1e = *(l1_pgentry_t *)va;
- if ( !UPDATE_ENTRY(l1, (l1_pgentry_t *)va, ol1e, nl1e, mfn, v) )
+ if ( !UPDATE_ENTRY(l1, (l1_pgentry_t *)va, ol1e, nl1e, mfn, v, 0) )
{
put_page_type(page);
rc = GNTST_general_error;
@@ -2720,9 +2747,11 @@ static int destroy_grant_pte_mapping(
}
/* Delete pagetable entry. */
- if ( unlikely(!UPDATE_ENTRY(l1,
- (l1_pgentry_t *)va, ol1e, l1e_empty(), mfn,
- d->vcpu[0] /* Change if we go to per-vcpu shadows. */)) )
+ if ( unlikely(!UPDATE_ENTRY
+ (l1,
+ (l1_pgentry_t *)va, ol1e, l1e_empty(), mfn,
+ d->vcpu[0] /* Change if we go to per-vcpu shadows. */,
+ 0)) )
{
MEM_LOG("Cannot delete PTE entry at %p", va);
put_page_type(page);
@@ -2758,7 +2787,7 @@ static int create_grant_va_mapping(
return GNTST_general_error;
}
ol1e = *pl1e;
- okay = UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, v);
+ okay = UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, v, 0);
guest_unmap_l1e(v, pl1e);
pl1e = NULL;
@@ -2796,7 +2825,7 @@ static int replace_grant_va_mapping(
}
/* Delete pagetable entry. */
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, v)) )
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, v, 0)) )
{
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
rc = GNTST_general_error;
@@ -2860,7 +2889,8 @@ int replace_grant_host_mapping(
}
ol1e = *pl1e;
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, l1e_empty(), gl1mfn, curr)) )
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, l1e_empty(),
+ gl1mfn, curr, 0)) )
{
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
guest_unmap_l1e(curr, pl1e);
@@ -2948,7 +2978,7 @@ int do_update_va_mapping(unsigned long v
pl1e = guest_map_l1e(v, va, &gl1mfn);
- if ( unlikely(!pl1e || !mod_l1_entry(pl1e, val, gl1mfn)) )
+ if ( unlikely(!pl1e || !mod_l1_entry(pl1e, val, gl1mfn, 0)) )
rc = -EINVAL;
if ( pl1e )
@@ -3517,7 +3547,7 @@ static int ptwr_emulated_update(
else
{
ol1e = *pl1e;
- if ( !UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, mfn, v) )
+ if ( !UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, mfn, v, 0) )
BUG();
}
Index: xen-3.2-testing/xen/include/public/xen.h
===================================================================
--- xen-3.2-testing.orig/xen/include/public/xen.h
+++ xen-3.2-testing/xen/include/public/xen.h
@@ -168,9 +168,14 @@
* ptr[:2] -- Machine address within the frame whose mapping to modify.
* The frame must belong to the FD, if one is specified.
* val -- Value to write into the mapping entry.
- */
-#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
-#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
+ *
+ * ptr[1:0] == MMU_PT_UPDATE_PRESERVE_AD:
+ * As MMU_NORMAL_PT_UPDATE above, but A/D bits currently in the PTE are ORed
+ * with those in @val.
+ */
+#define MMU_NORMAL_PT_UPDATE 0 /* checked '*ptr = val'. ptr is MA. */
+#define MMU_MACHPHYS_UPDATE 1 /* ptr = MA of frame to modify entry for */
+#define MMU_PT_UPDATE_PRESERVE_AD 2 /* atomically: *ptr = val | (*ptr&(A|D)) */
/*
* MMU EXTENDED OPERATIONS
++++++ 16777-xend-block-attach.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1200995509 0
# Node ID 6f3fb3f86b68182bb61a661e81f346f653005852
# Parent 2af5fb3e34e54e96d0c58e0e4557ee1240df9ce8
xend: On block-attach, remove device information when VmError occurs.
I tested xm block-attach command with a wrong
parameter(file:). Naturally a command error occurred. Then I retested
xm block-attach command with a correct parameter(phy:). But a command
error occurred again. The second command error occurred because Xend
did not remove device information from self.info when the first
command error occurred.
Signed-off-by: Masaki Kanno
diff -r 2af5fb3e34e5 -r 6f3fb3f86b68 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 09:50:06 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 09:51:49 2008 +0000
@@ -535,6 +535,11 @@ class XendDomainInfo:
self._createDevice(dev_type, dev_config_dict)
self._waitForDevice(dev_type, devid)
except VmError, ex:
+ del self.info['devices'][dev_uuid]
+ if dev_type == 'tap':
+ self.info['vbd_refs'].remove(dev_uuid)
+ else:
+ self.info['%s_refs' % dev_type].remove(dev_uuid)
raise ex
else:
devid = None
++++++ 16873-net-nat.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201185473 0
# Node ID 86c32269ba604f968c7abe5cf7360d7c00902ff8
# Parent 1190d50ce18c5a8237fc592d59cff8396bc435c5
network-nat: Fix NAT scripts.
Signed-off-by: Dan Magenheimer
Index: xen-3.2-testing/tools/examples/network-nat
===================================================================
--- xen-3.2-testing.orig/tools/examples/network-nat
+++ xen-3.2-testing/tools/examples/network-nat
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
#============================================================================
# Default Xen network start/stop script when using NAT.
# Xend calls a network script when it starts.
@@ -27,7 +27,15 @@ evalVariables "$@"
netdev=${netdev:-eth0}
# antispoofing not yet implemented
antispoof=${antispoof:-no}
-dhcp=${dhcp:-no}
+
+# turn on dhcp feature by default if dhcpd is installed
+if [ -f /etc/dhcpd.conf ]
+then
+ dhcp=${dhcp:-yes}
+else
+ dhcp=${dhcp:-no}
+fi
+
if [ "$dhcp" != 'no' ]
then
Index: xen-3.2-testing/tools/examples/vif-nat
===================================================================
--- xen-3.2-testing.orig/tools/examples/vif-nat
+++ xen-3.2-testing/tools/examples/vif-nat
@@ -28,15 +28,22 @@
dir=$(dirname "$0")
. "$dir/vif-common.sh"
-dhcp=${dhcp:-no}
+# turn on dhcp feature by default if dhcpd is installed
+if [ -f /etc/dhcpd.conf ]
+then
+ dhcp=${dhcp:-yes}
+else
+ dhcp=${dhcp:-no}
+fi
if [ "$dhcp" != 'no' ]
then
dhcpd_conf_file=$(find_dhcpd_conf_file)
dhcpd_init_file=$(find_dhcpd_init_file)
- if [ -z "$dhcpd_conf_file" ] || [ -z "$dhcpd_init_file" ]
+ dhcpd_arg_file=$(find_dhcpd_arg_file)
+ if [ -z "$dhcpd_conf_file" ] || [ -z "$dhcpd_init_file" ] || [ -z "$dhcpd_arg_file" ]
then
- echo 'Failed to find dhcpd configuration or init file.' >&2
+ echo 'Failed to find dhcpd configuration or init or args file.' >&2
exit 1
fi
fi
@@ -88,6 +95,31 @@ then
hostname="$hostname-$vifid"
fi
+dhcparg_remove_entry()
+{
+ local tmpfile=$(mktemp)
+ sed -e "s/$vif //" "$dhcpd_arg_file" >"$tmpfile"
+ if diff "$tmpfile" "$dhcpd_arg_file" >/dev/null
+ then
+ rm "$tmpfile"
+ else
+ mv "$tmpfile" "$dhcpd_arg_file"
+ fi
+}
+
+dhcparg_add_entry()
+{
+ dhcparg_remove_entry
+ local tmpfile=$(mktemp)
+ # handle Red Hat, SUSE, and Debian styles, with or without quotes
+ sed -e 's/^DHCPDARGS="*\([^"]*\)"*/DHCPDARGS="\1'"$vif "'"/' \
+ "$dhcpd_arg_file" >"$tmpfile" && mv "$tmpfile" "$dhcpd_arg_file"
+ sed -e 's/^DHCPD_INTERFACE="*\([^"]*\)"*/DHCPD_INTERFACE="\1'"$vif "'"/' \
+ "$dhcpd_arg_file" >"$tmpfile" && mv "$tmpfile" "$dhcpd_arg_file"
+ sed -e 's/^INTERFACES="*\([^"]*\)"*/INTERFACES="\1'"$vif "'"/' \
+ "$dhcpd_arg_file" >"$tmpfile" && mv "$tmpfile" "$dhcpd_arg_file"
+ rm -f "$tmpfile"
+}
dhcp_remove_entry()
{
@@ -99,6 +131,7 @@ dhcp_remove_entry()
else
mv "$tmpfile" "$dhcpd_conf_file"
fi
+ dhcparg_remove_entry
}
@@ -109,6 +142,7 @@ dhcp_up()
mac=$(xenstore_read "$XENBUS_PATH/mac")
echo >>"$dhcpd_conf_file" \
"host $hostname { hardware ethernet $mac; fixed-address $vif_ip; option routers $router_ip; option host-name \"$hostname\"; }"
+ dhcparg_add_entry
release_lock "vif-nat-dhcp"
"$dhcpd_init_file" restart || true
}
Index: xen-3.2-testing/tools/examples/xen-network-common.sh
===================================================================
--- xen-3.2-testing.orig/tools/examples/xen-network-common.sh
+++ xen-3.2-testing/tools/examples/xen-network-common.sh
@@ -89,6 +89,11 @@ find_dhcpd_init_file()
first_file -x /etc/init.d/{dhcp3-server,dhcp,dhcpd}
}
+find_dhcpd_arg_file()
+{
+ first_file -f /etc/sysconfig/dhcpd /etc/defaults/dhcp
+}
+
# configure interfaces which act as pure bridge ports:
setup_bridge_port() {
local dev="$1"
++++++ 16877-blktap.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201185686 0
# Node ID 31adb5c972d03e45cb746cd2305126ea2571282f
# Parent 6269a3ce7b830f6903a61e1116331590b47f7e99
block scripts: use fatal() in xen-hotplug-common.sh if the file does not exist.
Signed-off-by: Masaki Kanno
diff -r 6269a3ce7b83 -r 31adb5c972d0 tools/examples/blktap
--- a/tools/examples/blktap Thu Jan 24 14:40:35 2008 +0000
+++ b/tools/examples/blktap Thu Jan 24 14:41:26 2008 +0000
@@ -71,9 +71,9 @@ fi
fi
# some versions of readlink cannot be passed a regular file
if [ -L "$p" ]; then
- file=$(readlink -f "$p") || ebusy "$p link does not exist."
+ file=$(readlink -f "$p") || fatal "$p link does not exist."
else
- [ -f "$p" ] || { ebusy "$p file does not exist."; }
+ [ -f "$p" ] || { fatal "$p file does not exist."; }
file="$p"
fi
@@ -85,7 +85,7 @@ fi
if [ "$command" = 'add' ]
then
- [ -e "$file" ] || { ebusy $file does not exist; }
+ [ -e "$file" ] || { fatal $file does not exist; }
success
fi
++++++ 16883-xend-crashed-state.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201267705 0
# Node ID 666573856c5928371435b72d907dd7f06965965f
# Parent b321ef006189e10d3b733747f508b1fb608810e9
(Re)introduce notion of crashed VM power state.
The crashed power state is necessary to allow both core-dumping a
crashed but preserved VM and renaming/restarting a crashed VM.
Signed-off-by: Jim Fehlig
Index: xen-3.2-testing/docs/xen-api/vm-lifecycle.tex
===================================================================
--- xen-3.2-testing.orig/docs/xen-api/vm-lifecycle.tex
+++ xen-3.2-testing/docs/xen-api/vm-lifecycle.tex
@@ -21,7 +21,10 @@
\end{figure}
Figure~\ref{fig-vm-lifecycle} shows the states that a VM can be in
-and the API calls that can be used to move the VM between these states.
+and the API calls that can be used to move the VM between these states. The crashed
+state indicates that the guest OS running within the VM has crashed. There is no
+API to explicitly move to the crashed state, however a hardShutdown will move the
+VM to the powered down state.
\section{VM boot parameters}
Index: xen-3.2-testing/docs/xen-api/vm_lifecycle.dot
===================================================================
--- xen-3.2-testing.orig/docs/xen-api/vm_lifecycle.dot
+++ xen-3.2-testing/docs/xen-api/vm_lifecycle.dot
@@ -1,6 +1,6 @@
digraph g{
-node [shape=box]; "powered down" paused running suspended;
+node [shape=box]; "powered down" paused running suspended crashed;
"powered down" -> paused [label="start(paused=true)"];
"powered down" -> running [label="start(paused=false)"];
@@ -11,5 +11,7 @@ paused -> suspended [label="suspend"];
paused -> running [label="resume"];
running -> "powered down" [label="cleanShutdown /\nhardShutdown"];
running -> paused [label="pause"];
+running -> crashed [label="guest OS crash"]
+crashed -> "powered down" [label="hardShutdown"]
}
\ No newline at end of file
Index: xen-3.2-testing/docs/xen-api/xenapi-datamodel.tex
===================================================================
--- xen-3.2-testing.orig/docs/xen-api/xenapi-datamodel.tex
+++ xen-3.2-testing/docs/xen-api/xenapi-datamodel.tex
@@ -156,6 +156,7 @@ The following enumeration types are used
\hspace{0.5cm}{\tt Paused} & Paused \\
\hspace{0.5cm}{\tt Running} & Running \\
\hspace{0.5cm}{\tt Suspended} & Suspended \\
+\hspace{0.5cm}{\tt Crashed} & Crashed \\
\hspace{0.5cm}{\tt Unknown} & Some other unknown state \\
\hline
\end{longtable}
Index: xen-3.2-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
===================================================================
--- xen-3.2-testing.orig/tools/libxen/include/xen/api/xen_vm_power_state.h
+++ xen-3.2-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
@@ -46,6 +46,11 @@ enum xen_vm_power_state
XEN_VM_POWER_STATE_SUSPENDED,
/**
+ * Crashed
+ */
+ XEN_VM_POWER_STATE_CRASHED,
+
+ /**
* Some other unknown state
*/
XEN_VM_POWER_STATE_UNKNOWN
Index: xen-3.2-testing/tools/libxen/src/xen_vm_power_state.c
===================================================================
--- xen-3.2-testing.orig/tools/libxen/src/xen_vm_power_state.c
+++ xen-3.2-testing/tools/libxen/src/xen_vm_power_state.c
@@ -32,6 +32,7 @@ static const char *lookup_table[] =
"Paused",
"Running",
"Suspended",
+ "Crashed",
"Unknown"
};
Index: xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendAPIConstants.py
+++ xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
@@ -25,6 +25,7 @@ XEN_API_VM_POWER_STATE = [
'Running',
'Suspended',
'Halted',
+ 'Crashed',
'Unknown'
]
@@ -33,7 +34,8 @@ XEN_API_VM_POWER_STATE_PAUSED = 1
XEN_API_VM_POWER_STATE_RUNNING = 2
XEN_API_VM_POWER_STATE_SUSPENDED = 3
XEN_API_VM_POWER_STATE_SHUTTINGDOWN = 4
-XEN_API_VM_POWER_STATE_UNKNOWN = 5
+XEN_API_VM_POWER_STATE_CRASHED = 5
+XEN_API_VM_POWER_STATE_UNKNOWN = 6
XEN_API_ON_NORMAL_EXIT = [
'destroy',
Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConstants.py
+++ xen-3.2-testing/tools/python/xen/xend/XendConstants.py
@@ -61,6 +61,7 @@ DOM_STATES = [
'running',
'suspended',
'shutdown',
+ 'crashed',
'unknown',
]
@@ -69,6 +70,7 @@ DOM_STATE_PAUSED = XEN_API_VM_POWER_STAT
DOM_STATE_RUNNING = XEN_API_VM_POWER_STATE_RUNNING
DOM_STATE_SUSPENDED = XEN_API_VM_POWER_STATE_SUSPENDED
DOM_STATE_SHUTDOWN = XEN_API_VM_POWER_STATE_SHUTTINGDOWN
+DOM_STATE_CRASHED = XEN_API_VM_POWER_STATE_CRASHED
DOM_STATE_UNKNOWN = XEN_API_VM_POWER_STATE_UNKNOWN
DOM_STATES_OLD = [
Index: xen-3.2-testing/tools/python/xen/xend/XendDomain.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomain.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomain.py
@@ -43,6 +43,7 @@ from xen.xend.XendConstants import XS_VM
from xen.xend.XendConstants import DOM_STATE_HALTED, DOM_STATE_PAUSED
from xen.xend.XendConstants import DOM_STATE_RUNNING, DOM_STATE_SUSPENDED
from xen.xend.XendConstants import DOM_STATE_SHUTDOWN, DOM_STATE_UNKNOWN
+from xen.xend.XendConstants import DOM_STATE_CRASHED
from xen.xend.XendConstants import TRIGGER_TYPE
from xen.xend.XendDevices import XendDevices
from xen.xend.XendAPIConstants import *
@@ -69,6 +70,7 @@ POWER_STATE_NAMES = dict([(x, XEN_API_VM
DOM_STATE_RUNNING,
DOM_STATE_SUSPENDED,
DOM_STATE_SHUTDOWN,
+ DOM_STATE_CRASHED,
DOM_STATE_UNKNOWN]])
POWER_STATE_ALL = 'all'
@@ -1191,13 +1193,14 @@ class XendDomain:
if dominfo.getDomid() == DOM0_ID:
raise XendError("Cannot pause privileged domain %s" % domid)
ds = dominfo._stateGet()
- if ds not in (DOM_STATE_RUNNING, DOM_STATE_PAUSED):
+ if ds not in (DOM_STATE_RUNNING, DOM_STATE_PAUSED, DOM_STATE_CRASHED):
raise VMBadState("Domain '%s' is not started" % domid,
POWER_STATE_NAMES[DOM_STATE_RUNNING],
POWER_STATE_NAMES[ds])
log.info("Domain %s (%d) paused.", dominfo.getName(),
int(dominfo.getDomid()))
- dominfo.pause()
+ if ds == DOM_STATE_RUNNING:
+ dominfo.pause()
if state:
return ds
except XendInvalidDomain:
@@ -1216,7 +1219,7 @@ class XendDomain:
if dominfo.getDomid() == DOM0_ID:
raise XendError("Cannot dump core for privileged domain %s" % domid)
- if dominfo._stateGet() not in (DOM_STATE_PAUSED, DOM_STATE_RUNNING):
+ if dominfo._stateGet() not in (DOM_STATE_PAUSED, DOM_STATE_RUNNING, DOM_STATE_CRASHED):
raise VMBadState("Domain '%s' is not started" % domid,
POWER_STATE_NAMES[DOM_STATE_PAUSED],
POWER_STATE_NAMES[dominfo._stateGet()])
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -414,7 +414,7 @@ class XendDomainInfo:
"""
from xen.xend import XendDomain
- if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED):
+ if self._stateGet() in (XEN_API_VM_POWER_STATE_HALTED, XEN_API_VM_POWER_STATE_SUSPENDED, XEN_API_VM_POWER_STATE_CRASHED):
try:
XendTask.log_progress(0, 30, self._constructDomain)
XendTask.log_progress(31, 60, self._initDomain)
@@ -648,7 +648,7 @@ class XendDomainInfo:
return rc
def getDeviceSxprs(self, deviceClass):
- if self._stateGet() in (DOM_STATE_RUNNING, DOM_STATE_PAUSED):
+ if self._stateGet() in (DOM_STATE_RUNNING, DOM_STATE_PAUSED, DOM_STATE_CRASHED):
return self.getDeviceController(deviceClass).sxprs()
else:
sxprs = []
@@ -2248,6 +2248,9 @@ class XendDomainInfo:
return XEN_API_VM_POWER_STATE_SUSPENDED
else:
return XEN_API_VM_POWER_STATE_HALTED
+ elif info['crashed']:
+ # Crashed
+ return XEN_API_VM_POWER_STATE_CRASHED
else:
# We are either RUNNING or PAUSED
if info['paused']:
++++++ 16884-xend-rename-restart.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201267747 0
# Node ID 367902a19412ba2cb6b3dff88a83ba624457e8e0
# Parent 666573856c5928371435b72d907dd7f06965965f
Fix 'on_*=rename-restart' domain configuration option.
When setting e.g. 'on_crash=rename-restart' option in domain config
and crashing guest OS running in the domain, the new domain is
restarted with same name as renamed domain.
jfehlig4: # xm li
Name ID Mem VCPUs State Time(s)
Domain-0 0 1233 4 r----- 937.9
Domain-e64b12a0-0493-44d7-afde-55c776513426 21 384 1 ---c- 14.3
Domain-e64b12a0-0493-44d7-afde-55c776513426 22 384 1 r----- 7.3
This patch copies the domain info prior to setting new name and uuid
in the crashed domain info and uses the copied domain info to
construct the restarted domain.
Signed-off-by: Jim Fehlig
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1386,9 +1386,10 @@ class XendDomainInfo:
self._writeVm('xend/previous_restart_time', str(now))
+ new_dom_info = self.info
try:
if rename:
- self._preserveForRestart()
+ new_dom_info = self._preserveForRestart()
else:
self._unwatchVm()
self.destroyDomain()
@@ -1402,7 +1403,7 @@ class XendDomainInfo:
new_dom = None
try:
new_dom = XendDomain.instance().domain_create_from_dict(
- self.info)
+ new_dom_info)
new_dom.waitForDevices()
new_dom.unpause()
rst_cnt = self._readVm('xend/restart_count')
@@ -1433,11 +1434,15 @@ class XendDomainInfo:
new_name, new_uuid)
self._unwatchVm()
self._releaseDevices()
+ new_dom_info = self.info.copy()
+ new_dom_info['name_label'] = self.info['name_label']
+ new_dom_info['uuid'] = self.info['uuid']
self.info['name_label'] = new_name
self.info['uuid'] = new_uuid
self.vmpath = XS_VMROOT + new_uuid
self._storeVmDetails()
self._preserve()
+ return new_dom_info
def _preserve(self):
++++++ 16885-xend-config-comments.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201267771 0
# Node ID dc6264577b5905a82a41d082544280867f259d81
# Parent 367902a19412ba2cb6b3dff88a83ba624457e8e0
Remove outdated comments concerning Xen API in xend configuration file.
Signed-off-by: Jim Fehlig
diff -r 367902a19412 -r dc6264577b59 tools/examples/xend-config.sxp
--- a/tools/examples/xend-config.sxp Fri Jan 25 13:29:07 2008 +0000
+++ b/tools/examples/xend-config.sxp Fri Jan 25 13:29:31 2008 +0000
@@ -15,9 +15,7 @@
#(loglevel DEBUG)
-# The Xen-API server configuration. (Please note that this server is
-# available as an UNSUPPORTED PREVIEW in Xen 3.0.4, and should not be relied
-# upon).
+# The Xen-API server configuration.
#
# This value configures the ports, interfaces, and access controls for the
# Xen-API server. Each entry in the list starts with either unix, a port
++++++ 16886-xenstore-leak.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201267791 0
# Node ID 7f9646fcffe8075a75ba831832773ace485a8608
# Parent dc6264577b5905a82a41d082544280867f259d81
Fix leaking of /vm/<uuid> path in xenstore on various VM lifecycle events.
Signed-off-by: Jim Fehlig
Index: xen-3.2-testing/tools/python/xen/xend/XendCheckpoint.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendCheckpoint.py
+++ xen-3.2-testing/tools/python/xen/xend/XendCheckpoint.py
@@ -125,10 +125,10 @@ def save(fd, dominfo, network, live, dst
if checkpoint:
dominfo.resumeDomain()
else:
- dominfo.destroyDomain()
+ dominfo.destroy()
dominfo.testDeviceComplete()
try:
- dominfo.setName(domain_name)
+ dominfo.setName(domain_name, False)
except VmError:
# Ignore this. The name conflict (hopefully) arises because we
# are doing localhost migration; if we are doing a suspend of a
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1118,10 +1118,11 @@ class XendDomainInfo:
def getDomid(self):
return self.domid
- def setName(self, name):
+ def setName(self, name, to_store = True):
self._checkName(name)
self.info['name_label'] = name
- self.storeVm("name", name)
+ if to_store:
+ self.storeVm("name", name)
def getName(self):
return self.info['name_label']
@@ -1392,7 +1393,7 @@ class XendDomainInfo:
new_dom_info = self._preserveForRestart()
else:
self._unwatchVm()
- self.destroyDomain()
+ self.destroy()
# new_dom's VM will be the same as this domain's VM, except where
# the rename flag has instructed us to call preserveForRestart.
@@ -1406,9 +1407,6 @@ class XendDomainInfo:
new_dom_info)
new_dom.waitForDevices()
new_dom.unpause()
- rst_cnt = self._readVm('xend/restart_count')
- rst_cnt = int(rst_cnt) + 1
- self._writeVm('xend/restart_count', str(rst_cnt))
new_dom._removeVm(RESTART_IN_PROGRESS)
except:
if new_dom:
@@ -1434,13 +1432,19 @@ class XendDomainInfo:
new_name, new_uuid)
self._unwatchVm()
self._releaseDevices()
+ # Remove existing vm node in xenstore
+ self._removeVm()
new_dom_info = self.info.copy()
new_dom_info['name_label'] = self.info['name_label']
new_dom_info['uuid'] = self.info['uuid']
self.info['name_label'] = new_name
self.info['uuid'] = new_uuid
self.vmpath = XS_VMROOT + new_uuid
+ # Write out new vm node to xenstore
self._storeVmDetails()
+ rst_cnt = self._readVm('xend/restart_count')
+ rst_cnt = int(rst_cnt) + 1
+ self._writeVm('xend/restart_count', str(rst_cnt))
self._preserve()
return new_dom_info
++++++ 16890-xenapi-version.patch ++++++
# HG changeset patch
# User Keir Fraser
# Date 1201278634 0
# Node ID c2216dce87fba6866de8814b19ab580a852f65b6
# Parent c360bb765b25b5a83550741e6ff80007ffb00885
Update XenAPI version number, changelog, and cover sheet.
Signed-off-by: Jim Fehlig
diff -r c360bb765b25 -r c2216dce87fb docs/xen-api/revision-history.tex
--- a/docs/xen-api/revision-history.tex Fri Jan 25 16:26:31 2008 +0000
+++ b/docs/xen-api/revision-history.tex Fri Jan 25 16:30:34 2008 +0000
@@ -16,5 +16,12 @@
\end{flushleft}
\end{minipage}\\
\hline
+ 1.0.2 & 25th Jan. 08 & J. Fehlig &
+ \begin{minipage}[t]{7cm}
+ \begin{flushleft}
+ Added Crashed VM power state.
+ \end{flushleft}
+ \end{minipage}\\
+ \hline
\end{tabular}
\end{center}
\ No newline at end of file
diff -r c360bb765b25 -r c2216dce87fb docs/xen-api/xenapi-coversheet.tex
--- a/docs/xen-api/xenapi-coversheet.tex Fri Jan 25 16:26:31 2008 +0000
+++ b/docs/xen-api/xenapi-coversheet.tex Fri Jan 25 16:30:34 2008 +0000
@@ -17,12 +17,12 @@
\newcommand{\coversheetlogo}{xen.eps}
%% Document date
-\newcommand{\datestring}{10th December 2007}
+\newcommand{\datestring}{25th January 2008}
\newcommand{\releasestatement}{Stable Release}
%% Document revision
-\newcommand{\revstring}{API Revision 1.0.1}
+\newcommand{\revstring}{API Revision 1.0.2}
%% Document authors
\newcommand{\docauthors}{
++++++ 32on64-extra-mem.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:47.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:47.000000000 +0100
@@ -2,7 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1758,7 +1758,7 @@ class XendDomainInfo:
+@@ -1772,7 +1772,7 @@ class XendDomainInfo:
xc.domain_setmaxmem(self.domid, maxmem)
# Make sure there's enough RAM available for the domain
++++++ blktap.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:47.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:47.000000000 +0100
@@ -5,7 +5,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2064,7 +2064,7 @@ class XendDomainInfo:
+@@ -2078,7 +2078,7 @@ class XendDomainInfo:
(fn, BOOTLOADER_LOOPBACK_DEVICE))
vbd = {
++++++ block-iscsi ++++++
--- arch/i386/xen/block-iscsi 2007-11-02 18:16:35.000000000 +0100
+++ xen/block-iscsi 2008-01-04 01:49:56.000000000 +0100
@@ -72,16 +72,17 @@
{ /etc/init.d/open-iscsi start >/dev/null 2>&1; sleep 1; }
# list of targets on node
par=`xenstore-read $XENBUS_PATH/params` || true
- TGTID=$par; TGTID=${TGTID//@/:}; TGTID=${TGTID//\#/,}
+ TGTID=$par; TGTID=${TGTID//@/:}
LUN=${TGTID##*,}; TGTID=${TGTID%,*}
if test $LUN = $TGTID; then unset LUN; fi
#echo "add $TGTID lun $LUN" 1>&2
- while read port uuid; do
+ while read rec port uuid; do
+ rec=${rec%]}; rec=${rec#[}
if test $uuid = $TGTID; then
find_sdev $TGTID $LUN
if test -z "$dev"; then
#echo iscsiadm -m node -T $uuid -p $port -l 1>&2
- iscsiadm -m node -T $uuid -p $port -l || exit 2
+ iscsiadm -m node -r $rec -l || exit 2
usleep 100000
find_sdev $TGTID $LUN
fi
@@ -99,9 +100,10 @@
#echo "remove $dev:$tgt" 1>&2
if test -x /sbin/blockdev -a -n "$node"; then blockdev --flushbufs $node; fi
test -z "$tgt" && exit 2
- while read port uuid; do
+ while read rec port uuid; do
if test $uuid = $tgt; then
- iscsiadm -m node -T $uuid -p $port -u
+ rec=${rec%]}; rec=${rec#[}
+ iscsiadm -m node -r $rec -u
exit 0
fi
done < <(iscsiadm -m node)
++++++ block-npiv ++++++
--- arch/i386/xen/block-npiv 2007-11-02 18:16:35.000000000 +0100
+++ xen/block-npiv 2008-01-30 22:22:01.000000000 +0100
@@ -8,100 +8,267 @@
#set -x
#command=$1
-# Find first alive non-VHOST
-find_qla()
+# Look for the NPIV vport with the WWPN
+# $1 contains the WWPN (assumes it does not contain a leading "0x")
+find_vhost()
{
- unset qla
- for qla in /proc/scsi/qla2xxx/*; do
- if grep -q "<DEAD>" $qla; then
- continue
- fi
- if grep -q "VHOST index" $qla; then
- continue
+ unset vhost
+
+ # look in upstream locations
+ for fchost in /sys/class/fc_vports/* ; do
+ if test -e $fchost/port_name ; then
+ wwpn=`cat $fchost/port_name | sed -e s/^0x//`
+ if test $wwpn = $1 ; then
+ # Note: makes the assumption the vport will always have an scsi_host child
+ vhost=`ls -d $fchost/device/host*`
+ vhost=`basename $vhost`
+ return
+ fi
+ fi
+ done
+
+ # look in vendor-specific locations
+
+ # Emulex - just looks like another scsi_host - so look at fc_hosts...
+ for fchost in /sys/class/fc_host/* ; do
+ if test -e $fchost/port_name ; then
+ wwpn=`cat $fchost/port_name | sed -e s/^0x//`
+ if test $wwpn = $1 ; then
+ # Note: makes the assumption the vport will always have an scsi_host child
+ vhost=`basename $fchost`
+ return
+ fi
+ fi
+ done
+}
+
+
+# Create a NPIV vport on the fabric w/ FABRICNM, with WWPN,WWNN
+# $1 contains FABRICNM
+# $2 contains the VPORT WWPN
+# $3 contains the VPORT WWNN
+# (assumes no name contains a leading "0x")
+create_vport()
+{
+ # find a base adapter with npiv support that is on the right fabric
+
+ # Look via upstream interfaces
+ for fchost in /sys/class/fc_host/* ; do
+ if test -e $fchost/vport_create ; then
+ # is the link up, w/ NPIV support ?
+ pstate=`cat $fchost/port_state`
+ ptype=`cat $fchost/port_type | cut -c 1-5`
+ fname=`cat $fchost/fabric_name | sed -e s/^0x//`
+ if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
+ vmax=`cat $fchost/max_npiv_vports`
+ vinuse=`cat $fchost/npiv_vports_inuse`
+ avail=`expr $vmax - $vinuse`
+ if [ $avail -gt 0 ] ; then
+ # create the vport
+ echo $2":"$3 > $fchost/vport_create
+ if [ $? -eq 0 ] ; then
+ return 0
+ fi
+ # failed - so we'll just look for the next adapter
+ fi
+ fi
+ fi
+ done
+
+ # Look in vendor-specific locations
+
+ # Emulex: interfaces mirror upstream, but are under adapter scsi_host
+ for shost in /sys/class/scsi_host/* ; do
+ if [ -e $shost/vport_create ] ; then
+ fchost=`ls -d $shost/device/fc_host*`
+ # is the link up, w/ NPIV support ?
+ pstate=`cat $fchost/port_state`
+ ptype=`cat $fchost/port_type | cut -c 1-5`
+ fname=`cat $fchost/fabric_name | sed -e s/^0x//`
+ if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
+ vmax=`cat $shost/max_npiv_vports`
+ vinuse=`cat $shost/npiv_vports_inuse`
+ avail=`expr $vmax - $vinuse`
+ if [ $avail -gt 0 ] ; then
+ # create the vport
+ echo $2":"$3 > $shost/vport_create
+ if [ $? -eq 0 ] ; then
+ return 0
+ fi
+ # failed - so we'll just look for the next adapter
+ fi
+ fi
fi
- return
done
+
+ return 1
}
-# Find dev for NPIV
+
+# Look for the LUN on the indicated scsi_host (which is an NPIV vport)
+# $1 is the scsi_host name (normalized to simply the hostX name)
+# $2 is the WWPN of the tgt port the lun is on
+# Note: this implies we don't support a multipath'd lun, or we
+# are explicitly identifying a "path"
+# $3 is the LUN number of the scsi device
find_sdev()
{
unset dev
- for host in /proc/scsi/qla2xxx/*; do
- if grep -q $1 $host; then
- h=${host##*/}
- dev=`readlink /sys/class/scsi_device/$h*:0/device/block*`
- dev=${dev##*/}
- return
+ hostno=${1/*host/}
+ for sdev in /sys/class/scsi_device/${hostno}:*:$3 ; do
+ if test -e $sdev/device/../fc_trans*/port_name ; then
+ tgtwwpn=`cat $sdev/device/../fc_trans*/port_name | sed -e s/^0x//`
+ if test $tgtwwpn = $2 ; then
+ if test -e $sdev/device/block* ; then
+ dev=`readlink $sdev/device/block*`
+ dev=${dev##*/}
+ return
+ fi
+ fi
fi
done
-}
+}
-# Find host for NPIV
-find_host()
+
+# Look for the NPIV vhost based on a scsi "sdX" name
+# $1 is the "sdX" name
+find_vhost_from_dev()
{
- unset host
- for host in /proc/scsi/qla2xxx/*; do
- if grep -q $1 $host; then
- host=${host##*/}
- return
+ unset vhost
+ hostno=`readlink /sys/block/$1/device`
+ hostno=${hostno##*/}
+ hostno=${hostno%%:*}
+ if test -z "$hostno" ; then return; fi
+ vhost="host"$hostno
+}
+
+
+# We're about to terminate a vhost based on a scsi device
+# Flush all nodes on that vhost as they are about to go away
+# $1 is the vhost
+flush_nodes_on_vhost()
+{
+ if test ! -x /sbin/blockdev ; then return; fi
+ hostno=${1/*host/}
+ for sdev in /sys/class/scsi_device/${hostno}:* ; do
+ if test -e $sdev/device/block* ; then
+ dev=`readlink $sdev/device/block*`
+ dev=${dev##*/}
+ dev="/dev/"$dev
+ if test -n "$dev"; then
+ blockdev --flushbufs $dev
+ fi
fi
done
-}
+}
-# Find NPIV for dev
-find_sdev_rev()
+
+# Terminate a NPIV vhost
+# $1 is vhost
+delete_vhost()
{
- unset npiv
- for host in /proc/scsi/qla2xxx/*; do
- h=${host##*/}
- if test ! -L /sys/class/scsi_device/$h*:0/device/block*; then
- continue
- fi
- dev=`readlink /sys/class/scsi_device/$h*:0/device/block*`
- dev=${dev##*/}
- if test $dev = $1; then
- npiv=`grep adapter-port= $host`
- npiv=${npiv##*=}
- npiv=${npiv%;}
- return
+ # use upstream interface
+ for vport in /sys/class/fc_vports/* ; do
+ if test -e $vport/device/$1 ; then
+ if test -e $vport/vport_delete ; then
+ echo "1" > $vport/vport_delete
+ if test $? -ne 0 ; then exit 6; fi
+ sleep 4
+ return
+ fi
fi
done
-}
-find_qla
-test -z "$qla" && exit 2
+ # use vendor specific interface
+
+ # Emulex
+ if test -e /sys/class/fc_host/$1/device/../scsi_host*/lpfc_drvr_version ; then
+ shost=`ls -1d /sys/class/fc_host/$1/device/../scsi_host* | sed s/.*scsi_host://`
+ vportwwpn=`cat /sys/class/fc_host/$1/port_name | sed s/^0x//`
+ vportwwnn=`cat /sys/class/fc_host/$1/node_name | sed s/^0x//`
+ echo "$vportwwpn:$vportwwnn" > /sys/class/scsi_host/$shost/vport_delete
+ if test $? -ne 0 ; then exit 6; fi
+ sleep 4
+ return
+ fi
+
+ # Qlogic
+ if test -e /sys/class/fc_host/$1/device/../scsi_host*/driver_version ; then
+ shost=`ls -1d /sys/class/fc_host/$1/device/../scsi_host* | sed s/.*scsi_host://`
+ vportwwpn=`cat /sys/class/fc_host/$1/port_name | sed s/^0x//`
+ vportwwnn=`cat /sys/class/fc_host/$1/node_name | sed s/^0x//`
+ echo "$vportwwpn:$vportwwnn" > /sys/class/scsi_host/$shost/vport_delete
+ if test $? -ne 0 ; then exit 6; fi
+ sleep 4
+ return
+ fi
+
+ exit 6
+}
case "$command" in
add)
+ # Params is one big arg, with fields separated by hyphens:
+ # FABRIC-VPWWPN-VPWWNN-TGTWWPN-LUN#
+ # arg 2 - Fabric Name
+ # arg 3 - VPORT's WWPN
+ # arg 4 - VPORT's WWNN
+ # arg 5 - Target's WWPN
+ # arg 6 - LUN # on Target
+ # no wwn contains a leading 0x - it is a 16 character hex value
+ # You may want to optionally pick a specific adapter ?
par=`xenstore-read $XENBUS_PATH/params` || true
#par=$2
- NPIV=$par
- find_sdev $NPIV
- if test -z "$dev"; then
- echo "scsi-qlavportc=$NPIV" > $qla
+ NPIVARGS=$par;
+ LUN=${NPIVARGS##*-*-*-*-}; NPIVARGS=${NPIVARGS%-*}
+ if test $LUN = $NPIVARGS ; then exit 1; fi
+ TGTWWPN=${NPIVARGS##*-*-*-}; NPIVARGS=${NPIVARGS%-*}
+ if test $TGTWWPN = $NPIVARGS ; then exit 1; fi
+ VPORTWWNN=${NPIVARGS##*-*-}; NPIVARGS=${NPIVARGS%-*}
+ if test $VPORTWWNN = $NPIVARGS ; then exit 1; fi
+ VPORTWWPN=${NPIVARGS##*-}; NPIVARGS=${NPIVARGS%-*}
+ if test $VPORTWWPN = $NPIVARGS ; then exit 1; fi
+ FABRICNM=$NPIVARGS
+
+ # Ensure we compare everything using lower-case hex characters
+ TGTWWPN=`echo $TGTWWPN | tr A-Z a-z`
+ VPORTWWPN=`echo $VPORTWWPN | tr A-Z a-z`
+ VPORTWWNN=`echo $VPORTWWNN | tr A-Z a-z`
+ FABRICNM=`echo $FABRICNM | tr A-Z a-z`
+
+ find_vhost $VPORTWWPN
+ if test -z "$vhost" ; then
+ create_vport $FABRICNM $VPORTWWPN $VPORTWWNN
+ if [ $? -ne 0 ] ; then exit 2; fi
sleep 8
- find_host $NPIV
- # echo "/sys/class/scsi_host/host$host/scan"
- echo "- - -" > /sys/class/scsi_host/host$host/scan
- sleep 1
- find_sdev $NPIV
+ find_vhost $VPORTWWPN
+ if test -z "$vhost" ; then exit 3; fi
+ fi
+ find_sdev $vhost $TGTWWPN $LUN
+ if test -z "$dev"; then
+ echo "- - -" > /sys/class/scsi_host/$vhost/scan
+ sleep 2
+ find_sdev $vhost $TGTWWPN $LUN
+ fi
+ if test ! -z "$dev"; then
xenstore-write $XENBUS_PATH/node /dev/$dev
write_dev /dev/$dev
exit 0
fi
- exit 1
+
+ exit 4
;;
+
remove)
node=`xenstore-read $XENBUS_PATH/node` || true
#node=$2
dev=$node; dev=${dev#/dev/}
- find_sdev_rev $dev
- if test -x /sbin/blockdev -a -n "$node"; then blockdev --flushbufs $node; fi
- test -z "$npiv" && exit 2
- # echo "scsi-qlavportd" > $qla
- echo "scsi-qlavportd=$npiv" > $qla
- sleep 4
+ # this is really screwy. the first delete of a lun will
+ # terminate the entire vport (all luns)
+ find_vhost_from_dev $dev
+ if test -z "$vhost" ; then exit 5; fi
+ flush_nodes_on_vhost $vhost
+ delete_vhost $vhost
exit 0
;;
esac
++++++ const-set-trap-table-arg.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:47.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:47.000000000 +0100
@@ -1,7 +1,7 @@
-Index: 2008-01-07/xen/arch/x86/traps.c
+Index: 2008-01-18/xen/arch/x86/traps.c
===================================================================
---- 2008-01-07.orig/xen/arch/x86/traps.c 2008-01-07 12:02:51.000000000 +0100
-+++ 2008-01-07/xen/arch/x86/traps.c 2008-01-07 12:11:52.000000000 +0100
+--- 2008-01-18.orig/xen/arch/x86/traps.c 2008-01-17 09:25:35.000000000 +0100
++++ 2008-01-18/xen/arch/x86/traps.c 2008-01-18 09:03:16.000000000 +0100
@@ -49,6 +49,7 @@
#include
#include
@@ -10,7 +10,7 @@
#include
#include
#include
-@@ -2812,7 +2813,7 @@ long unregister_guest_nmi_callback(void)
+@@ -2822,7 +2823,7 @@ long unregister_guest_nmi_callback(void)
return 0;
}
@@ -19,10 +19,10 @@
{
struct trap_info cur;
struct vcpu *curr = current;
-Index: 2008-01-07/xen/include/asm-x86/hypercall.h
+Index: 2008-01-18/xen/include/asm-x86/hypercall.h
===================================================================
---- 2008-01-07.orig/xen/include/asm-x86/hypercall.h 2007-06-04 08:35:36.000000000 +0200
-+++ 2008-01-07/xen/include/asm-x86/hypercall.h 2008-01-07 12:11:52.000000000 +0100
+--- 2008-01-18.orig/xen/include/asm-x86/hypercall.h 2008-01-16 14:24:36.000000000 +0100
++++ 2008-01-18/xen/include/asm-x86/hypercall.h 2008-01-18 09:03:16.000000000 +0100
@@ -32,9 +32,10 @@ extern long
do_physdev_op_compat(
XEN_GUEST_HANDLE(physdev_op_t) uop);
@@ -35,10 +35,10 @@
extern int
do_mmu_update(
-Index: 2008-01-07/xen/include/public/arch-x86/xen.h
+Index: 2008-01-18/xen/include/public/arch-x86/xen.h
===================================================================
---- 2008-01-07.orig/xen/include/public/arch-x86/xen.h 2008-01-07 12:11:43.000000000 +0100
-+++ 2008-01-07/xen/include/public/arch-x86/xen.h 2008-01-07 12:11:52.000000000 +0100
+--- 2008-01-18.orig/xen/include/public/arch-x86/xen.h 2008-01-18 09:03:15.000000000 +0100
++++ 2008-01-18/xen/include/public/arch-x86/xen.h 2008-01-18 09:03:16.000000000 +0100
@@ -98,7 +98,6 @@ struct trap_info {
unsigned long address; /* code offset */
};
++++++ hypercall-check.patch ++++++
Index: 2008-01-07/unmodified_drivers/linux-2.6/platform-pci/evtchn.c
===================================================================
--- 2008-01-07.orig/unmodified_drivers/linux-2.6/platform-pci/evtchn.c 2007-11-12 08:47:41.000000000 +0100
+++ 2008-01-07/unmodified_drivers/linux-2.6/platform-pci/evtchn.c 2008-01-17 17:53:37.000000000 +0100
@@ -118,8 +118,8 @@ void unmask_evtchn(int port)
ever bind event channels to vcpu 0 in HVM guests. */
if (unlikely(cpu != 0)) {
evtchn_unmask_t op = { .port = port };
- (void)HYPERVISOR_event_channel_op(EVTCHNOP_unmask,
- &op);
+ VOID(HYPERVISOR_event_channel_op(EVTCHNOP_unmask,
+ &op));
put_cpu();
return;
}
@@ -227,7 +227,8 @@ void unbind_from_irqhandler(unsigned int
mask_evtchn(evtchn);
if (irq_evtchn[irq].close) {
struct evtchn_close close = { .port = evtchn };
- HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
+ if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
+ BUG();
}
}
@@ -310,7 +311,7 @@ static irqreturn_t evtchn_interrupt(int
void force_evtchn_callback(void)
{
- (void)HYPERVISOR_xen_version(0, NULL);
+ VOID(HYPERVISOR_xen_version(0, NULL));
}
EXPORT_SYMBOL(force_evtchn_callback);
Index: 2008-01-07/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
===================================================================
--- 2008-01-07.orig/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c 2007-11-02 17:25:53.000000000 +0100
+++ 2008-01-07/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c 2008-01-17 18:02:17.000000000 +0100
@@ -58,7 +58,7 @@ static int bp_suspend(void)
BUG_ON(!irqs_disabled());
- suspend_cancelled = HYPERVISOR_shutdown(SHUTDOWN_suspend);
+ suspend_cancelled = HYPERVISOR_suspend(0);
if (!suspend_cancelled) {
write_lock(&suspend_lock);
++++++ init.xend ++++++
--- arch/i386/xen/init.xend 2007-11-02 18:16:58.000000000 +0100
+++ xen/init.xend 2008-01-31 19:31:17.000000000 +0100
@@ -84,7 +84,6 @@
fi
# Load XEN backend modules
# Sidenote: They could be loaded later:
- # - netloop at network-bridge init time
# - netbk and blkbk when the dom0 hotplug events occur
# (in xen-network-common.sh and block-common.sh)
# - xenblk when xend prepares for bootloader
@@ -92,7 +91,6 @@
modprobe blktap 2>/dev/null || true
modprobe blkbk 2>/dev/null || true
modprobe xenblk 2>/dev/null || true
- modprobe netloop 2>/dev/null || true
modprobe netbk 2>/dev/null || true
xend start
await_daemons_up
++++++ multinet-common.sh ++++++
++++ 2436 lines (skipped)
++++ between multinet-common.sh
++++ and xen/multinet-common.sh
++++++ network-multinet ++++++
--- arch/i386/xen/network-multinet 2007-12-17 19:09:44.000000000 +0100
+++ xen/network-multinet 2008-02-01 02:34:23.000000000 +0100
@@ -2,8 +2,8 @@
#============================================================================
# network-multinet
#
-# Version = 2.0.1
-# Date = 2007-11-29
+# Version = 3.0.0
+# Date = 2008-01-30
#
# Maintainer(s) = Ron Terry - ron (at) pronetworkconsulting (dot) com
#
@@ -13,64 +13,59 @@
#
# Description:
#
-# Replacement for the xen network-bridge, network-nat and network-route
+# Replacement for the Xen network-bridge, network-nat and network-route
# scripts. This script allows for the creation of multiple networks.
#
-# This script can create 4 types of networks:
+# This script can create 6 types of networks:
#
-# bridged: -Networks that contain both a physical network device (ethX)
-# and a virtual network device (vethX) from Dom0.
+# bridged: -Networks that are connected to a physical network device
+# in Dom0 and on which Dom0 can communitcate
# -This is the traditional type of network created in xen by
# the basic network-bridge script.
# -VMs on these network(s) appear to be on the real network(s)
#
-# nohost: -Networks that contain a physical network device but not a
-# virtual network device from Dom0.
+# nohost: -Networks that are connected to Dom0 but on which Dom0 cannot
+# communitcate
# -These can be used to allow virtual machines to communicate
# with the outside world but not with Dom0.
# (Usefull if you want to isolate traffic away from Dom0)
#
-# hostonly: -Networks that contain only a virtual network device (vethX)
-# from Dom0.
+# hostonly: -Networks that are connected to Dom0 but are private from
+# the physical network
# -This type of network will allow VMs connected to it to
# access only Dom0 and other VMs connected to the network.
# -This type of network is similiar to a VMware "HOST ONLY"
# network.
#
-# nat: -Networks that contain only a virtual network device (vethX)
-# from Dom0.
+# nat: -Networks that are connected to Dom0 and are private from the
+# physical network but VMs can get out to the physical network
# -This type of network will allow VMs connected to it to access
-# Dom0,the "outside world" via NAT and other VMs connected to it.
+# Dom0, the "outside world" via NAT and other VMs connected to it.
# -This type of network is similiar to a VMware "NAT" network.
#
-# routed: -Networks that contain only a virtual network device (vethX)
-# from Dom0.
+# routed: -Networks that are not directly connected to the physical network
+# but who's traffic is directly routed to other networks
# -This type of network will allow VMs connected to it to access
-# Dom0,the "outside world" via routing through Dom0 and other VMs
+# Dom0, the "outside world" via routing through Dom0 and other VMs
# connected to it.
#
-# empty: -Networks that do not contain any physical or virtual network
-# devices from Dom0.
+# empty: -Networks that are not connected to either Dom0 or the physical
+# network
# -These can be used to allow VMs in DomUs to communicate only
# with other DomUs and not Dom0.
#
-
#
# This script accepts the (start|stop|restart|status) parameters.
#
# This script requires that the vif-bridge script be used as the vif
# creation script (as opposed to vif-nat/vif-route).
#
-# This script will test for the presence of the physical interfaces
-# configured to be connected to bridged networks and only attempt to
-# create networks on the ones that are present and up. It will also test
-# for the presence of virtual interfaces configured to be connected to
-# other networks and only create networks for the ones that exist and
-# are not already connected to an existing network.
+# This script will verify that a requested physical interface is present and
+# up before creating the network and connecting the physical interface to it.
#
# Edit the NETWORK_LIST variable to define which networks to create on which
# interfaces. The default is to create a bridged network on the first
-# interface active network interface.
+# active network interface.
#
# To enable this script edit the network-script field in the
# /etc/xen/xend-config.sxp file.
@@ -79,8 +74,6 @@
#
# Depends on: $SCRIPT_PATH/multinet-common.sh
#
-# Calls if present: $SCRIPT_PATH/xen-dhcpd
-#
# Config file: /etc/sysconfig/xend
#
# Usage: network-multinet (start|stop|restart|status)
@@ -88,18 +81,9 @@
# Vars:
#
# --------------------------- In this script ----------------------------
-# SCRIPT_PATH -Path to the directory containing the xen network-bridge
-# script (typically /etc/xen/scripts)
-#
-# CONFIG_FILE_PATH -Path to extra config files
-# (not used currently by this script)
#
-# NETWORK_SAVE_PATH -Path to save network configuration information in
-#
-# IPTABLES_SAVE_FILE -File in which to save backed-up iptables rules so that they
-# may be restored when the script is stopped
-#
-# XEN_DHCP_SCRIPT -Script called to manage the DHCP server on the specified networks
+# SCRIPT_PATH -Path to the directory containing the xen network
+# configuration scripts (typically /etc/xen/scripts)
#
# ------------------------- In the config file --------------------------
# NETWORK_LIST -Space delimited list of network devices to create networks
@@ -109,7 +93,7 @@
#
# Example with 3 virtual devices:
#
-# "bridge,0,eth0,,,dhcp-off nat,0,veth2,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off hostonly,0,veth3,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off"
+# "bridge,0,default,default,dhcp-off nat,0,none,172.23.0.1/16,dhcp-off hostonly,0,none,172.23.0.1/16,dhcp-off"
#
# NAT_EXTERNAL_INTERFACE -Network interface to use as the external interface
# for NATed and Routed networks
@@ -124,10 +108,6 @@
. /etc/sysconfig/xend
SCRIPT_PATH="/etc/xen/scripts"
-CONF_FILE_PATH="/etc/xen/conf"
-NETWORK_SAVE_PATH="/var/lib/xend/network_save"
-IPTABLES_SAVE_FILE="$NETWORK_SAVE_PATH/iptables-save"
-XEN_DHCP_SCRIPT="$SCRIPT_PATH/xen-dhcpd"
#### Script Functions #####################################################
@@ -155,11 +135,6 @@
then
mkdir $NETWORK_SAVE_PATH
fi
-
- if ! [ -d $CONF_FILE_PATH ]
- then
- mkdir $CONF_FILE_PATH
- fi
}
@@ -171,21 +146,25 @@
VIF_COUNT=0
- case $NAT_EXTERNAL_INTERFACE in
- default)
- NAT_EXTERNAL_INTERFACE=`ip route list | awk '/^default / { print $NF }'`
- ;;
- esac
-
for NETWORK in $NETWORK_LIST
do
local NET_TYPE=`echo $NETWORK | cut -d "," -f 1`
local NET_NUMBER=`echo $NETWORK | cut -d "," -f 2`
local NET_DEV=`echo $NETWORK | cut -d "," -f 3`
- local NET_DEV_MAC=`echo $NETWORK | cut -d "," -f 4`
- local NET_DEV_IP=`echo $NETWORK | cut -d "," -f 5`
- local NET_DHCP_SRV=`echo $NETWORK | cut -d "," -f 6`
+ local NET_DEV_IP=`echo $NETWORK | cut -d "," -f 4`
+ local NET_DHCP_SRV=`echo $NETWORK | cut -d "," -f 5`
+
+ case $NET_DHCP_SRV in
+ dhcp-on)
+ DHCP_SRV="on"
+ ;;
+ *)
+ DHCP_SRV="off"
+ ;;
+ esac
+ # Find the name of the network interface for the first bridged network
+ #---------------------------------------------------------------------
case $NET_DEV in
default)
local NET_DEV=`ip route list | awk '/^default / { print $NF }'`
@@ -194,23 +173,128 @@
case $NET_TYPE in
bridge)
- create_bridged_networks $NET_DEV $NET_NUMBER
- ((VIF_COUNT++))
+ # Create the network
+ #---------------------------------------------------------------------
+ configure_bridged_networks $CMD_OPT $NET_DEV $NET_NUMBER
;;
nat|route|hostonly)
- create_local_networks $NET_DEV $NET_TYPE $NET_NUMBER $NET_DEV_MAC $NET_DEV_IP $NET_DHCP_SRV
- ((VIF_COUNT++))
+ # Create the network
+ #---------------------------------------------------------------------
+ configure_local_networks $CMD_OPT $NET_DEV $NET_TYPE $NET_NUMBER $NET_DEV_IP $NET_DHCP_SRV
;;
nohost)
- create_nohost_networks $NET_DEV $NET_NUMBER
+ # Create the network
+ #---------------------------------------------------------------------
+ configure_nohost_networks $CMD_OPT $NET_DEV $NET_NUMBER
;;
empty)
- create_empty_networks $NET_NUMBER
+ # Create the network
+ #---------------------------------------------------------------------
+ configure_empty_networks $CMD_OPT $NET_NUMBER
;;
esac
done
}
+#***** Pre/Post Start/Stop Functions **************************************
+
+run_prestart_scripts() {
+ echo ""
+ echo "============================================================"
+ echo "Running pre-start scripts"
+ echo
+ test -d $PLUGIN_DIR/pre-start || mkdir -p $PLUGIN_DIR/pre-start
+ if ls $PLUGIN_DIR/pre-start/*.sh > /dev/null 2&>1
+ then
+ for SCRIPT in `ls $PLUGIN_DIR/pre-start/*.sh`
+ do
+ echo ""
+ echo " Running $SCRIPT"
+ echo
+ $SCRIPT prestart
+ echo
+ echo "------------------------------------------------------------"
+ done
+ else
+ echo " No pre-start scripts to run. Continuing ..."
+ echo
+ fi
+ echo "============================================================"
+}
+
+run_poststart_scripts() {
+ echo ""
+ echo "============================================================"
+ echo "Running post-start scripts"
+ echo
+ test -d $PLUGIN_DIR/post-start || mkdir -p $PLUGIN_DIR/post-start
+ if ls $PLUGIN_DIR/post-start/*.sh > /dev/null 2&>1
+ then
+ for SCRIPT in `ls $PLUGIN_DIR/post-start/*.sh`
+ do
+ echo ""
+ echo " Running $SCRIPT"
+ echo
+ $SCRIPT poststart
+ echo
+ echo "------------------------------------------------------------"
+ done
+ else
+ echo " No post-start scripts to run. Continuing ..."
+ echo
+ fi
+ echo "============================================================"
+
+}
+
+run_prestop_scripts() {
+ echo ""
+ echo "============================================================"
+ echo "Running pre-stop scripts"
+ echo
+ test -d $PLUGIN_DIR/pre-stop || mkdir -p $PLUGIN_DIR/pre-stop
+ if ls $PLUGIN_DIR/pre-stop/*.sh > /dev/null 2&>1
+ then
+ for SCRIPT in `ls $PLUGIN_DIR/pre-stop/*.sh`
+ do
+ echo ""
+ echo " Running $SCRIPT"
+ echo
+ $SCRIPT prestop
+ echo
+ echo "------------------------------------------------------------"
+ done
+ else
+ echo " No pre-stop scripts to run. Continuing ..."
+ echo
+ fi
+ echo "============================================================"
+}
+
+run_poststop_scripts() {
+ echo ""
+ echo "============================================================"
+ echo "Running post-stop scripts"
+ echo
+ test -d $PLUGIN_DIR/post-stop || mkdir -p $PLUGIN_DIR/post-stop
+ if ls $PLUGIN_DIR/post-stop/*.sh > /dev/null 2&>1
+ then
+ for SCRIPT in `ls $PLUGIN_DIR/post-stop/*.sh`
+ do
+ echo ""
+ echo " Running $SCRIPT"
+ echo
+ $SCRIPT poststop
+ echo
+ echo "------------------------------------------------------------"
+ done
+ else
+ echo " No post-stop scripts to run. Continuing ..."
+ echo
+ fi
+ echo "============================================================"
+}
+
#### Start, Stop, Status Functions ########################################
start_xend_network() {
@@ -218,11 +302,19 @@
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo " Starting the xend network environment"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
- make_config_dirs
- manage_susefirewall2 stop || manage_iptables stop
- #manage_susefirewall2 start
- manage_routing start
+ # Determine if we are using SuSEfirewall2
+ use_sf2 start
+
+ # Run pre-start scripts
+ run_prestart_scripts
+ manage_firewall prestart
+
+ # Create the predefined networks
create_networks
+
+ # Run post-start scripts
+ manage_firewall poststart
+ run_poststart_scripts
}
stop_xend_network() {
@@ -230,10 +322,19 @@
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
echo " Stopping the xend network environment"
echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
- manage_susefirewall2 stop
- create_networks
- manage_routing stop
- manage_susefirewall2 start || manage_iptables start
+ # Run pre-stop scripts
+ run_prestop_scripts
+ manage_firewall prestop
+
+ # Remove the networks
+ remove_all_networks
+
+ # Run post-stop scripts
+ manage_firewall poststop
+ run_poststop_scripts
+
+ # Clean-up if we are using the SuSEfirewall2
+ use_sf2 stop
}
show_xend_network_status() {
@@ -244,54 +345,44 @@
get_option "$1"
+make_config_dirs
+
+touch $NETWORKTAB
+
case $CMD_OPT in
start)
# Start the Xen network
start_xend_network
# Start the DHCP server if it exists
- if [ -e $XEN_DHCP_SCRIPT ]
- then
- $XEN_DHCP_SCRIPT start
- fi
+ #do_dhcpd start
;;
stop)
# Stop the DHCP server if it exists
- if [ -e $XEN_DHCP_SCRIPT ]
- then
- $XEN_DHCP_SCRIPT stop
- fi
+ #do_dhcpd stop
# Stop the Xen network
stop_xend_network
;;
restart)
# Stop the DHCP server if it exists
- if [ -e $XEN_DHCP_SCRIPT ]
- then
- $XEN_DHCP_SCRIPT stop
- fi
-
+ #do_dhcpd stop
+
# Stop the Xen network
CMD_OPT="stop"
stop_xend_network
-
+
# Start the Xen network
CMD_OPT="start"
start_xend_network
# Start the DHCP server if it exists
- if [ -e $XEN_DHCP_SCRIPT ]
- then
- $XEN_DHCP_SCRIPT start
- fi
+ #do_dhcpd start
;;
status)
show_xend_network_status
- if [ -e $XEN_DHCP_SCRIPT ]
- then
- $XEN_DHCP_SCRIPT status
- fi
+
+ #do_dhcpd status
;;
esac
++++++ pv-driver-build.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:47.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:47.000000000 +0100
@@ -2,40 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/unmodified_drivers/linux-2.6/mkbuildtree
+++ xen-3.2-testing/unmodified_drivers/linux-2.6/mkbuildtree
-@@ -13,16 +13,30 @@ C=$PWD
- if [ -n "$XEN" -a -d "$XEN" ]; then
- XEN=$(cd $XEN && pwd)
- else
-- XEN=$C/../../xen
-+ XEN=/usr/src/linux/include/xen
- fi
-
- if [ -n "$XL" -a -d "$XL" ]; then
- XL=$(cd $XL && pwd)
- else
-- XL=$C/../../linux-2.6.18-xen.hg
-+ XL=/usr/src/linux
-+fi
-+cd "$(dirname "$0")"
-+
-+if [ -n "$ALT_KMP_OS" -a "$ALT_KMP_OS" == other ]; then
-+ XL=$C/linux-2.6-xen-sparse
-+ XEN=$C/linux-2.6-xen-sparse/include/xen
- fi
-
- for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
-+ # TEMPORARY - Don't link entire directory until the accel.c fix is in the kernel cvs
-+ if echo $d | egrep -q netfront; then
-+ ln -sf ${XL}/drivers/xen/netfront/netfront.c netfront
-+ ln -sf ${XL}/drivers/xen/netfront/netfront.h netfront
-+ cp -p ../../linux-2.6-xen-sparse/drivers/xen/netfront/accel.c netfront
-+ continue
-+ fi
-+ # END TEMPORARY
- if ! echo $d | egrep -q back; then
- lndir $d $(basename $d) > /dev/null 2>&1
- fi
-@@ -39,7 +53,7 @@ ln -sf ${XL}/drivers/xen/core/reboot.c p
+@@ -40,7 +40,7 @@ ln -sf ${XL}/drivers/xen/core/reboot.c p
mkdir -p include/asm include/xen
lndir -silent ${XL}/include/xen include/xen
@@ -44,19 +11,16 @@
# Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must
-Index: xen-3.2-testing/unmodified_drivers/linux-2.6/overrides.mk
+Index: xen-3.2-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
===================================================================
---- xen-3.2-testing.orig/unmodified_drivers/linux-2.6/overrides.mk
-+++ xen-3.2-testing/unmodified_drivers/linux-2.6/overrides.mk
-@@ -4,6 +4,11 @@
- #
- # (i.e. we need the native config for things like -mregparm, but
- # a Xen kernel to find the right headers)
-+ifeq ($(ALT_KMP_OS),other)
-+ SPARSEINCLUDE := -I$(M)/../../linux-2.6-xen-sparse/include/xen -I$(M)/../../linux-2.6-xen-sparse/include
-+ SPARSEINCLUDE += $(CPPFLAGS)
-+ CPPFLAGS = $(SPARSEINCLUDE)
-+endif
- EXTRA_CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205
- EXTRA_CFLAGS += -DCONFIG_XEN_COMPAT=0xffffff
- EXTRA_CFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H
+--- xen-3.2-testing.orig/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
++++ xen-3.2-testing/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h
+@@ -151,7 +151,7 @@ typedef irqreturn_t (*irq_handler_t)(int
+ #endif
+ #endif
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) && CONFIG_SLE_VERSION < 10
+ #define setup_xen_features xen_setup_features
+ #endif
+
++++++ pv-drv-mkbuildtree.patch ++++++
Index: 2008-01-07/unmodified_drivers/linux-2.6/mkbuildtree
===================================================================
--- 2008-01-07.orig/unmodified_drivers/linux-2.6/mkbuildtree 2007-10-09 11:46:22.000000000 +0200
+++ 2008-01-07/unmodified_drivers/linux-2.6/mkbuildtree 2008-01-17 17:32:01.000000000 +0100
@@ -8,27 +8,28 @@ else
echo "This may be overridden on the command line (i386,x86_64,ia64)."
fi
-C=$PWD
+C=$(cd $(dirname $0) && pwd)
+R=${C%/*/*}
if [ -n "$XEN" -a -d "$XEN" ]; then
XEN=$(cd $XEN && pwd)
else
- XEN=$C/../../xen
+ XEN=$R/xen
fi
+echo "Xen tree: $XEN"
if [ -n "$XL" -a -d "$XL" ]; then
XL=$(cd $XL && pwd)
else
- XL=$C/../../linux-2.6.18-xen.hg
+ XL=$R/linux-2.6.18-xen.hg
fi
+echo "Linux tree: $XL"
-for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
- if ! echo $d | egrep -q back; then
- lndir $d $(basename $d) > /dev/null 2>&1
- fi
- if ! echo $d | egrep -q ball; then
- lndir $d $(basename $d) > /dev/null 2>&1
- fi
+cd $C
+
+for d in $(find ${XL}/drivers/xen/ -mindepth 1 -maxdepth 1 -type d); do
+ test -d $(basename $d) || continue
+ lndir $d $(basename $d) > /dev/null 2>&1
done
ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
@@ -44,23 +45,27 @@ ln -nsf ${XEN}/include/public include/xe
# Need to be quite careful here: we don't want the files we link in to
# risk overriding the native Linux ones (in particular, system.h must
# be native and not xenolinux).
-case "$uname"
-in
-"x86_64")
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
- ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/gnttab_dma.h include/asm
- mkdir -p include/asm-i386
- lndir -silent ${XL}/include/asm-i386 include/asm-i386
- ;;
-i[34567]86)
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
- ln -sf ${XL}/include/asm-i386/mach-xen/asm/gnttab_dma.h include/asm
+case "$uname" in
+i[34567]86|x86_64)
+ if [ -d ${XL}/include/asm-x86 ]; then
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/hypercall*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm
+ ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm
+ else
+ if [ $uname = x86_64 ]; then
+ mkdir -p include/asm-i386
+ lndir -silent ${XL}/include/asm-i386 include/asm-i386
+ else
+ uname=i386
+ fi
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypervisor.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/hypercall.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/synch_bitops.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/maddr.h include/asm
+ ln -sf ${XL}/include/asm-$uname/mach-xen/asm/gnttab_dma.h include/asm
+ fi
;;
"ia64")
ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
++++++ sysconfig.xend ++++++
--- arch/i386/xen/sysconfig.xend 2007-11-21 20:10:33.000000000 +0100
+++ xen/sysconfig.xend 2008-01-31 19:31:37.000000000 +0100
@@ -1,3 +1,21 @@
+#============================================================================
+# /etc/sysconfig/xend
+#
+# Version = 3.0.0
+# Date = 2008-01-30
+#
+# Maintainer(s) = Ron Terry - ron (at) pronetworkconsulting (dot) com
+#
+# The latest version can be found at:
+#
+# http://pronetworkconsulting.com/linux/scripts/network-multinet.html
+#
+# Description:
+#
+# This configuration file is for use with network-multinet version 3
+#
+#============================================================================
+
## Path: System/Virtualization
## Description:
## Type: list()
@@ -8,133 +26,55 @@
# devices,mac addresses and IP addresses to create bridges on using
# the following format:
#
-# <network type>,<number of network type>,<network device>,<mac address>,,<dhcp server status>
+# <network type>,<number of network type>,<network device>,,<dhcp server status>
#
# Where:
# <network type> = bridge|nat|route|hostonly|nohost|empty
# <number of network type> = The network number (0,1,2,etc.) of that type of
# network (i.e. xennat0, xenbr1, xenhost3, etc.)
-# <network device> = The network interface the bridge will be
-# attached to (i.e. eth0, veth2, etc.)
-# If set to 'default' the interface used for the
-# default gateway will be used
-# <mac address> = The MAC address to assign to <network device>
+# <network device> = The network interface the bridge will be attached
+# to (i.e. eth0, etc.)
+# For NAT. Routed, or Hostonly networks this should
+# be "none" because there is no device. For Bridged or
+# Nohost interfaces this should be a physical
+# interfaces (eth, bond, vlan, etc.) If set to
+# 'default' the interface used for the default
+# gateway will be used
# = The IP address and Subnet Mask to assign to
# <network device> format= 1.2.3.4/24
# <dhcp server status> = dhcp-on|dhcp-off (DHCP server on/off on that net)
#
# Network Definition Examples:
-# bridged "bridge,0,default,,,dhcp-off"
-# "bridge,1,eth1,,,dhcp-off"
-# nat "nat,0,veth2,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off"
-# routed "route,0,veth2,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off"
-# hostonly "hostonly,0,veth3,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off"
-# nohost "nohost,0,eth1,,,dhcp-off"
-# empty "empty,0,,,dhcp-off"
+# bridged "bridge,0,default,default,dhcp-off"
+# "bridge,1,eth1,default,dhcp-off"
+# nat "nat,0,none,172.22.0.1/16,dhcp-off"
+# routed "route,0,none,172.23.0.1/16,dhcp-off"
+# hostonly "hostonly,0,none,172.24.0.1/16,dhcp-off"
+# nohost "nohost,0,eth1,,"
+# empty "empty,0,none,none,"
#
-# Example: "bridge,0,eth0,,,dhcp-off nat,0,veth2,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off hostonly,0,veth3,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off empty,0,,,dhcp-off"
+# Example: "bridge,0,eth0,default,dhcp-off nat,0,none,172.22.0.1/16,dhcp-off hostonly,0,none,172.23.0.1/16,dhcp-off empty,0,none,none,"
#
# The above example would create 4 networks the first being a bridged network
# (xenbr0), the second being a NATed network (xennat0), the third being a host
# only network (xenhost0) and the fourth being an empty network (xenempty0)
#
-# Used by network-multinet v2.x only
+# Used by network-multinet v3.x only
#
-NETWORK_LIST="bridge,0,default,,,dhcp-off nat,0,veth2,00:16:3E:01:00:02,172.22.0.1/16,dhcp-off hostonly,0,veth3,00:16:3E:01:00:03,172.23.0.1/16,dhcp-off empty,0,,,dhcp-off"
+NETWORK_LIST="bridge,0,default,default,dhcp-off nat,0,none,172.22.0.1/16,dhcp-off hostonly,0,none,172.23.0.1/16,dhcp-off empty,0,none,,"
## Type: string(eth0,eth1,eth2,eth3)
## Default: "eth0"
## Config:
#
# Network interface to use as the external interface for NATed
-# and Routed networks
+# and Routed networks.
#
# If set to 'default" it will use the same interface used for the
# default route
#
NAT_EXTERNAL_INTERFACE="default"
-## Type: string(xenbr)
-## Default: "xenbr"
-## Config:
-#
-# Name of bridge to create (xenbr0, xenbr1, etc.)
-#
-# Used by network-multinet v1.x only
-#
-BRIDGE_NAME="xenbr"
-
-## Type: list()
-## Default: "eth0"
-## Config:
-#
-# Space delimited list of physical network
-# devices to create traditional bridges on
-#
-# Used by network-multinet v1.x only
-#
-# Example: "eth0 eth1 eth2"
-#
-# The above example would create 3 traditional bridges
-# xenbr0 on eth0, xenbr1 on eth1 and xenbr2 on eth2
-#
-BRIDGE_NETDEV_LIST="eth0"
-
-## Type: list()
-## Default: ""
-## Config:
-#
-# Space delimited list of virtual network devices,mac addresses
-# and IP addresses to create local bridges on using the following format:
-#
-# <virtual network device>,<mac address>,,,
-#
-# Example: "veth2,00:16:3E:01:00:02,172.22.0.1/16,nat,dhcp-on veth3,00:16:3E:01:00:03,172.23.0.1/16,hostonly,dhcp-off"
-#
-# The above example would create 2 local bridged the first being a NATed network
-# and the second being a host only network
-#
-# Used by network-multinet v1.x only
-#
-LOCAL_BRIDGE_LIST="veth2,00:16:3E:01:00:02,172.22.0.1/16,nat,dhcp-off veth3,00:16:3E:01:00:03,172.23.0.1/16,hostonly,dhcp-off"
-
-## Type: list()
-## Default: ""
-## Config:
-#
-# Space delimited list of bridge numbers/NICs to
-# create "no-host" bridges on.
-#
-# No-Host bridges are bridges that are connected to a
-# physical interface but not to an interface in Domain0.
-# VMs connected to them are bridged to the outside world
-# but cannot communicate with Domain0
-#
-# Example: "eth1,4"
-#
-# The above example would create a single NO-Host bridge named xenbr4
-# that would have the eth1 interface connected to it as a bridge port
-#
-# Used by network-multinet v1.x only
-#
-NOHOST_BRIDGE_LIST=""
-
-## Type: string(eth
-## Type: list()
-## Default: ""
-## Config:
-#
-# Space delimited list of bridge numbers to
-# create empty bridges on.
-#
-# Example: "4 5"
-#
-# The above example would create two empty bridges named xenbr4 and xenbr5
-#
-# Used by network-multinet v1.x only
-#
-EMPTY_BRIDGE_LIST="4"
-
## Type: string(128-249)
## Default: "128-249"
## Config:
@@ -145,7 +85,7 @@
#
XEN_DHCP_RANGE="128-249"
-## Type: string(137.65.1.1,137.65.1.2)
+## Type: string(10.0.0.1,10.0.0.2)
## Default: "gateway"
## Config:
#
@@ -153,7 +93,7 @@
# If set to "gateway" then the IP address of the gateway will be
# set as the DNS server.
#
-# Examples: "137.65.1.1,137.65.1.2"
+# Examples: "10.0.0.1,10.0.0.2"
# "gateway"
#
XEN_DHCP_DNS_SERVERS="gateway"
@@ -186,7 +126,7 @@
#
# If set to true the xend-relocation script will attempt to
# enable/disable vm migration on all relocation nodes listed
-# in the RELOCATION_LIST variable.
+# in the RELOCATION_NODELIST variable.
#
# Note: Communication with the nodes is done via ssh so
# pre-distributed ssh keys is recommended.
@@ -200,4 +140,3 @@
# The TCP port used by Xen for VM relocation
#
XEN_RELOCATION_PORT="8002"
-
++++++ vnc-i18n-keys.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -48,7 +48,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -1528,6 +1528,9 @@ class XendDomainInfo:
+@@ -1542,6 +1542,9 @@ class XendDomainInfo:
if devclass in XendDevices.valid_devices():
log.info("createDevice: %s : %s" % (devclass, scrub_password(config)))
dev_uuid = config.get('uuid')
++++++ x86_emulate.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -2,7 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/xen/arch/x86/mm.c
+++ xen-3.2-testing/xen/arch/x86/mm.c
-@@ -3556,6 +3556,7 @@ static int ptwr_emulated_cmpxchg(
+@@ -3586,6 +3586,7 @@ static int ptwr_emulated_cmpxchg(
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
}
@@ -10,7 +10,7 @@
static int ptwr_emulated_cmpxchg8b(
enum x86_segment seg,
unsigned long offset,
-@@ -3571,13 +3572,16 @@ static int ptwr_emulated_cmpxchg8b(
+@@ -3601,13 +3602,16 @@ static int ptwr_emulated_cmpxchg8b(
offset, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1,
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
}
@@ -133,20 +133,18 @@
===================================================================
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
-@@ -30,10 +30,11 @@
+@@ -30,7 +30,10 @@
#include
#include
#include
+#include
#undef cmpxchg
- #undef cpuid
++#undef cpuid
+#undef wbinvd
#endif
--#undef wbinvd /* Macro'ed in include/asm-x86/system.h */
#include
- /* Operand sizes: 8-bit operands or specified/overridden size. */
-@@ -2978,58 +2979,63 @@ x86_emulate(
+@@ -2978,60 +2981,64 @@ x86_emulate(
src.val = x86_seg_gs;
goto pop_seg;
@@ -156,6 +154,7 @@
- unsigned long old_lo, old_hi;
+ case 0xc7: /* Grp9 (cmpxchg{8,16}b) */
generate_exception_if((modrm_reg & 7) != 1, EXC_UD);
+ generate_exception_if(ea.type != OP_MEM, EXC_UD);
- if ( (rc = ops->read(ea.mem.seg, ea.mem.off+0, &old_lo, 4, ctxt)) ||
- (rc = ops->read(ea.mem.seg, ea.mem.off+4, &old_hi, 4, ctxt)) )
- goto done;
@@ -188,6 +187,7 @@
- {
- unsigned long old, new;
- generate_exception_if((modrm_reg & 7) != 1, EXC_UD);
+- generate_exception_if(ea.type != OP_MEM, EXC_UD);
- if ( (rc = ops->read(ea.mem.seg, ea.mem.off, &old, 8, ctxt)) != 0 )
- goto done;
- if ( ((uint32_t)(old>>0) != (uint32_t)_regs.eax) ||
@@ -226,8 +226,7 @@
+ &old_lo, sizeof(old_lo), ctxt)) ||
+ (rc = ops->read(ea.mem.seg, ea.mem.off+sizeof(old_lo),
+ &old_hi, sizeof(old_lo), ctxt)) )
- goto done;
-- _regs.eflags |= EFLG_ZF;
++ goto done;
+ if ( (old_lo != _regs.eax) || (old_hi != _regs.edx) )
+ {
+ _regs.eax = old_lo;
@@ -237,7 +236,8 @@
+ else if ( ops->cmpxchg2 == NULL )
+ {
+ rc = X86EMUL_UNHANDLEABLE;
-+ goto done;
+ goto done;
+- _regs.eflags |= EFLG_ZF;
+ }
+ else
+ {
@@ -253,7 +253,7 @@
case 0xc8 ... 0xcf: /* bswap */
dst.type = OP_REG;
-@@ -3039,7 +3045,7 @@ x86_emulate(
+@@ -3041,7 +3048,7 @@ x86_emulate(
{
default: /* case 2: */
/* Undefined behaviour. Writes zero on all tested CPUs. */
++++++ xen-3.2-testing-src.tar.bz2 ++++++
arch/i386/xen/xen-3.2-testing-src.tar.bz2 xen/xen-3.2-testing-src.tar.bz2 differ: byte 11, line 1
++++++ xenapi-console-protocol.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -2,7 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -2690,6 +2690,14 @@ class XendDomainInfo:
+@@ -2707,6 +2707,14 @@ class XendDomainInfo:
if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000"
++++++ xen-blktab-subtype-strip.patch ++++++
Index: xen-3.2-testing/tools/ioemu/xenstore.c
===================================================================
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c 2008-01-31 07:52:20.000000000 -0700
+++ xen-3.2-testing/tools/ioemu/xenstore.c 2008-01-31 07:56:00.000000000 -0700
@@ -478,7 +478,7 @@
void xenstore_process_event(void *opaque)
{
- char **vec, *image = NULL;
+ char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
unsigned int len, num, hd_index;
vec = xs_read_watch(xsh, &num);
@@ -505,8 +505,23 @@
goto out;
hd_index = vec[XS_WATCH_TOKEN][2] - 'a';
image = xs_read(xsh, XBT_NULL, vec[XS_WATCH_PATH], &len);
- if (image == NULL || !strcmp(image, bs_table[hd_index]->filename))
- goto out; /* gone or identical */
+ if (image == NULL)
+ goto out; /* gone */
+
+ /* Strip off blktap sub-type prefix */
+ bpath = strdup(vec[XS_WATCH_PATH]);
+ if (bpath == NULL)
+ goto out;
+ if ((offset = strrchr(bpath, '/')) != NULL)
+ *offset = '\0';
+ if (pasprintf(&buf, "%s/type", bpath) == -1)
+ goto out;
+ drv = xs_read(xsh, XBT_NULL, buf, &len);
+ if (drv && !strcmp(drv, "tap") && ((offset = strchr(image, ':')) != NULL))
+ memmove(image, offset+1, strlen(offset+1)+1);
+
+ if (!strcmp(image, bs_table[hd_index]->filename))
+ goto out; /* identical */
do_eject(0, vec[XS_WATCH_TOKEN]);
bs_table[hd_index]->filename[0] = 0;
@@ -521,6 +536,9 @@
}
out:
+ free(drv);
+ free(buf);
+ free(bpath);
free(image);
free(vec);
}
++++++ xend-config.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -31,7 +31,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/examples/xend-config.sxp
+++ xen-3.2-testing/tools/examples/xend-config.sxp
-@@ -51,16 +51,19 @@
+@@ -49,16 +49,19 @@
#
# (9367 pam '' /etc/xen/xen-api.key /etc/xen/xen-api.crt)
#
@@ -55,7 +55,7 @@
#(xend-unix-path /var/lib/xend/xend-socket)
-@@ -138,7 +141,52 @@
+@@ -136,7 +139,54 @@
# two fake interfaces per guest domain. To do things like this, write
# yourself a wrapper script, and call network-bridge from it, as appropriate.
#
@@ -67,40 +67,42 @@
+# multiple networks, supporting the following types:
+#
+#
-+# bridged: -Networks that contain both a physical network device (ethX)
-+# and a virtual network device (vethX) from Dom0.
-+# -This is the traditional type of network created in xen by
++# This script can create 6 types of networks:
++#
++# bridged: -Networks that are connected to a physical network device
++# in Dom0 and on which Dom0 can communitcate
++# -This is the traditional type of network created in xen by
+# the basic network-bridge script.
+# -VMs on these network(s) appear to be on the real network(s)
+#
-+# nohost: -Networks that contain a physical network device but not a
-+# virtual network device from Dom0.
-+# -These can be used to allow virtual machines to communicate
-+# with the outside world but not with Dom0.
++# nohost: -Networks that are connected to Dom0 but on which Dom0 cannot
++# communitcate
++# -These can be used to allow virtual machines to communicate
++# with the outside world but not with Dom0.
+# (Usefull if you want to isolate traffic away from Dom0)
+#
-+# hostonly: -Networks that contain only a virtual network device (vethX)
-+# from Dom0.
-+# -This type of network will allow VMs connected to it to
++# hostonly: -Networks that are connected to Dom0 but are private from
++# the physical network
++# -This type of network will allow VMs connected to it to
+# access only Dom0 and other VMs connected to the network.
-+# -This type of network is similiar to a VMware "HOST ONLY"
++# -This type of network is similiar to a VMware "HOST ONLY"
+# network.
+#
-+# nat: -Networks that contain only a virtual network device (vethX)
-+# from Dom0.
-+# -This type of network will allow VMs connected to it to access
-+# Dom0,the "outside world" via NAT and other VMs connected to it.
++# nat: -Networks that are connected to Dom0 and are private from the
++# physical network but VMs can get out to the physical network
++# -This type of network will allow VMs connected to it to access
++# Dom0, the "outside world" via NAT and other VMs connected to it.
+# -This type of network is similiar to a VMware "NAT" network.
+#
-+# routed: -Networks that contain only a virtual network device (vethX)
-+# from Dom0.
-+# -This type of network will allow VMs connected to it to access
-+# Dom0,the "outside world" via routing through Dom0 and other VMs
++# routed: -Networks that are not directly connected to the physical network
++# but who's traffic is directly routed to other networks
++# -This type of network will allow VMs connected to it to access
++# Dom0, the "outside world" via routing through Dom0 and other VMs
+# connected to it.
+#
-+# empty: -Networks that do not contain any physical or virtual network
-+# devices from Dom0.
-+# -These can be used to allow VMs in DomUs to communicate only
++# empty: -Networks that are not connected to either Dom0 or the physical
++# network
++# -These can be used to allow VMs in DomUs to communicate only
+# with other DomUs and not Dom0.
+#
+# See /etc/xen/scripts/network-multinet for more details.
++++++ xend-core-dump-loc.diff ++++++
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1490,7 +1490,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)
if os.path.isdir(corefile):
++++++ xen-domUloader.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -147,7 +147,7 @@
from xen.xend.XendError import XendError, VmError
from xen.xend.XendDevices import XendDevices
from xen.xend.XendTask import XendTask
-@@ -1484,6 +1484,10 @@ class XendDomainInfo:
+@@ -1498,6 +1498,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid'])
@@ -158,7 +158,7 @@
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath)
-@@ -2012,8 +2016,11 @@ class XendDomainInfo:
+@@ -2026,8 +2030,11 @@ class XendDomainInfo:
blexec = osdep.pygrub_path
blcfg = None
@@ -172,7 +172,7 @@
if not disks:
msg = "Had a bootloader specified, but no disks are bootable"
-@@ -2024,13 +2031,10 @@ class XendDomainInfo:
+@@ -2038,13 +2045,10 @@ class XendDomainInfo:
devtype = devinfo[0]
disk = devinfo[1]['uname']
@@ -189,7 +189,7 @@
log.info("Mounting %s on %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE))
-@@ -2042,7 +2046,9 @@ class XendDomainInfo:
+@@ -2056,7 +2060,9 @@ class XendDomainInfo:
from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain()
++++++ xen-fbback-resize.patch ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -1,38 +1,217 @@
diff -r 15cfd1f8fa38 tools/ioemu/hw/xenfb.c
--- a/tools/ioemu/hw/xenfb.c Tue Jan 08 16:45:08 2008 +0000
-+++ b/tools/ioemu/hw/xenfb.c Thu Jan 10 12:20:59 2008 -0700
-@@ -78,6 +78,7 @@ static void xenfb_invalidate(void *opaqu
++++ b/tools/ioemu/hw/xenfb.c Thu Jan 17 12:16:49 2008 -0700
+@@ -8,6 +8,7 @@
+ #include
+ #include
+ #include
++#include
+ #include
+ #include
+ #include
+@@ -45,6 +46,7 @@ struct xenfb {
+ struct xs_handle *xsh; /* xs daemon handle */
+ struct xenfb_device fb, kbd;
+ void *pixels; /* guest framebuffer data */
++ void *old_pixels; /* guest FB data before remapping to extended */
+ size_t fb_len; /* size of framebuffer */
+ int row_stride; /* width of one row in framebuffer */
+ int depth; /* colour depth of guest framebuffer */
+@@ -52,7 +54,9 @@ struct xenfb {
+ int height; /* pixel height of guest framebuffer */
+ int abs_pointer_wanted; /* Whether guest supports absolute pointer */
+ int button_state; /* Last seen pointer button state */
+- char protocol[64]; /* frontend protocol */
++ char protocol[64]; /* frontend protocol */
++ int otherend_bsize; /* frontend bit size */
++ int gnttabdev;
+ };
+
+ /* Functions for frontend/backend state machine*/
+@@ -78,6 +82,9 @@ static void xenfb_invalidate(void *opaqu
static void xenfb_invalidate(void *opaque);
static void xenfb_screen_dump(void *opaque, const char *name);
static int xenfb_register_console(struct xenfb *xenfb);
+static int xenfb_send_resize(struct xenfb *xenfb, int width, int height);
++static void xenfb_map_extended_fb(struct xenfb *xenfb, int, int, int);
++static int xenfb_send_map_extended_done(struct xenfb *xenfb);
/*
* Tables to map from scancode to Linux input layer keycode.
-@@ -264,6 +265,9 @@ struct xenfb *xenfb_new(int domid, Displ
+@@ -261,9 +268,19 @@ struct xenfb *xenfb_new(int domid, Displ
+ if (!xenfb->xsh)
+ goto fail;
+
++ xenfb->gnttabdev = xc_gnttab_open();
++ if (xenfb->gnttabdev == -1) {
++ fprintf(stderr, "FB: Can't open gnttab device\n");
++ }
++
xenfb->ds = ds;
xenfb_device_set_domain(&xenfb->fb, domid);
xenfb_device_set_domain(&xenfb->kbd, domid);
+
-+ /* Indicate we have the frame buffer resize feature */
-+ xenfb_xs_printf(xenfb->xsh, xenfb->fb.nodename, "feature-resize", "1");
++ /* Indicate we have the frame buffer resize feature, requires grant tables */
++ if (xenfb->gnttabdev > 0) {
++ xenfb_xs_printf(xenfb->xsh, xenfb->fb.nodename, "feature-resize", "1");
++ }
fprintf(stderr, "FB: Waiting for KBD backend creation\n");
xenfb_wait_for_backend(&xenfb->kbd, xenfb_backend_created_kbd);
-@@ -510,6 +514,12 @@ static void xenfb_on_fb_event(struct xen
+@@ -320,6 +337,58 @@ static void xenfb_copy_mfns(int mode, in
+
+ for (i = 0; i < count; i++)
+ dst[i] = (mode == 32) ? src32[i] : src64[i];
++}
++
++static void xenfb_map_extended_fb(struct xenfb *xenfb, int extended_mem_length,
++ int gref_cnt, int gref)
++{
++ int n_fbmfns;
++ unsigned long *fbmfns = NULL;
++ void *page;
++ int i;
++ int ep_gref;
++ int amt;
++ int index;
++ void *pixels;
++ int *grefs;
++
++ grefs = xc_gnttab_map_grant_ref (xenfb->gnttabdev,
++ xenfb->fb.otherend_id,
++ gref, 0);
++ if (NULL == grefs) {
++ fprintf(stderr,"FB: Can't map to grant refs\n");
++ return;
++ }
++ n_fbmfns = (extended_mem_length + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
++ fbmfns = malloc(sizeof(unsigned long) * n_fbmfns);
++ if (fbmfns) {
++ ep_gref = PAGE_SIZE/(xenfb->otherend_bsize/8);
++ amt = index = 0;
++ for(i = 0; i < gref_cnt; i++) {
++ page = xc_gnttab_map_grant_ref (xenfb->gnttabdev,
++ xenfb->fb.otherend_id,
++ grefs[i], 0);
++ if (page) {
++ index = i * ep_gref;
++ amt = ep_gref;
++ if (n_fbmfns - index < ep_gref)
++ amt = n_fbmfns - index;
++ xenfb_copy_mfns(xenfb->otherend_bsize, amt, &fbmfns[index], page);
++ xc_gnttab_munmap(xenfb->gnttabdev, page, 1);
++ }
++ else
++ goto gref_error;
++ }
++ pixels = xc_map_foreign_pages(xenfb->xc, xenfb->fb.otherend_id,
++ PROT_READ | PROT_WRITE, fbmfns, n_fbmfns);
++ if (pixels) {
++ xenfb->old_pixels = xenfb->pixels;
++ xenfb->pixels = pixels;
++ }
++ free(fbmfns);
++ }
++gref_error:
++ xc_gnttab_munmap(xenfb->gnttabdev, grefs, 1);
+ }
+
+ static int xenfb_map_fb(struct xenfb *xenfb, int domid)
+@@ -377,6 +446,7 @@ static int xenfb_map_fb(struct xenfb *xe
+ #endif
+ }
+
++ xenfb->otherend_bsize = mode;
+ n_fbmfns = (xenfb->fb_len + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
+ n_fbdirs = n_fbmfns * mode / 8;
+ n_fbdirs = (n_fbdirs + (XC_PAGE_SIZE - 1)) / XC_PAGE_SIZE;
+@@ -456,6 +526,10 @@ static void xenfb_detach_dom(struct xenf
+ munmap(xenfb->pixels, xenfb->fb_len);
+ xenfb->pixels = NULL;
+ }
++ if (xenfb->old_pixels) {
++ munmap(xenfb->old_pixels, xenfb->fb_len);
++ xenfb->old_pixels = NULL;
++ }
+ }
+
+ /* Remove the backend area in xenbus since the framebuffer really is
+@@ -473,6 +547,9 @@ void xenfb_shutdown(struct xenfb *xenfb)
+ xc_evtchn_close(xenfb->evt_xch);
+ if (xenfb->xsh)
+ xs_daemon_close(xenfb->xsh);
++ if (xenfb->gnttabdev > 0)
++ xc_gnttab_close(xenfb->gnttabdev);
++
+ free(xenfb);
+ }
+
+@@ -510,6 +587,22 @@ static void xenfb_on_fb_event(struct xen
}
xenfb_guest_copy(xenfb, x, y, w, h);
break;
+ case XENFB_TYPE_RESIZE:
+ xenfb->width = event->resize.width;
+ xenfb->height = event->resize.height;
++ xenfb->row_stride = event->resize.stride;
+ dpy_resize(xenfb->ds, xenfb->width, xenfb->height);
+ xenfb_send_resize(xenfb, xenfb->width, xenfb->height);
+ break;
++ case XENFB_TYPE_MAP_EXTENDED:
++ if (xenfb->gnttabdev > 0) {
++ xenfb_map_extended_fb(xenfb,
++ event->map_extended.extended_mem_length,
++ event->map_extended.gref_cnt,
++ event->map_extended.gref);
++ }
++ xenfb_send_map_extended_done(xenfb);
++ break;
}
}
mb(); /* ensure we're done with ring contents */
-@@ -601,6 +611,19 @@ static int xenfb_send_motion(struct xenf
+@@ -555,6 +648,41 @@ static int xenfb_on_state_change(struct
+ return 0;
+ }
+
++/* Send an event to the framebuffer frontend driver */
++static int xenfb_fb_event(struct xenfb *xenfb,
++ union xenfb_in_event *event)
++{
++ uint32_t prod;
++ struct xenfb_page *page = xenfb->fb.page;
++
++ if (xenfb->fb.state != XenbusStateConnected)
++ return 0;
++
++ prod = page->in_prod;
++ if (prod - page->in_cons == XENFB_IN_RING_LEN) {
++ errno = EAGAIN;
++ return -1;
++ }
++
++ mb(); /* ensure ring space available */
++ XENFB_IN_RING_REF(page, prod) = *event;
++ wmb(); /* ensure ring contents visible */
++ page->in_prod = prod + 1;
++ return xc_evtchn_notify(xenfb->evt_xch, xenfb->fb.port);
++}
++
++/* Send a extended memory map done event to kbd driver */
++static int xenfb_send_map_extended_done(struct xenfb *xenfb)
++{
++ union xenfb_in_event event;
++
++ memset(&event, 0, XENFB_IN_EVENT_SIZE);
++ event.type = XENFB_TYPE_MAP_EXTENDED_DONE;
++
++ return xenfb_fb_event(xenfb, &event);
++}
++
++
+ /* Send an event to the keyboard frontend driver */
+ static int xenfb_kbd_event(struct xenfb *xenfb,
+ union xenkbd_in_event *event)
+@@ -601,6 +729,19 @@ static int xenfb_send_motion(struct xenf
event.motion.rel_x = rel_x;
event.motion.rel_y = rel_y;
event.motion.rel_z = rel_z;
@@ -46,16 +225,28 @@
+ union xenkbd_in_event event;
+
+ memset(&event, 0, XENKBD_IN_EVENT_SIZE);
-+ event.type = XENKBD_TYPE_RESIZE;
-+ event.resize.width = width;
-+ event.resize.height = height;
++ event.type = XENKBD_TYPE_FBRESIZE;
++ event.fbresize.width = width;
++ event.fbresize.height = height;
return xenfb_kbd_event(xenfb, &event);
}
diff -r 15cfd1f8fa38 xen/include/public/io/fbif.h
--- a/xen/include/public/io/fbif.h Tue Jan 08 16:45:08 2008 +0000
-+++ b/xen/include/public/io/fbif.h Thu Jan 10 11:00:13 2008 -0700
-@@ -50,12 +50,26 @@ struct xenfb_update
++++ b/xen/include/public/io/fbif.h Thu Jan 17 08:16:28 2008 -0700
+@@ -29,8 +29,9 @@
+ /* Out events (frontend -> backend) */
+
+ /*
+- * Out events may be sent only when requested by backend, and receipt
+- * of an unknown out event is an error.
++ * Out event update is sent only when requested by backend
++ * Events resize and map_extended are frontend generated
++ * It is an error to send any unknown event types
+ */
+
+ /* Event type 1 currently not used */
+@@ -50,12 +51,44 @@ struct xenfb_update
int32_t height; /* rect height */
};
@@ -68,8 +259,25 @@
+struct xenfb_resize
+{
+ uint8_t type; /* XENFB_TYPE_RESIZE */
-+ int32_t width; /* frame buffer width in pixels */
-+ int32_t height; /* frame buffer height in pixels */
++ int32_t width; /* width in pixels */
++ int32_t height; /* height in pixels */
++ int32_t stride; /* stride in pixels */
++ int32_t depth; /* future */
++};
++
++/*
++ * Framebuffer map extended memory event
++ * Causes backend to map extended frame buffer memory
++ * for larger screen resolution support
++ */
++#define XENFB_TYPE_MAP_EXTENDED 4
++
++struct xenfb_map_extended
++{
++ uint8_t type; /* XENFB_TYPE_MAP_EXTENDED */
++ int32_t extended_mem_length; /* extended frame buffer len (in bytes) */
++ int32_t gref_cnt; /* number of mapping refernces used */
++ int32_t gref; /* reference to mapping references */
+};
+
#define XENFB_OUT_EVENT_SIZE 40
@@ -79,22 +287,39 @@
uint8_t type;
struct xenfb_update update;
+ struct xenfb_resize resize;
++ struct xenfb_map_extended map_extended;
char pad[XENFB_OUT_EVENT_SIZE];
};
-@@ -109,15 +123,18 @@ struct xenfb_page
- * Each directory page holds PAGE_SIZE / sizeof(*pd)
- * framebuffer pages, and can thus map up to PAGE_SIZE *
- * PAGE_SIZE / sizeof(*pd) bytes. With PAGE_SIZE == 4096 and
-- * sizeof(unsigned long) == 4, that's 4 Megs. Two directory
-- * pages should be enough for a while.
-+ * sizeof(unsigned long) == 4 on a 32 bit system that's 4 Megs
-+ * sizeof(unsigned long) == 8 on a 64 bit system that's 2 Megs
-+ * Will need 3 directory page entries to support a 5MB frame
-+ * buffer which is enough for a 1280x1024 display
- */
-- unsigned long pd[2];
-+ unsigned long pd[3];
+@@ -63,14 +96,26 @@ union xenfb_out_event
+
+ /*
+ * Frontends should ignore unknown in events.
+- * No in events currently defined.
+ */
++
++/*
++ * Framebuffer map extended memory done event
++ * Causes fronted to end foreign access to extended memory
++ * grant table references
++ */
++#define XENFB_TYPE_MAP_EXTENDED_DONE 1
++
++struct xenfb_map_extended_done
++{
++ uint8_t type; /* XENFB_TYPE_MAP_EXTENDED_DONE */
++};
+
+ #define XENFB_IN_EVENT_SIZE 40
+
+ union xenfb_in_event
+ {
+ uint8_t type;
++ struct xenfb_map_extended_done map_extended_done;
+ char pad[XENFB_IN_EVENT_SIZE];
+ };
+
+@@ -116,8 +161,9 @@ struct xenfb_page
};
/*
@@ -108,37 +333,38 @@
#define XENFB_WIDTH 800
diff -r 15cfd1f8fa38 xen/include/public/io/kbdif.h
--- a/xen/include/public/io/kbdif.h Tue Jan 08 16:45:08 2008 +0000
-+++ b/xen/include/public/io/kbdif.h Thu Jan 10 12:28:09 2008 -0700
-@@ -44,6 +44,11 @@
++++ b/xen/include/public/io/kbdif.h Thu Jan 17 10:43:35 2008 -0700
+@@ -44,6 +44,12 @@
* request-abs-update in xenstore.
*/
#define XENKBD_TYPE_POS 4
+/*
-+ * Sent when frame buffer is resized. kbd adjusts absolute
-+ * max X and Y axis values in input ptr device.
++ * Frame buffer resize event. Adjusts absolute max X and Y axis
++ * values in input ptr device. Necessary for proper scaling
++ * when the screen resolution changes
+ */
-+#define XENKBD_TYPE_RESIZE 5
++#define XENKBD_TYPE_FBRESIZE 5
struct xenkbd_motion
{
-@@ -68,6 +73,12 @@ struct xenkbd_position
+@@ -68,6 +74,12 @@ struct xenkbd_position
int32_t abs_z; /* absolute Z position (wheel) */
};
-+struct xenkbd_resize
++struct xenkbd_fbresize
+{
-+ uint8_t type; /* XENKBD_TYPE_RESIZE */
++ uint8_t type; /* XENKBD_TYPE_FBRESIZE */
+ int32_t width; /* frame buffer width in pixels */
+ int32_t height; /* frame buffer height in pixels */
+};
#define XENKBD_IN_EVENT_SIZE 40
union xenkbd_in_event
-@@ -76,6 +87,7 @@ union xenkbd_in_event
+@@ -76,6 +88,7 @@ union xenkbd_in_event
struct xenkbd_motion motion;
struct xenkbd_key key;
struct xenkbd_position pos;
-+ struct xenkbd_resize resize;
++ struct xenkbd_fbresize fbresize;
char pad[XENKBD_IN_EVENT_SIZE];
};
++++++ xen-hvm-default-bridge.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -2,7 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/examples/xend-config.sxp
+++ xen-3.2-testing/tools/examples/xend-config.sxp
-@@ -132,7 +132,8 @@
+@@ -130,7 +130,8 @@
#
# (network-script 'network-bridge netdev=eth1')
#
++++++ xen-max-free-mem.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -2,7 +2,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendNode.py
+++ xen-3.2-testing/tools/python/xen/xend/XendNode.py
-@@ -585,10 +585,34 @@ class XendNode:
+@@ -579,10 +579,34 @@ class XendNode:
info['cpu_mhz'] = info['cpu_khz'] / 1000
@@ -41,7 +41,7 @@
ITEM_ORDER = ['nr_cpus',
'nr_nodes',
-@@ -598,6 +622,9 @@ class XendNode:
+@@ -592,6 +616,9 @@ class XendNode:
'hw_caps',
'total_memory',
'free_memory',
@@ -92,7 +92,7 @@
===================================================================
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
-@@ -680,6 +680,27 @@ class XendDomainInfo:
+@@ -685,6 +685,27 @@ class XendDomainInfo:
return dev_info
++++++ xen-warnings.diff ++++++
--- /var/tmp/diff_new_pack.J22497/_old 2008-02-02 01:56:48.000000000 +0100
+++ /var/tmp/diff_new_pack.J22497/_new 2008-02-02 01:56:48.000000000 +0100
@@ -185,20 +185,6 @@
fputs(" (", stdout);
for (i = 0; i < nperms; i++) {
if (i)
-Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
-===================================================================
---- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
-+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
-@@ -31,7 +31,9 @@
- #include
- #include
- #undef cmpxchg
-+#undef cpuid
- #endif
-+#undef wbinvd /* Macro'ed in include/asm-x86/system.h */
- #include
-
- /* Operand sizes: 8-bit operands or specified/overridden size. */
Index: xen-3.2-testing/tools/libxen/src/xen_common.c
===================================================================
--- xen-3.2-testing.orig/tools/libxen/src/xen_common.c
++++++ xmclone.sh ++++++
++++ 1118 lines (skipped)
++++ between xmclone.sh
++++ and xen/xmclone.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org