#!/sbin/openrc-run
start(){
ebegin "Rebinding some drivers..."
#Intel Corporation Ethernet Connection (2) I218-V
echo 0000:00:19.0 > /sys/bus/pci/drivers/e1000e/unbind
echo "8086 15a1" > /sys/bus/pci/drivers/vfio-pci/new_id
#Intel Corporation C610/X99 series chipset sSATA Controller (4 ports bottom)
#echo 0000:00:11.4 > /sys/bus/pci/drivers/ahci/unbind
#echo "8086 8d62" > /sys/bus/pci/drivers/vfio-pci/new_id
#Intel Corporation C610/X99 series chipset 6-Port SATA Controller (top, m.2 here)
echo 0000:00:1f.2 > /sys/bus/pci/drivers/ahci/unbind
echo "8086 8d02" > /sys/bus/pci/drivers/vfio-pci/new_id
#lpc and smbus - need for 6-Port SATA Controller (iommu group, only unbind need)
echo 0000:00:1f.0 > /sys/bus/pci/drivers/lpc_ich/unbind
echo 0000:00:1f.3 > /sys/bus/pci/drivers/i801_smbus/unbind
#usb
#echo 0000:00:1d.0 > /sys/bus/pci/drivers/ehci-pci/unbind
#novideo
#echo 0000:03:00.0 > /sys/bus/pci/drivers/nouveau/unbind
#echo 0000:03:00.1 > /sys/bus/pci/drivers/snd_hda_intel/unbind
#echo "10de 11c0" > /sys/bus/pci/drivers/vfio-pci/new_id
#echo "10de 100a" > /sys/bus/pci/drivers/vfio-pci/new_id
#echo "8086 8d26" > /sys/bus/pci/drivers/vfio-pci/new_id
eend $?
}