SHA256
1
0
forked from pool/xen

- The xen kmp packages fail on the 09-check-packaged-twice script.

Rename xen_pvdrivers.conf to xen_pvdrivers-<kernel flavor>.conf 

- bnc#739585 - L3: Xen block-attach fails after repeated attach/detach
  blktap-close-fifos.patch

- bnc#741159 - Fix default setting of XENSTORED_ROOTDIR in
  xencommons init script
  xencommons-xenstored-root.patch

- bnc#740625 - xen: cannot interact with xend after upgrade (SLES)
- bnc#738694 - xen: cannot interact with xend after upgrade (os12.1)
- Other README changes included.
  README.SuSE

- bnc#694863 - kexec fails in xen 
  24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch

- fate#310510 - fix xenpaging
  xenpaging.speedup-page-out.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=165
This commit is contained in:
Charles Arnold 2012-01-23 21:46:39 +00:00 committed by Git OBS Bridge
parent c9e3853c04
commit a0e0589e8d
24 changed files with 268 additions and 53 deletions

View File

@ -0,0 +1,45 @@
changeset: 24478:ef99b8571a6f
user: Olaf Hering <olaf@aepfle.de>
date: Thu Jan 05 19:40:40 2012 +0100
files: tools/libxl/libxl_create.c tools/python/xen/xend/XendDomainInfo.py
description:
libxl: add feature flag to xenstore for XS_RESET_WATCHES
Tell guest about availibilty of xenstoreds XS_RESET_WATCHES function.
Guests can not issue this command unconditionally because some buggy
toolstacks (such as EC2) do not ignore unknown commands properly.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
tools/libxl/libxl_create.c | 1 +
tools/python/xen/xend/XendDomainInfo.py | 1 +
2 files changed, 2 insertions(+)
Index: xen-4.1.2-testing/tools/libxl/libxl_create.c
===================================================================
--- xen-4.1.2-testing.orig/tools/libxl/libxl_create.c
+++ xen-4.1.2-testing/tools/libxl/libxl_create.c
@@ -382,6 +382,7 @@ retry_transaction:
libxl__xs_writev(&gc, t, libxl__sprintf(&gc, "%s/platform", dom_path), info->platformdata);
xs_write(ctx->xsh, t, libxl__sprintf(&gc, "%s/control/platform-feature-multiprocessor-suspend", dom_path), "1", 1);
+ xs_write(ctx->xsh, t, libxl__sprintf(&gc, "%s/control/platform-feature-xs_reset_watches", dom_path), "1", 1);
if (!xs_transaction_end(ctx->xsh, t, 0)) {
if (errno == EAGAIN) {
t = 0;
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1770,6 +1770,7 @@ class XendDomainInfo:
f('store/port', self.store_port)
f('store/ring-ref', self.store_mfn)
+ f('control/platform-feature-xs_reset_watches', True)
if arch.type == "x86":
f('control/platform-feature-multiprocessor-suspend', True)

View File

@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2931,7 +2931,7 @@ class XendDomainInfo: @@ -2932,7 +2932,7 @@ class XendDomainInfo:
self.guest_bitsize = self.image.getBitSize() self.guest_bitsize = self.image.getBitSize()
# Make sure there's enough RAM available for the domain # Make sure there's enough RAM available for the domain

View File

@ -26,13 +26,13 @@ from YaST) check-mark the "Xen Virtual Machine Host Server" pattern. If,
instead, you wish to install Xen manually later, click on the "Install instead, you wish to install Xen manually later, click on the "Install
Hypervisor and Tools" icon in YaST. Hypervisor and Tools" icon in YaST.
If you want to install and manage VMs graphically, be sure the following If you want to install and manage VMs graphically, be sure to install a
optional packages are also installed: graphical desktop environment like KDE or GNOME. The following optional
packages are needed to manage VMs graphically. Note that "Install Hypervisor
and Tools" installs all the packages below:
vm-install (Optional, to install VMs) vm-install (Optional, to install VMs)
python-gtk (Optional, to install VMs graphically)
virt-manager (Optional, to manage VMs graphically) virt-manager (Optional, to manage VMs graphically)
virt-viewer (Optional, to view VMs outside virt-manager) virt-viewer (Optional, to view VMs outside virt-manager)
tightvnc (Optional, to view VMs outside virt-manager)
Additional packages: Additional packages:
nbd-client (Optional, to access virtual disks stored on NBD servers) nbd-client (Optional, to access virtual disks stored on NBD servers)
@ -499,6 +499,14 @@ versions will be shipped with SUSE and via YaST Online Update. More frequent
http://forge.novell.com/modules/xfmod/project/?xenpreview http://forge.novell.com/modules/xfmod/project/?xenpreview
Upgrading the Host Operating System
-----------------------------------
When upgrading the host operating system from one major release to another
(for example, SLES 10 to SLES 11 or openSUSE 11.4 to openSUSE 12.1) or when
applying a service pack like SLES 11 SP2 to SLES 11 SP1 all running VMs must
be shut down before the upgrade process is begun.
Known Issues Known Issues
------------ ------------
For a list of known issues and work-arounds, see For a list of known issues and work-arounds, see

13
blktap-close-fifos.patch Normal file
View File

@ -0,0 +1,13 @@
Index: xen-4.1.2-testing/tools/blktap/drivers/blktapctrl.c
===================================================================
--- xen-4.1.2-testing.orig/tools/blktap/drivers/blktapctrl.c
+++ xen-4.1.2-testing/tools/blktap/drivers/blktapctrl.c
@@ -280,7 +280,7 @@ static int del_disktype(blkif_t *blkif)
* qemu-dm instance. We may close the file handle only if there is
* no other disk left for this domain.
*/
- if (dtypes[type]->use_ioemu)
+ if (dtypes[type]->use_ioemu && dtypes[type]->idnum != DISK_TYPE_AIO)
return !qemu_instance_has_disks(blkif->tappid);
/* Caller should close() if no single controller, or list is empty. */

View File

@ -5,7 +5,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3295,7 +3295,7 @@ class XendDomainInfo: @@ -3296,7 +3296,7 @@ class XendDomainInfo:
(fn, BOOTLOADER_LOOPBACK_DEVICE)) (fn, BOOTLOADER_LOOPBACK_DEVICE))
vbd = { vbd = {

View File

@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3131,6 +3131,11 @@ class XendDomainInfo: @@ -3132,6 +3132,11 @@ class XendDomainInfo:
self._cleanup_phantom_devs(paths) self._cleanup_phantom_devs(paths)
self._cleanupVm() self._cleanupVm()

View File

@ -1,3 +1,3 @@
%defattr (-,root,root) %defattr (-,root,root)
/lib/modules/%2-%1 /lib/modules/%2-%1
/etc/modprobe.d/xen_pvdrivers.conf /etc/modprobe.d/xen_pvdrivers-%1.conf

View File

@ -18,7 +18,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
xc = xen.lowlevel.xc.xc() xc = xen.lowlevel.xc.xc()
xoptions = XendOptions.instance() xoptions = XendOptions.instance()
@@ -3300,33 +3300,38 @@ class XendDomainInfo: @@ -3301,33 +3301,38 @@ class XendDomainInfo:
# This is a file, not a device. pygrub can cope with a # This is a file, not a device. pygrub can cope with a
# file if it's raw, but if it's QCOW or other such formats # file if it's raw, but if it's QCOW or other such formats
# used through blktap, then we need to mount it first. # used through blktap, then we need to mount it first.

View File

@ -699,7 +699,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self._endRestore() self._endRestore()
except: except:
log.exception('VM resume failed') log.exception('VM resume failed')
@@ -2370,7 +2368,7 @@ class XendDomainInfo: @@ -2371,7 +2369,7 @@ class XendDomainInfo:
return self.getDeviceController(deviceClass).reconfigureDevice( return self.getDeviceController(deviceClass).reconfigureDevice(
devid, devconfig) devid, devconfig)
@ -708,7 +708,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
"""Create the devices for a vm. """Create the devices for a vm.
@raise: VmError for invalid devices @raise: VmError for invalid devices
@@ -2419,7 +2417,7 @@ class XendDomainInfo: @@ -2420,7 +2418,7 @@ class XendDomainInfo:
if self.image: if self.image:
@ -717,7 +717,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
#if have pass-through devs, need the virtual pci slots info from qemu #if have pass-through devs, need the virtual pci slots info from qemu
self.pci_device_configure_boot() self.pci_device_configure_boot()
@@ -3045,7 +3043,7 @@ class XendDomainInfo: @@ -3046,7 +3044,7 @@ class XendDomainInfo:
self._introduceDomain() self._introduceDomain()
self.image = image.create(self, self.info) self.image = image.create(self, self.info)
if self.image: if self.image:

View File

@ -22,4 +22,4 @@ Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons
+ +
if ! `xenstore-read -s / >/dev/null 2>&1` if ! `xenstore-read -s / >/dev/null 2>&1`
then then
test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored" test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="/var/lib/xenstored"

View File

@ -79,7 +79,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2332,6 +2332,10 @@ class XendDomainInfo: @@ -2333,6 +2333,10 @@ class XendDomainInfo:
deviceClass, config = self.info['devices'].get(dev_uuid) deviceClass, config = self.info['devices'].get(dev_uuid)
self._waitForDevice(deviceClass, config['devid']) self._waitForDevice(deviceClass, config['devid'])
@ -90,7 +90,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
def _waitForDevice_destroy(self, deviceClass, devid, backpath): def _waitForDevice_destroy(self, deviceClass, devid, backpath):
return self.getDeviceController(deviceClass).waitForDevice_destroy( return self.getDeviceController(deviceClass).waitForDevice_destroy(
devid, backpath) devid, backpath)
@@ -3277,7 +3281,8 @@ class XendDomainInfo: @@ -3278,7 +3282,8 @@ class XendDomainInfo:
from xen.xend import XendDomain from xen.xend import XendDomain
dom0 = XendDomain.instance().privilegedDomain() dom0 = XendDomain.instance().privilegedDomain()
mounted_vbd_uuid = dom0.create_vbd(vbd, disk); mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
@ -100,7 +100,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
fn = BOOTLOADER_LOOPBACK_DEVICE fn = BOOTLOADER_LOOPBACK_DEVICE
try: try:
@@ -3287,10 +3292,10 @@ class XendDomainInfo: @@ -3288,10 +3293,10 @@ class XendDomainInfo:
if mounted: if mounted:
log.info("Unmounting %s from %s." % log.info("Unmounting %s from %s." %
(fn, BOOTLOADER_LOOPBACK_DEVICE)) (fn, BOOTLOADER_LOOPBACK_DEVICE))

View File

@ -1,3 +1,42 @@
-------------------------------------------------------------------
Mon Jan 23 13:41:42 MST 2012 - carnold@novell.com
- The xen kmp packages fail on the 09-check-packaged-twice script.
Rename xen_pvdrivers.conf to xen_pvdrivers-<kernel flavor>.conf
-------------------------------------------------------------------
Wed Jan 18 09:42:54 MST 2012 - carnold@novell.com
- bnc#739585 - L3: Xen block-attach fails after repeated attach/detach
blktap-close-fifos.patch
-------------------------------------------------------------------
Fri Jan 13 10:37:53 MST 2012 - jfehlig@suse.com
- bnc#741159 - Fix default setting of XENSTORED_ROOTDIR in
xencommons init script
xencommons-xenstored-root.patch
-------------------------------------------------------------------
Thu Jan 12 06:49:57 MST 2012 - carnold@novell.com
- bnc#740625 - xen: cannot interact with xend after upgrade (SLES)
- bnc#738694 - xen: cannot interact with xend after upgrade (os12.1)
- Other README changes included.
README.SuSE
-------------------------------------------------------------------
Tue Jan 10 17:30:20 CET 2012 - ohering@suse.de
- bnc#694863 - kexec fails in xen
24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch
-------------------------------------------------------------------
Mon Jan 9 16:10:19 CET 2012 - ohering@suse.de
- fate#310510 - fix xenpaging
xenpaging.speedup-page-out.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jan 3 08:26:42 MST 2012 - carnold@novell.com Tue Jan 3 08:26:42 MST 2012 - carnold@novell.com

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: xen Name: xen
ExclusiveArch: %ix86 x86_64 ExclusiveArch: %ix86 x86_64
%define xvers 4.1 %define xvers 4.1
@ -98,7 +99,7 @@ BuildRequires: kernel-syms
BuildRequires: module-init-tools BuildRequires: module-init-tools
BuildRequires: xorg-x11 BuildRequires: xorg-x11
%endif %endif
Version: 4.1.2_11 Version: 4.1.2_12
Release: 0 Release: 0
PreReq: %insserv_prereq %fillup_prereq PreReq: %insserv_prereq %fillup_prereq
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel) Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
@ -337,6 +338,7 @@ Patch24417: 24417-amd-erratum-573.patch
Patch24429: 24429-mceinj-tool.patch Patch24429: 24429-mceinj-tool.patch
Patch24447: 24447-x86-TXT-INIT-SIPI-delay.patch Patch24447: 24447-x86-TXT-INIT-SIPI-delay.patch
Patch24448: 24448-x86-pt-irq-leak.patch Patch24448: 24448-x86-pt-irq-leak.patch
Patch24478: 24478-libxl_add_feature_flag_to_xenstore_for_XS_RESET_WATCHES.patch
# Upstream qemu patches # Upstream qemu patches
Patch100: ioemu-9868-MSI-X.patch Patch100: ioemu-9868-MSI-X.patch
# Our patches # Our patches
@ -397,6 +399,7 @@ Patch379: xend-migration-domname-fix.patch
Patch380: xm-create-maxmem.patch Patch380: xm-create-maxmem.patch
# Sent upstream and tentatively ACK'ed, but not yet committed # Sent upstream and tentatively ACK'ed, but not yet committed
Patch381: 2XXXX-vif-bridge.patch Patch381: 2XXXX-vif-bridge.patch
Patch382: xencommons-xenstored-root.patch
# Patches for snapshot support # Patches for snapshot support
Patch400: snapshot-ioemu-save.patch Patch400: snapshot-ioemu-save.patch
Patch401: snapshot-ioemu-restore.patch Patch401: snapshot-ioemu-restore.patch
@ -449,6 +452,7 @@ Patch459: xl-create-pv-with-qcow2-img.patch
Patch460: ipxe-gcc45-warnings.patch Patch460: ipxe-gcc45-warnings.patch
Patch461: ipxe-ipv4-fragment.patch Patch461: ipxe-ipv4-fragment.patch
Patch462: ipxe-enable-nics.patch Patch462: ipxe-enable-nics.patch
Patch463: blktap-close-fifos.patch
# Jim's domain lock patch # Jim's domain lock patch
Patch480: xend-domain-lock.patch Patch480: xend-domain-lock.patch
Patch481: xend-domain-lock-sfex.patch Patch481: xend-domain-lock-sfex.patch
@ -483,6 +487,7 @@ Patch1107: xenpaging.evict_mmap_readonly.patch
Patch1126: xenpaging.guest-memusage.patch Patch1126: xenpaging.guest-memusage.patch
Patch1129: xenpaging.autostart.patch Patch1129: xenpaging.autostart.patch
Patch1130: xenpaging.doc.patch Patch1130: xenpaging.doc.patch
Patch1131: xenpaging.speedup-page-out.patch
Patch1142: xenpaging.qemu.flush-cache.patch Patch1142: xenpaging.qemu.flush-cache.patch
# xenalyze # xenalyze
Patch20000: xenalyze.gcc46.patch Patch20000: xenalyze.gcc46.patch
@ -1012,6 +1017,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch24429 -p1 %patch24429 -p1
%patch24447 -p1 %patch24447 -p1
%patch24448 -p1 %patch24448 -p1
%patch24478 -p1
# Qemu # Qemu
%patch100 -p1 %patch100 -p1
# Our patches # Our patches
@ -1070,6 +1076,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch379 -p1 %patch379 -p1
%patch380 -p1 %patch380 -p1
%patch381 -p1 %patch381 -p1
%patch382 -p1
%patch400 -p1 %patch400 -p1
%patch401 -p1 %patch401 -p1
%patch402 -p1 %patch402 -p1
@ -1119,6 +1126,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch460 -p1 %patch460 -p1
%patch461 -p1 %patch461 -p1
%patch462 -p1 %patch462 -p1
%patch463 -p1
%patch480 -p1 %patch480 -p1
%patch481 -p1 %patch481 -p1
%patch500 -p1 %patch500 -p1
@ -1151,6 +1159,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch1126 -p1 %patch1126 -p1
%patch1129 -p1 %patch1129 -p1
%patch1130 -p1 %patch1130 -p1
%patch1131 -p1
%patch1142 -p1 %patch1142 -p1
# #
%patch99998 -p1 %patch99998 -p1
@ -1257,12 +1266,12 @@ make -C tools/misc/serial-split install \
%if %{?with_kmp}0 %if %{?with_kmp}0
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates export INSTALL_MOD_DIR=updates
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
for flavor in %flavors_to_build; do for flavor in %flavors_to_build; do
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \ make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install \
M=$PWD/obj/$flavor M=$PWD/obj/$flavor
install -m644 %SOURCE20 $RPM_BUILD_ROOT/etc/modprobe.d/xen_pvdrivers-$flavor.conf
done done
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
install -m644 %SOURCE20 $RPM_BUILD_ROOT/etc/modprobe.d/xen_pvdrivers.conf
%endif %endif
%if %{?with_dom0_support}0 %if %{?with_dom0_support}0
# Stubdom # Stubdom

View File

@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3934,6 +3934,14 @@ class XendDomainInfo: @@ -3935,6 +3935,14 @@ class XendDomainInfo:
if not config.has_key('backend'): if not config.has_key('backend'):
config['backend'] = "00000000-0000-0000-0000-000000000000" config['backend'] = "00000000-0000-0000-0000-000000000000"

View File

@ -0,0 +1,19 @@
Fix setting XENSTORED_ROOTDIR in xencommons
Due to a logic bug, XENSTORED_ROOTDIR was not being set to
default value when zero length.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons
===================================================================
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/init.d/xencommons
+++ xen-4.1.2-testing/tools/hotplug/Linux/init.d/xencommons
@@ -47,7 +47,7 @@ do_start () {
if ! `xenstore-read -s / >/dev/null 2>&1`
then
- test -z "$XENSTORED_ROOTDIR" || XENSTORED_ROOTDIR="/var/lib/xenstored"
+ test -z "$XENSTORED_ROOTDIR" && XENSTORED_ROOTDIR="/var/lib/xenstored"
rm -f "$XENSTORED_ROOTDIR"/tdb* &>/dev/null
test -z "$XENSTORED_TRACE" || XENSTORED_ARGS=" -T /var/log/xen/xenstored-trace.log"

View File

@ -21,7 +21,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -3054,7 +3054,7 @@ class XendDomainInfo: @@ -3055,7 +3055,7 @@ class XendDomainInfo:
# TODO: recategorise - called from XendCheckpoint # TODO: recategorise - called from XendCheckpoint
# #
@ -30,7 +30,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
log.debug("XendDomainInfo.completeRestore") log.debug("XendDomainInfo.completeRestore")
@@ -3065,6 +3065,7 @@ class XendDomainInfo: @@ -3066,6 +3066,7 @@ class XendDomainInfo:
self.image = image.create(self, self.info) self.image = image.create(self, self.info)
if self.image: if self.image:
self._createDevices(True) self._createDevices(True)

View File

@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2303,7 +2303,7 @@ class XendDomainInfo: @@ -2304,7 +2304,7 @@ class XendDomainInfo:
# To prohibit directory traversal # To prohibit directory traversal
based_name = os.path.basename(self.info['name_label']) based_name = os.path.basename(self.info['name_label'])

View File

@ -223,7 +223,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -4518,8 +4518,14 @@ class XendDomainInfo: @@ -4519,8 +4519,14 @@ class XendDomainInfo:
# Return name of host contained in lock file. # Return name of host contained in lock file.
def get_lock_host(self, path): def get_lock_host(self, path):
@ -240,7 +240,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
hostname = "unknown" hostname = "unknown"
try: try:
@@ -4541,6 +4547,16 @@ class XendDomainInfo: @@ -4542,6 +4548,16 @@ class XendDomainInfo:
path = xoptions.get_xend_domain_lock_path() path = xoptions.get_xend_domain_lock_path()
path = os.path.join(path, self.get_uuid()) path = os.path.join(path, self.get_uuid())
@ -257,7 +257,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
try: try:
if not os.path.exists(path): if not os.path.exists(path):
mkdir.parents(path, stat.S_IRWXU) mkdir.parents(path, stat.S_IRWXU)
@@ -4548,12 +4564,7 @@ class XendDomainInfo: @@ -4549,12 +4565,7 @@ class XendDomainInfo:
log.exception("%s could not be created." % path) log.exception("%s could not be created." % path)
raise XendError("%s could not be created." % path) raise XendError("%s could not be created." % path)
@ -271,7 +271,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
if status != 0: if status != 0:
log.debug("Failed to aqcuire lock: status = %d" % status) log.debug("Failed to aqcuire lock: status = %d" % status)
raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path)) raise XendError("The VM is locked and appears to be running on host %s." % self.get_lock_host(path))
@@ -4570,12 +4581,18 @@ class XendDomainInfo: @@ -4571,12 +4582,18 @@ class XendDomainInfo:
path = xoptions.get_xend_domain_lock_path() path = xoptions.get_xend_domain_lock_path()
path = os.path.join(path, self.get_uuid()) path = os.path.join(path, self.get_uuid())

