387129caad
- bnc#803712 - after live migration rcu_sched_state detected stalls xen.migrate.tools-xend_move_assert_to_exception_block.patch xen.migrate.tools-libxc_print_stats_if_migration_is_aborted.patch xen.migrate.tools_set_number_of_dirty_pages_during_migration.patch xen.migrate.tools_notify_restore_to_hangup_during_migration_--abort_if_busy.patch - bnc#811764 - XEN (hypervisor or kernel) has a problem with EFI variable services x86-EFI-set-variable-permit-attrs.patch - Upstream patches from Jan 26060-ACPI-ERST-table-size-checks.patch 26692-x86-fully-protect-MSI-X-table-from-PV-guest-accesses.patch 26702-powernow-add-fixups-for-AMD-P-state-figures.patch 26704-x86-MCA-suppress-bank-clearing-for-certain-injected-events.patch (bnc#805579) 26731-AMD-IOMMU-Process-softirqs-while-building-dom0-iommu-mappings.patch 26733-VT-d-Enumerate-IOMMUs-when-listing-capabilities.patch 26734-ACPI-ERST-Name-table-in-otherwise-opaque-error-messages.patch 26736-ACPI-APEI-Unlock-apei_iomaps_lock-on-error-path.patch 26737-ACPI-APEI-Add-apei_exec_run_optional.patch 26742-IOMMU-properly-check-whether-interrupt-remapping-is-enabled.patch 26743-VT-d-deal-with-5500-5520-X58-errata.patch (bnc#801910) 26744-AMD-IOMMU-allow-disabling-only-interrupt-remapping.patch - PVonHVM: __devinit was removed in linux-3.8 OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=234
118 lines
4.8 KiB
Diff
118 lines
4.8 KiB
Diff
Index: xen-4.2.1-testing/tools/python/xen/xend/server/DevController.py
|
|
===================================================================
|
|
--- xen-4.2.1-testing.orig/tools/python/xen/xend/server/DevController.py
|
|
+++ xen-4.2.1-testing/tools/python/xen/xend/server/DevController.py
|
|
@@ -592,6 +592,31 @@ class DevController:
|
|
return (Missing, None)
|
|
|
|
|
|
+ def waitForFrontend(self, devid):
|
|
+ def frontendStatusCallback(statusPath, ev, result):
|
|
+ status = xstransact.Read(statusPath)
|
|
+ log.debug("frontendStatusCallback %s = %s" % (statusPath, status))
|
|
+ try:
|
|
+ status = int(status)
|
|
+ if status == xenbusState['Connected']:
|
|
+ result['status'] = Connected
|
|
+ elif status == xenbusState['Closed']:
|
|
+ result['status'] = Error
|
|
+ else:
|
|
+ raise
|
|
+ except:
|
|
+ return 1
|
|
+ ev.set()
|
|
+ return 0
|
|
+ frontpath = self.frontendPath(devid)
|
|
+ statusPath = frontpath + '/state'
|
|
+ ev = Event()
|
|
+ result = { 'status': Timeout }
|
|
+ xswatch(statusPath, frontendStatusCallback, ev, result)
|
|
+ ev.wait(5)
|
|
+ return result['status']
|
|
+
|
|
+
|
|
def backendPath(self, backdom, devid):
|
|
"""Construct backend path given the backend domain and device id.
|
|
|
|
Index: xen-4.2.1-testing/tools/python/xen/xend/XendBootloader.py
|
|
===================================================================
|
|
--- xen-4.2.1-testing.orig/tools/python/xen/xend/XendBootloader.py
|
|
+++ xen-4.2.1-testing/tools/python/xen/xend/XendBootloader.py
|
|
@@ -12,7 +12,7 @@
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
#
|
|
|
|
-import os, select, errno, stat, signal, tty
|
|
+import os, select, errno, stat, signal, tty, time
|
|
import random
|
|
import shlex
|
|
from xen.xend import sxp
|
|
@@ -38,8 +38,25 @@ def bootloader(blexec, disk, dom, quiet
|
|
msg = "Bootloader isn't executable"
|
|
log.error(msg)
|
|
raise VmError(msg)
|
|
- if not os.access(disk, os.R_OK):
|
|
- msg = "Disk isn't accessible"
|
|
+
|
|
+ # domUloader requires '--entry=foo' in blargs, which is derived from
|
|
+ # 'bootargs' entry in domain configuration file. Ensure it exists
|
|
+ # here so a reasonable error message can be returned.
|
|
+ if blexec.find('domUloader.py') != -1:
|
|
+ if blargs.find('entry') == -1:
|
|
+ msg = "domUloader requires specification of bootargs"
|
|
+ log.error(msg)
|
|
+ raise VmError(msg)
|
|
+
|
|
+ avail = False
|
|
+ for i in xrange(1, 500):
|
|
+ avail = os.access(disk, os.R_OK)
|
|
+ if avail:
|
|
+ break
|
|
+ time.sleep(.1)
|
|
+
|
|
+ if not avail:
|
|
+ msg = "Disk '%s' isn't accessible" % disk
|
|
log.error(msg)
|
|
raise VmError(msg)
|
|
|
|
Index: xen-4.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
|
===================================================================
|
|
--- xen-4.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
|
+++ xen-4.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
|
@@ -2349,6 +2349,10 @@ class XendDomainInfo:
|
|
deviceClass, config = self.info['devices'].get(dev_uuid)
|
|
self._waitForDevice(deviceClass, config['devid'])
|
|
|
|
+ def _waitForDeviceFrontUUID(self, dev_uuid):
|
|
+ deviceClass, config = self.info['devices'].get(dev_uuid)
|
|
+ self.getDeviceController(deviceClass).waitForFrontend(config['devid'])
|
|
+
|
|
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
|
|
return self.getDeviceController(deviceClass).waitForDevice_destroy(
|
|
devid, backpath)
|
|
@@ -3299,7 +3303,8 @@ class XendDomainInfo:
|
|
from xen.xend import XendDomain
|
|
dom0 = XendDomain.instance().privilegedDomain()
|
|
mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
|
|
- dom0._waitForDeviceUUID(mounted_vbd_uuid)
|
|
+ vbd_uuid = dom0.create_vbd(vbd, disk)
|
|
+ dom0._waitForDeviceFrontUUID(vbd_uuid)
|
|
fn = BOOTLOADER_LOOPBACK_DEVICE
|
|
|
|
try:
|
|
@@ -3309,10 +3314,10 @@ class XendDomainInfo:
|
|
if mounted:
|
|
log.info("Unmounting %s from %s." %
|
|
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
|
- _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
|
|
- dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']),
|
|
- BOOTLOADER_LOOPBACK_DEVICE, force = True)
|
|
-
|
|
+ if devtype in ['tap', 'tap2']:
|
|
+ dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
|
|
+ else:
|
|
+ dom0.destroyDevice('vbd', BOOTLOADER_LOOPBACK_DEVICE, rm_cfg = True)
|
|
if blcfg is None:
|
|
msg = "Had a bootloader specified, but can't find disk"
|
|
log.error(msg)
|