bhyve FreeBSD 15.1: Host freezes when starting bhyve VM with BCM4360 PCI passthrough (MacBookPro11,1)

Hello everyone,

I'm trying to work around the lack of a native FreeBSD driver for the Broadcom BCM4360 wireless card by passing it through to a Debian guest running under bhyve. The Debian VM would then connect to Wi-Fi and act as a router/NAT gateway for the FreeBSD host.

Unfortunately, starting the VM causes the entire FreeBSD host to hard-freeze.

System


  • []Apple MacBookPro11,1
    [
    ]Intel Core i5-4278U (Haswell)
    []Broadcom BCM4360 (14e4:43a0)
    [
    ]FreeBSD 15.1-RELEASE (GENERIC)
  • vm-bhyve 1.7.4

Current configuration

My [tt]/boot/loader.conf[/tt]:

Code:
vmm_load="YES"
nmdm_load="YES"
pptdevs="3/0/0"
hw.vmm.iommu.enable="1"
hw.dmar.enable="1"
boot_verbose="YES"

The VM configuration contains:

Code:
loader="uefi"
cpu=2
memory=2048M

network0_type="virtio-net"
network0_switch="public"

disk0_type="virtio-blk"
disk0_name="disk0.img"

graphics="yes"
graphics_listen="127.0.0.1"

xhci_mouse="yes"

passthru0="3/0/0"

The BCM4360 is correctly reserved for passthrough:

Code:
ppt0@pci0:3:0:0
Broadcom BCM4360 802.11ac Dual Band Wireless Network Adapter

Running [tt]vm passthru[/tt] shows:

Code:
DEVICE BHYVE ID READY
ppt0 3/0/0 Yes

So vm-bhyve appears to recognize the device correctly.

IOMMU status

DMAR is detected during boot, and VT-x is initialized.

Relevant sysctls:

Code:
hw.vmm.iommu.enable: 1
hw.vmm.iommu.initialized: 0

hw.vmm.vmx.initialized: 1

One thing that caught my attention is that [tt]hw.vmm.iommu.initialized[/tt] remains [tt]0[/tt]. I'm not sure whether this is expected or if it indicates that PCI passthrough is not fully initialized.

Problem

When I run:

Code:
vm start debian

the host immediately freezes.

The symptoms are:


  • []No kernel panic
    [
    ]No console output
    []No new entries in dmesg
    [
    ]Keyboard becomes unresponsive
  • The machine requires a hard power cycle

After reboot, [tt]vm list[/tt] reports the VM as:

Code:
Locked (shamayim)

although [tt]vm info debian[/tt] reports that the VM is stopped.

Questions


  • []Is it expected that [tt]hw.vmm.iommu.initialized[/tt] remains 0 on FreeBSD 15.1?
    [
    ]Has anyone successfully passed through a BCM4360 or another Wi-Fi adapter to a bhyve guest?
    []Is PCI passthrough known to have issues on Apple MacBookPro11,1 hardware?
    [
    ]Could this indicate a bhyve regression, an Apple VT-d/IOMMU quirk, or something I've overlooked in my configuration?

If there are additional diagnostics that would help identify the problem, I'm happy to collect them and post the results. Thank you for any suggestions.
 
I have an old Macbook Air 2011

i installed debian trixie on it
and noticed it completely locked up after a couple of minutes due to the broadcom wifi

so the issue maybe that you are using debian for bhyve
and may have better luck using another linux distro
 
I'm trying to work around the lack of a native FreeBSD driver for the Broadcom BCM4360 wireless card by passing it through to a Debian guest running under bhyve. The Debian VM would then connect to Wi-Fi and act as a router/NAT gateway for the FreeBSD host.
Unrelated to the PCIe passthru problem, just as an alternative, there's net/wifibox.
 
I have an old Macbook Air 2011

i installed debian trixie on it
and noticed it completely locked up after a couple of minutes due to the broadcom wifi

so the issue maybe that you are using debian for bhyve
and may have better luck using another linux distro
I would create another vm to test it as alternative but the vm without the pci passtrough runs fine. Just when I attach the BCM4360 to it and start de vm it fully crash the host.
 
So, this is the thing, at first I was tried wifibox and it cames with the same issue it crashes the host too. So my idea was to get the BCM4360 with a PCI Passtrough to a Debian vm guest and make it as router to redirect te wifi connection once connected to my host FreeBSD. But once I run the vm start with the passthru0="3/0/0" ir completely freeze the host.
Unrelated to the PCIe passthru problem, just as an alternative, there's net/wifibox.
 
Witouth the passtrough the vm runs perfectly, the thing is once passtrough is configured, and the card is isolated is all ok. I run the vm and crashes all the host, same thing was happening with wifibox.
So, that's likely a bug in bhyve. You should make a PR.
 
Back
Top