Page MenuHomeFreeBSD

D43270.id132113.diff
No OneTemporary

D43270.id132113.diff

diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh
--- a/share/examples/bhyve/vmrun.sh
+++ b/share/examples/bhyve/vmrun.sh
@@ -62,7 +62,7 @@
echo " [-L <VNC IP for UEFI framebuffer>]"
echo " [-m <memsize>]" \
"[-n <network adapter emulation type>]"
- echo " [-p <bus/slot/func>]"
+ echo " [-p <pcidev>]"
echo " [-P <port>] [-t <tapdev>] <vmname>"
echo ""
echo " -h: display this help message"
@@ -87,8 +87,7 @@
echo " -m: memory size (default: ${DEFAULT_MEMSIZE})"
echo " -n: network adapter emulation type" \
"(default: ${DEFAULT_NIC})"
- echo " -p: pass-through a host PCI device at bus/slot/func" \
- "(e.g. 10/0/0)"
+ echo " -p: pass-through a host PCI device (e.g ehci0)"
echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})"
echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)"
echo " -T: Enable tablet device (for UEFI GOP)"
@@ -352,7 +351,12 @@
i=0
while [ $i -lt $pass_total ] ; do
eval "pass=\$pass_dev${i}"
- devargs="$devargs -s $nextslot:0,passthru,${pass} "
+ passno="$(
+ pciconf -l | grep "${pass}@" | awk '{print $1}' | cut -f2 -d@ |
+ cut -f2- -d: | sed 's/:$//' | tr : /
+ )"
+ test -z "${passno}" && errmsg "${pass} is not a host PCI device"
+ devargs="$devargs -s $nextslot:0,passthru,${passno} "
nextslot=$(($nextslot + 1))
i=$(($i + 1))
done

File Metadata

Mime Type
text/plain
Expires
Mon, Apr 28, 8:07 PM (11 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17833333
Default Alt Text
D43270.id132113.diff (1 KB)

Event Timeline