View File

@ -257,7 +257,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
XendTask.log_progress(0, 30, self._constructDomain) XendTask.log_progress(0, 30, self._constructDomain)
XendTask.log_progress(31, 60, self._initDomain) XendTask.log_progress(31, 60, self._initDomain)
@@ -3002,6 +3003,11 @@ class XendDomainInfo: @@ -3003,6 +3004,11 @@ class XendDomainInfo:
self._stateSet(DOM_STATE_HALTED) self._stateSet(DOM_STATE_HALTED)
self.domid = None # Do not push into _stateSet()! self.domid = None # Do not push into _stateSet()!
@ -269,7 +269,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
finally: finally:
self.refresh_shutdown_lock.release() self.refresh_shutdown_lock.release()
@@ -4510,6 +4516,74 @@ class XendDomainInfo: @@ -4511,6 +4517,74 @@ class XendDomainInfo:
def has_device(self, dev_class, dev_uuid): def has_device(self, dev_class, dev_uuid):
return (dev_uuid in self.info['%s_refs' % dev_class.lower()]) return (dev_uuid in self.info['%s_refs' % dev_class.lower()])

View File

@ -8,7 +8,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -1946,6 +1946,8 @@ class XendDomainInfo: @@ -1947,6 +1947,8 @@ class XendDomainInfo:
self.info['name_label'] = name self.info['name_label'] = name
if to_store: if to_store:
self.storeVm("name", name) self.storeVm("name", name)

