edf6bf0381
23955-x86-pv-cpuid-xsave.patch 23957-cpufreq-error-paths.patch - Upstream patches from Jan 23933-pt-bus2bridge-update.patch 23726-x86-intel-flexmigration-v2.patch 23925-x86-AMD-ARAT-Fam12.patch 23246-x86-xsave-enable.patch 23897-x86-mce-offline-again.patch - Update to Xen 4.1.2_rc3 c/s 23171 - bnc#720054 - Changed /etc/udev/rules.d/40-xen.rules to not run Xen's vif-bridge script when not running Xen. This is not a solution to the bug but an improvement in the rules regardless. Updated udev-rules.patch - Upstream patches from Jan 23868-vtd-RMRR-validation.patch 23871-x86-microcode-amd-silent.patch 23898-cc-option-grep.patch - Add pciback init script and sysconf file, giving users a simple mechanism to configure pciback. init.pciback sysconfig.pciback - update scripts to use xl -f, or xm if xend is running: xen-updown.sh, init.xendomains, xmclone.sh OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=146
120 lines
2.5 KiB
Bash
120 lines
2.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2001 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
|