Additional options to hide PCI devices from dom0 (#861)
This commit is contained in:
parent
9a206a5c4e
commit
b8bd6e2d49
@ -1,8 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||||
|
|
||||||
# Find all networking devices currenly installed...
|
# Find all networking devices currenly installed...
|
||||||
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'`
|
HIDE_PCI=`lspci -mm -n | grep '^[^ ]* "02'|awk '{ ORS="";print "(" $1 ")";}'`
|
||||||
|
|
||||||
|
if getargbool 0 rd.qubes.hide_all_usb; then
|
||||||
|
HIDE_PCI=$HIDE_PCI`lspci -mm -n | grep '^[^ ]* "0c03'|awk '{ ORS="";print "(" $1 ")";}'`
|
||||||
|
fi
|
||||||
|
|
||||||
|
HIDE_PCI=$HIDE_PCI`getarg rd.qubes.hide_pci | tr ',' '\n'|awk '{ ORS="";print "(" $1 ")";}'`
|
||||||
|
|
||||||
# ... and hide them so that Dom0 doesn't load drivers for them
|
# ... and hide them so that Dom0 doesn't load drivers for them
|
||||||
modprobe pciback hide=$HIDE_PCI 2> /dev/null || modprobe xen-pciback hide=$HIDE_PCI
|
modprobe pciback hide=$HIDE_PCI 2> /dev/null || modprobe xen-pciback hide=$HIDE_PCI
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user