View File

@ -2,35 +2,28 @@ Index: xen-4.1.2-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xencommons --- xen-4.1.2-testing.orig/tools/hotplug/Linux/init.d/sysconfig.xencommons
+++ xen-4.1.2-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons +++ xen-4.1.2-testing/tools/hotplug/Linux/init.d/sysconfig.xencommons
@@ -1,11 +1,31 @@ @@ -1,11 +1,24 @@
+## Path: System/Virtualization +## Path: System/Virtualization
+## Type: string(none,guest,hv,all) +## Type: string
+## Default: "" +## Default: "none"
+# +#
# Log xenconsoled messages (cf xl dmesg) # Log xenconsoled messages (cf xl dmesg)
#XENCONSOLED_TRACE=[none|guest|hv|all] #XENCONSOLED_TRACE=[none|guest|hv|all]
+XENCONSOLED_TRACE=""
+## Path: System/Virtualization +## Type: string
+## Type: string(yes,on,1) +## Default: Not defined, tracing off
+## Default: ""
+# +#
# Log xenstored messages # Log xenstored messages
#XENSTORED_TRACE=[yes|on|1] #XENSTORED_TRACE=[yes|on|1]
+XENSTORED_TRACE=""
+## Path: System/Virtualization +## Type: string
+## Type: string("/var/lib/xenstored") +## Default: "/var/lib/xenstored"
+## Default: ""
+# +#
# Running xenstored on XENSTORED_ROOTDIR # Running xenstored on XENSTORED_ROOTDIR
#XENSTORED_ROOTDIR=/var/lib/xenstored #XENSTORED_ROOTDIR=/var/lib/xenstored
+XENSTORED_ROOTDIR=""
+## Path: System/Virtualization +## Type: string
+## Type: string(yes,on,1) +## Default: Not defined, xenbackendd debug mode off
+## Default: ""
+# +#
# Running xenbackendd in debug mode # Running xenbackendd in debug mode
#XENBACKENDD_DEBUG=[yes|on|1] #XENBACKENDD_DEBUG=[yes|on|1]
+XENBACKENDD_DEBUG=""

