3e51b51ba9
be booted from EFI" 53dba447-x86-ACPI-allow-CMOS-RTC-use-even-when-ACPI-says-there-is-none.patch - Upstream patches from Jan 53d7b781-x86-cpu-undo-BIOS-CPUID-max_leaf-limit-earlier.patch 53df71c7-lz4-check-for-underruns.patch 53df727b-x86-HVM-extend-LAPIC-shortcuts-around-P2M-lookups.patch 53e47d6b-x86_emulate-properly-do-IP-updates-and-other-side-effects.patch - Update to Xen Version 4.4.1-rc2 xen-4.4.1-testing-src.tar.bz2 - Dropped 60 upstream patches and xen-4.4.0-testing-src.tar.bz2 - bnc#820873 - The "long" option doesn't work with "xl list" 53d124e7-fix-list_domain_details-check-config-data-length-0.patch - bnc#888996 - Package 'xen-tool' contains 'SuSE' spelling in a filename and/or SPEC file Renamed README.SuSE -> README.SUSE Modified files: xen.spec, boot.local.xenU, init.pciback xend-config.patch, xend-vif-route-ifup.patch - bnc#882673 - Dom0 memory should enforce a minimum memory size (e.g. dom0_mem=min:512M) xen.spec (Mike Latimer) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=324
120 lines
2.5 KiB
Bash
120 lines
2.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2014 SUSE GmbH Nuernberg, Germany. All rights reserved.
|
|
#
|
|
# /etc/init.d/pciback
|
|
#
|
|
### BEGIN INIT INFO
|
|
# Provides: pciback
|
|
# Required-Start: $syslog $network
|
|
# Should-Start: $null
|
|
# Required-Stop: $syslog $network
|
|
# Should-Stop: $null
|
|
# Default-Start: 3 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Description: bind PCI devices to pciback
|
|
### END INIT INFO
|
|
|
|
. /etc/rc.status
|
|
. /etc/sysconfig/pciback
|
|
|
|
rc_reset
|
|
|
|
load_pciback() {
|
|
if ! lsmod | grep -qi "pciback"
|
|
then
|
|
echo "Loading pciback ..."
|
|
modprobe pciback
|
|
fi
|
|
}
|
|
|
|
unload_pciback() {
|
|
if lsmod | grep -qi "pciback"
|
|
then
|
|
echo "Unloading pciback ..."
|
|
modprobe -r pciback
|
|
fi
|
|
}
|
|
|
|
bind_dev_to_pciback() {
|
|
for DEVICE in ${XEN_PCI_HIDE_LIST}
|
|
do
|
|
local DRV=`echo ${DEVICE} | /usr/bin/cut -d "," -f 1`
|
|
local PCIID=`echo ${DEVICE} | /usr/bin/cut -d "," -f 2`
|
|
|
|
if ! ls /sys/bus/pci/drivers/pciback/${PCIID} > /dev/null 2>&1
|
|
then
|
|
echo "Binding ${PCIID} ..."
|
|
if ls /sys/bus/pci/drivers/${DRV}/${PCIID} > /dev/null 2>&1
|
|
then
|
|
echo -n ${PCIID} > /sys/bus/pci/drivers/${DRV}/unbind
|
|
fi
|
|
echo -n ${PCIID} > /sys/bus/pci/drivers/pciback/new_slot
|
|
echo -n ${PCIID} > /sys/bus/pci/drivers/pciback/bind
|
|
fi
|
|
done
|
|
}
|
|
|
|
unbind_dev_from_pciback() {
|
|
for DEVICE in ${XEN_PCI_HIDE_LIST}
|
|
do
|
|
local DRV=`echo ${DEVICE} | /usr/bin/cut -d "," -f 1`
|
|
local PCIID=`echo ${DEVICE} | /usr/bin/cut -d "," -f 2`
|
|
|
|
if ls /sys/bus/pci/drivers/pciback/${PCIID} > /dev/null
|
|
then
|
|
echo "Unbinding ${PCIID} ..."
|
|
echo -n ${PCIID} > /sys/bus/pci/drivers/pciback/unbind
|
|
fi
|
|
done
|
|
}
|
|
|
|
test "uname -r" | grep xen && exit 0
|
|
|
|
case $1 in
|
|
start)
|
|
echo "Starting pciback ..."
|
|
echo
|
|
load_pciback
|
|
bind_dev_to_pciback
|
|
|
|
rc_status -v -r
|
|
;;
|
|
stop)
|
|
echo "Stopping pciback ..."
|
|
echo
|
|
unbind_dev_from_pciback
|
|
unload_pciback
|
|
|
|
rc_status -v
|
|
;;
|
|
reload|restart)
|
|
echo "Stopping pciback ..."
|
|
echo
|
|
unbind_dev_from_pciback
|
|
unload_pciback
|
|
echo "Starting pciback ..."
|
|
echo
|
|
load_pciback
|
|
bind_dev_to_pciback
|
|
;;
|
|
status)
|
|
if lsmod | grep -qi pciback
|
|
then
|
|
echo
|
|
echo "pciback: loaded"
|
|
echo
|
|
echo "Currently bound devices ..."
|
|
echo "-----------------------------"
|
|
ls /sys/bus/pci/drivers/pciback | grep ^0000
|
|
echo
|
|
else
|
|
echo "pciback: not loaded"
|
|
fi
|
|
;;
|
|
*)
|
|
echo "Usage: $0 [start|stop|restart|reload|status]"
|
|
exit 1
|
|
;;
|
|
esac
|