gemelen: (Default)
[personal profile] gemelen

PCI Device Passthrough Guide for illumos (bhyve) Zone

Mostly a compilation of already existing guides on how to pass a PCI device into illumos (bhyve) zone.

Task:

Tuxedo InfinityBook v4 is bundled with an Intel Corporation Wi-Fi 5(802.11ac) Wireless-AC 9x6x (Thunder Peak) adapter, which has no relevant driver on illumos.

As an experiment, I'd like to passthrough this adapter to a VM that has a driver for it, thus could provide a connectivity. For the test stage, bhyve zone with Ubuntu 24.04 would be good enough.

Pre-requisites:

  • SmartOS set up on the laptop
  • Ubuntu 24.04 zvol image imported via imgadm
  • Ubuntu bhyve zone manifest created with NICs a) for initial stage, would be removed later b) for communication with global zone
  • bhyve zone created, booted and reachable via ssh (or serial console)

Steps:

1. Find a PCI id of the adapter

prtconf -Dd

...
i86pc (driver name: rootnex)
    ...
    pci, instance #0 (driver name: npe)
        ...
        pci8086,9db1 (pciex8086,9db1) [Intel Corporation Cannon Point-LP PCI Express Root Port #10], instance #4 (driver name: pcieb)
            pci8086,14 (pciex8086,2526) [Intel Corporation Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak]], instance #0

2. Configure PCI passthrough

As I'm using piadm to manage platform images, there is more than one such image. For the sake of simplicity, I'm taking a shortcut and placing configuration files directly under the current platform directory hierarchy, leaving their persistence across platform upgrades out of this manual

Create a ppt_aliases configuration to bind a device to a ppt driver

echo 'ppt "pci8086,14"' >> /zones/boot/boot/etc/ppt_aliases

Create a loader configuration that will instruct the loader to use that binding

cat <<EOF >> /zones/boot/boot/loader.conf.local
ppt_aliases_load=YES
ppt_aliases_type=file
ppt_aliases_name=/boot/etc/ppt_aliases
ppt_aliases_flags="name=/etc/ppt_aliases"
EOF

3. Reboot and verify that the device now is handled by the ppt driver

pptadm list

DEV        VENDOR DEVICE PATH
/dev/ppt0  8086   2526   /pci@0,0/pci8086,9db1@1d,1/pci8086,14@0

4. Get the target zone's id and add the device to it

zonecfg -z <zoneid>
zonecfg:<zoneid>> add device
zonecfg:<zoneid>:device> set match="/devices//pci@0,0/pci8086,9db1@1d,1/pci8086,14@0"
zonecfg:<zoneid>:device> add property (name=model,value="passthru")
zonecfg:<zoneid>:device> add property (name=pci-slot,value="0:8:0")
zonecfg:<zoneid>:device> end
zonecfg:<zoneid>> exit

5. Reboot the zone and login to it. We might need to install firmware and relevant kernel module

apt install linux-firmware linux-modules-iwlwifi-`uname -r`
# optionally
apt install network-manager
modprobe -v iwlwifi

6. Verify the result

lspci
...
00:08.0 Network controller: Intel Corporation Wi-Fi 5(802.11ac) Wireless-AC 9x6x [Thunder Peak] (rev 29)
...

Profile

gemelen: (Default)
gemelen

June 2025

M T W T F S S
      1
2345678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 3rd, 2026 20:50
Powered by Dreamwidth Studios