View File

@ -2,7 +2,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
=================================================================== ===================================================================
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py --- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py +++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
@@ -2777,7 +2777,10 @@ class XendDomainInfo: @@ -2778,7 +2778,10 @@ class XendDomainInfo:
from xen.xend import XendDomain from xen.xend import XendDomain
doms = XendDomain.instance().list('all') doms = XendDomain.instance().list('all')
for dom in filter (lambda d: d.domid != self.domid, doms): for dom in filter (lambda d: d.domid != self.domid, doms):

View File

@ -168,7 +168,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
def setMemoryTarget(self, target): def setMemoryTarget(self, target):
"""Set the memory target of this domain. """Set the memory target of this domain.
@param target: In MiB. @param target: In MiB.
@@ -2292,6 +2303,8 @@ class XendDomainInfo: @@ -2293,6 +2304,8 @@ class XendDomainInfo:
self.info['name_label'], self.domid, self.info['uuid'], self.info['name_label'], self.domid, self.info['uuid'],
new_name, new_uuid) new_name, new_uuid)
self._unwatchVm() self._unwatchVm()
@ -177,7 +177,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self._releaseDevices() self._releaseDevices()
# Remove existing vm node in xenstore # Remove existing vm node in xenstore
self._removeVm() self._removeVm()
@@ -2966,6 +2979,9 @@ class XendDomainInfo: @@ -2967,6 +2980,9 @@ class XendDomainInfo:
self._createDevices() self._createDevices()
@ -187,7 +187,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self.image.cleanupTmpImages() self.image.cleanupTmpImages()
self.info['start_time'] = time.time() self.info['start_time'] = time.time()
@@ -2990,6 +3006,8 @@ class XendDomainInfo: @@ -2991,6 +3007,8 @@ class XendDomainInfo:
self.refresh_shutdown_lock.acquire() self.refresh_shutdown_lock.acquire()
try: try:
self.unwatchShutdown() self.unwatchShutdown()
@ -196,7 +196,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self._releaseDevices() self._releaseDevices()
bootloader_tidy(self) bootloader_tidy(self)
@@ -3074,6 +3092,7 @@ class XendDomainInfo: @@ -3075,6 +3093,7 @@ class XendDomainInfo:
self.image = image.create(self, self.info) self.image = image.create(self, self.info)
if self.image: if self.image:
self._createDevices(True) self._createDevices(True)
@ -204,7 +204,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self.console_port = console_port self.console_port = console_port
self._storeDomDetails() self._storeDomDetails()
self._registerWatches() self._registerWatches()
@@ -3215,6 +3234,8 @@ class XendDomainInfo: @@ -3216,6 +3235,8 @@ class XendDomainInfo:
# could also fetch a parsed note from xenstore # could also fetch a parsed note from xenstore
fast = self.info.get_notes().get('SUSPEND_CANCEL') and 1 or 0 fast = self.info.get_notes().get('SUSPEND_CANCEL') and 1 or 0
if not fast: if not fast:
@ -213,7 +213,7 @@ Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
self._releaseDevices() self._releaseDevices()
self.testDeviceComplete() self.testDeviceComplete()
self.testvifsComplete() self.testvifsComplete()
@@ -3230,6 +3251,8 @@ class XendDomainInfo: @@ -3231,6 +3252,8 @@ class XendDomainInfo:
self._storeDomDetails() self._storeDomDetails()
self._createDevices() self._createDevices()

View File

@ -0,0 +1,89 @@
xenpaging: no poll timeout while page-out is in progress
The main loop calls xenpaging_wait_for_event_or_timeout() unconditionally
before doing any work. This function calls poll() with a timeout of 100ms. As
a result the page-out process is very slow due to the delay in poll().
Call poll() without timeout so that it returns immediately until the page-out
is done. Page-out is done when either the policy finds no more pages to
nominate or when the requested number of pages is reached.
The condition is cleared when a watch event arrives, so that processing the
new target is not delayed once again by poll().
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenpaging/policy_default.c | 1 +
tools/xenpaging/xenpaging.c | 12 +++++++++++-
tools/xenpaging/xenpaging.h | 1 +
3 files changed, 13 insertions(+), 1 deletion(-)
Index: xen-4.1.2-testing/tools/xenpaging/policy_default.c
===================================================================
--- xen-4.1.2-testing.orig/tools/xenpaging/policy_default.c
+++ xen-4.1.2-testing/tools/xenpaging/policy_default.c
@@ -90,6 +90,7 @@ int policy_choose_victim(xenpaging_t *pa
/* Could not nominate any gfn */
if ( wrap == current_gfn )
{
+ paging->use_poll_timeout = 1;
/* Count wrap arounds */
unconsumed_cleared++;
/* Force retry every few seconds (depends on poll() timeout) */
Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
===================================================================
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c
+++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c
@@ -85,6 +85,7 @@ static int xenpaging_wait_for_event_or_t
struct pollfd fd[2];
int port;
int rc;
+ int timeout;
/* Wait for event channel and xenstore */
fd[0].fd = xc_evtchn_fd(xce);
@@ -92,7 +93,9 @@ static int xenpaging_wait_for_event_or_t
fd[1].fd = xs_fileno(paging->xs_handle);
fd[1].events = POLLIN | POLLERR;
- rc = poll(fd, 2, 100);
+ /* No timeout while page-out is still in progress */
+ timeout = paging->use_poll_timeout ? 100 : 0;
+ rc = poll(fd, 2, timeout);
if ( rc < 0 )
{
if (errno == EINTR)
@@ -134,6 +137,8 @@ static int xenpaging_wait_for_event_or_t
if ( target_tot_pages < 0 || target_tot_pages > paging->max_pages )
target_tot_pages = paging->max_pages;
paging->target_tot_pages = target_tot_pages;
+ /* Disable poll() delay while new target is not yet reached */
+ paging->use_poll_timeout = 0;
DPRINTF("new target_tot_pages %d\n", target_tot_pages);
}
free(val);
@@ -1002,6 +1007,11 @@ int main(int argc, char *argv[])
}
resume_pages(paging, num);
}
+ /* Now target was reached, enable poll() timeout */
+ else
+ {
+ paging->use_poll_timeout = 1;
+ }
}
DPRINTF("xenpaging got signal %d\n", interrupted);
Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.h
===================================================================
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.h
+++ xen-4.1.2-testing/tools/xenpaging/xenpaging.h
@@ -52,6 +52,7 @@ typedef struct xenpaging {
int num_paged_out;
int target_tot_pages;
int policy_mru_size;
+ int use_poll_timeout;
int debug;
unsigned long pagein_queue[XENPAGING_PAGEIN_QUEUE_SIZE];
} xenpaging_t;